AnsweredAssumed Answered

Hung task exception using dm-crypt

Question asked by jon bird on Sep 1, 2016

Using SDK-V2.0-20160527 with a T1043D4RDB, I have set up an encrypted partition on a SATA drive using cryptsetup. However attempting to write a file of more than about 40MBytes generates a hung task exception and lock up of the command:

 

root@192:/mnt/sda2# dd if=/dev/zero of=test32.dat bs=5M count=400
INFO: task kworker/u8:0:6 blocked for more than 120 seconds.
      Tainted: G           O    4.1.8-rt8+gbd51baf #1
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
kworker/u8:0    D 00000000     0     6      2 0x00000800
Workqueue: kcryptd kcryptd_crypt [dm_crypt]
Call Trace:
[e605bc70] [e600120c] 0xe600120c (unreliable)
[e605bd30] [c07030b0] __schedule+0x1f0/0x4b0
[e605bd60] [c07033b0] schedule+0x40/0xf0
[e605bd70] [c0706014] schedule_timeout+0x144/0x1a0
[e605bdb0] [c0703f98] wait_for_common+0xd8/0x150
[e605bde0] [fa05c048] crypt_convert+0x438/0x530 [dm_crypt]
[e605be30] [fa05e488] kcryptd_crypt+0x248/0x450 [dm_crypt]
[e605be80] [c0047e68] process_one_work+0x158/0x350
[e605bea0] [c0048198] worker_thread+0x138/0x4d0
[e605bef0] [c004d518] kthread+0xb8/0xd0
[e605bf40] [c000f278] ret_from_kernel_thread+0x5c/0x64
INFO: task kworker/u8:2:660 blocked for more than 120 seconds.
      Tainted: G           O    4.1.8-rt8+gbd51baf #1
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
kworker/u8:2    D 00000000     0   660      2 0x00000800
Workqueue: kcryptd kcryptd_crypt [dm_crypt]
Call Trace:
[e63e3c70] [e600120c] 0xe600120c (unreliable)
[e63e3d30] [c07030b0] __schedule+0x1f0/0x4b0
[e63e3d60] [c07033b0] schedule+0x40/0xf0
[e63e3d70] [c0706014] schedule_timeout+0x144/0x1a0
[e63e3db0] [c0703f98] wait_for_common+0xd8/0x150
[e63e3de0] [fa05c048] crypt_convert+0x438/0x530 [dm_crypt]
[e63e3e30] [fa05e488] kcryptd_crypt+0x248/0x450 [dm_crypt]
[e63e3e80] [c0047e68] process_one_work+0x158/0x350
[e63e3ea0] [c0048198] worker_thread+0x138/0x4d0
[e63e3ef0] [c004d518] kthread+0xb8/0xd0
[e63e3f40] [c000f278] ret_from_kernel_thread+0x5c/0x64
INFO: task kworker/u8:3:668 blocked for more than 120 seconds.
      Tainted: G           O    4.1.8-rt8+gbd51baf #1
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
kworker/u8:3    D 00000000     0   668      2 0x00000800
Workqueue: kcryptd kcryptd_crypt [dm_crypt]
Call Trace:
[e62d1c70] [e600120c] 0xe600120c (unreliable)
[e62d1d30] [c07030b0] __schedule+0x1f0/0x4b0
[e62d1d60] [c07033b0] schedule+0x40/0xf0
[e62d1d70] [c0706014] schedule_timeout+0x144/0x1a0
[e62d1db0] [c0703f98] wait_for_common+0xd8/0x150
[e62d1de0] [fa05c048] crypt_convert+0x438/0x530 [dm_crypt]
[e62d1e30] [fa05e488] kcryptd_crypt+0x248/0x450 [dm_crypt]
[e62d1e80] [c0047e68] process_one_work+0x158/0x350
[e62d1ea0] [c0048198] worker_thread+0x138/0x4d0
[e62d1ef0] [c004d518] kthread+0xb8/0xd0
[e62d1f40] [c000f278] ret_from_kernel_thread+0x5c/0x64
INFO: task kworker/u8:4:764 blocked for more than 120 seconds.
      Tainted: G           O    4.1.8-rt8+gbd51baf #1
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
kworker/u8:4    D 00000000     0   764      2 0x00000800
Workqueue: kcryptd kcryptd_crypt [dm_crypt]
Call Trace:
[e64b3d30] [c07030b0] __schedule+0x1f0/0x4b0
[e64b3d60] [c07033b0] schedule+0x40/0xf0
[e64b3d70] [c0706014] schedule_timeout+0x144/0x1a0
[e64b3db0] [c0703f98] wait_for_common+0xd8/0x150
[e64b3de0] [fa05c048] crypt_convert+0x438/0x530 [dm_crypt]
[e64b3e30] [fa05e488] kcryptd_crypt+0x248/0x450 [dm_crypt]
[e64b3e80] [c0047e68] process_one_work+0x158/0x350
[e64b3ea0] [c0048198] worker_thread+0x138/0x4d0
[e64b3ef0] [c004d518] kthread+0xb8/0xd0
[e64b3f40] [c000f278] ret_from_kernel_thread+0x5c/0x64
INFO: task kjournald:1586 blocked for more than 120 seconds.
      Tainted: G           O    4.1.8-rt8+gbd51baf #1
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
kjournald       D 00000000     0  1586      2 0x00000800
Call Trace:
[e6b2fbc0] [c0058934] try_to_wake_up+0x1f4/0x380 (unreliable)
[e6b2fc80] [c07030b0] __schedule+0x1f0/0x4b0
[e6b2fcb0] [c07033b0] schedule+0x40/0xf0
[e6b2fcc0] [c0706014] schedule_timeout+0x144/0x1a0
[e6b2fd00] [c0702e84] io_schedule_timeout+0x84/0xc0
[e6b2fd20] [c0703d24] bit_wait_io+0x34/0x70
[e6b2fd30] [c07038ec] __wait_on_bit+0xac/0x110
[e6b2fd50] [c07039b4] out_of_line_wait_on_bit+0x64/0x80
[e6b2fd90] [c01a63c8] journal_write_superblock+0x128/0x1b0
[e6b2fdd0] [c01a7a40] journal_update_sb_log_tail+0x40/0x90
[e6b2fdf0] [c01a3870] journal_commit_transaction+0x1160/0x12f0
[e6b2fea0] [c01a687c] kjournald+0xdc/0x270
[e6b2fef0] [c004d518] kthread+0xb8/0xd0
[e6b2ff40] [c000f278] ret_from_kernel_thread+0x5c/0x64

 

This problem does not occur when reading files from the encrypted partition, neither does it occur if I disable all but one of the cores so it appears to be an SMP issue.

Outcomes