libldm icon indicating copy to clipboard operation
libldm copied to clipboard

ldmtool causes kernel trace on shutdown

Open jkhsjdhjs opened this issue 4 years ago • 2 comments

When running ldmtool create all and then shutting the system down, a trace is printed. The trace is only visible for a fraction of a second, video and picture of the trace can be found here:

  • https://user-images.githubusercontent.com/1429604/151075958-41a23421-5af7-4123-a891-3959a2961f95.mp4
  • https://user-images.githubusercontent.com/1429604/151075975-92e992cd-6ad5-46c1-b66a-1db291f7d35c.jpg

Even when running ldmtool remove all before shutting down, the trace is printed. The warning that is printed is __dma_async_device_channel_unregister called while 2 clients hold a reference, the trace is:

<TASK>
dma_async_device_unregister
ccp_dmaengine_unregister
ccp5_destroy
sp_destroy
pci_device_shutdown
kernel_power_off
__do_sys_reboot
do_syscall
? do_syscall_64
? __s64_sys_rt_sigprocmask
entry_SYSCALL_64_after_hwframe

I encountered this issue with linux 5.15.10, 5.16.1 and 5.16.2. I haven't tested any other version of the kernel. I'm running Arch Linux, the downstream bug report can be found here: https://bugs.archlinux.org/task/73504

Hardware: AMD Ryzen 7 2700X Gigabyte X570 AORUS ELITE Mainboard, F36e firmware

If there's any additional information I can provide, please let me know.

jkhsjdhjs avatar Jan 25 '22 23:01 jkhsjdhjs

I don't really know, but it must be a kernel problem as ldmtool itself only creates device-mapper mappings, it doesn't have any kernel component.

rwmjones avatar Jan 26 '22 11:01 rwmjones

I'm not sure, since the kernel trace is just a warning: https://elixir.bootlin.com/linux/latest/source/drivers/dma/dmaengine.c#L1109 Maybe this is just due to some references not being cleaned up. Not sure whose job this would be.

jkhsjdhjs avatar Jan 26 '22 12:01 jkhsjdhjs