Hello everyone,
I know this is probably not that related to a linux 4 tegra issue, but since i’m getting a kernel stack trace, i try posting here in the hope that someone can drive me into the right direction to fix my issue.
Here is the scenario
I have a linux installation with a luks encrypted partition mounted on /mnt which is RW and a rootfs that is also luks encrypted mounted read only.
Whenever i try shutting down the system, the system never powers down, everything freezes (like i cant interact with the serial terminal anymore via keyboard) and after about 120 secs, which is (i think) the systemd timeout
I receive this kernel trace
[ 1088.638263] INFO: task systemd-shutdow:1 blocked for more than 120 seconds.
[ 1088.645526] Not tainted 4.9.337-unox #1
[ 1088.650010] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 1088.658136] Call trace:
[ 1088.660630] [<000000003ae63707>] __switch_to+0x9c/0xc0
[ 1088.665837] [<000000007c73338d>] __schedule+0x23c/0x7e0
[ 1088.671268] [<00000000e285f148>] schedule+0x40/0xa8
[ 1088.676232] [<00000000402afbdd>] bdi_unregister+0x1e8/0x230
[ 1088.681839] [<0000000041b6e526>] blk_cleanup_queue+0xf0/0x118
[ 1088.687599] [<0000000003df533d>] cleanup_mapped_device+0x9c/0xc8
[ 1088.693603] [<00000000f9a7e1ec>] __dm_destroy+0x148/0x218
[ 1088.698997] [<000000000d45da0b>] dm_destroy+0x24/0x30
[ 1088.704043] [<0000000021ea91a5>] dev_remove+0x100/0x160
[ 1088.709261] [<00000000aae7b94b>] ctl_ioctl+0x25c/0x548
[ 1088.714394] [<000000005d5d6d17>] dm_ctl_ioctl+0x28/0x38
[ 1088.719613] [<00000000eff7fa91>] do_vfs_ioctl+0xb0/0x8d8
[ 1088.725105] [<0000000068610fe2>] SyS_ioctl+0x8c/0xa8
[ 1088.730096] [<00000000ad48cfec>] el0_svc_naked+0x34/0x38
Well, i’m not a kernel expert but according to the trace i think it has something to do with the device mapper, it cant destroy it for some reasons?
i’ve tried the following in the hope it would help
- forcing a kill of every process using /mnt before shutting down thinking it might have been some process holding the device busy
- remounting /mnt as read only before shutting down also didn’t help
If i add a watchdog
ShutdownWatchdogSec=10s
in /etc/systemd/system.conf i can REBOOT the system from the command line, as it reaches the timeout and the system is forcefully rebooting, but this doesn’t seem to work in the shutdown process.
If anyone has any siggestion or know if this might be a bug in the specific kernel version i’m using, or anything (boot arguments, whatsoever i don’t know), please let me know how can i investigate any further.
the kernel version is 4.9.337 built from the linux for tegra sources repository
thanks a lot :)