Public bug reported:

Issue description
kcryptd freeze waiting for io for a dm-crypt (luks2) partition formatted with 
btrfs on top.
The system has 4 cores.

Steps for reproducing the issue
For me it happens randomly for 1 kernel thread, then after a while 3 others 
also freeze and the system is then dead.

eg first after a few minutes with heavy io
ps aux
...
root         265  0.5  0.0      0     0 ?        D    21:16   0:02 
[kworker/u8:3+kcryptd/253:2]
...

then a bit later
root         265  0.1  0.0      0     0 ?        D    21:16   0:02 
[kworker/u8:3+kcryptd/253:2]
root         310  0.1  0.0      0     0 ?        D    21:16   0:02 
[kworker/u8:8+kcryptd/253:2]
root         312  0.2  0.0      0     0 ?        D    21:16   0:03 
[kworker/u8:10+btrfs-endio-write]
root         313  0.1  0.0      0     0 ?        D    21:16   0:02 
[kworker/u8:11+btrfs-endio-write]
root         314  0.1  0.0      0     0 ?        D    21:16   0:01 
[kworker/u8:12+flush-btrfs-2]
root         315  0.1  0.0      0     0 ?        D    21:16   0:02 
[kworker/u8:13+kcryptd/253:2]
root        1612  0.0  0.0      0     0 ?        D    21:16   0:00 
[btrfs-transacti]
root        4133  0.0  0.0      0     0 ?        D    21:22   0:00 
[kworker/u8:0+kcryptd/253:2]
root        4135  0.0  0.0      0     0 ?        D    21:22   0:00 
[kworker/u8:4+btrfs-endio-write]
root        4137  0.0  0.0      0     0 ?        D    21:22   0:00 
[kworker/u8:14+btrfs-endio-write]
root        4977  0.0  0.0      0     0 ?        D    21:30   0:00 
[kworker/u8:1+btrfs-endio-write]
root        4978  0.0  0.0      0     0 ?        D    21:30   0:00 
[kworker/u8:2+btrfs-endio-write]

Additional info
Ubuntu focal install with btrfs on luks partitions.
Kernel info
Linux 5.4.0-31-generic #35-Ubuntu SMP x86_64 x86_64 x86_64 GNU/Linux

lscpu
Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
Address sizes:                   39 bits physical, 48 bits virtual
CPU(s):                          4
On-line CPU(s) list:             0-3
Thread(s) per core:              1
Core(s) per socket:              4
Socket(s):                       1
NUMA node(s):                    1
Vendor ID:                       GenuineIntel
CPU family:                      6
Model:                           95
Model name:                      Intel(R) Atom(TM) CPU C3558 @ 2.20GHz
Stepping:                        1
CPU MHz:                         2200.413
CPU max MHz:                     2200,0000
CPU min MHz:                     800,0000
BogoMIPS:                        4400.00
Virtualization:                  VT-x
L1d cache:                       96 KiB
L1i cache:                       128 KiB
L2 cache:                        8 MiB
NUMA node0 CPU(s):               0-3
Vulnerability Itlb multihit:     Not affected
Vulnerability L1tf:              Not affected
Vulnerability Mds:               Not affected
Vulnerability Meltdown:          Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled 
via prctl and seccomp
Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and 
__user pointer sanitization
Vulnerability Spectre v2:        Mitigation; Full generic retpoline, IBPB 
conditional, IBRS_FW, STIBP disabled, RSB filling
Vulnerability Tsx async abort:   Not affected
Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep 
mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe 
syscall nx pdpe1gb rdtscp lm constant_tsc
art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf 
tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg cx16 
xtpr
pdcm sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave rdrand 
lahf_lm 3dnowprefetch cpuid_fault epb cat_l2 ssbd ibrs ibpb stibp tpr_shadow 
vnmi flex
priority ept vpid ept_ad fsgsbase tsc_adjust smep erms mpx rdt_a rdseed smap 
clflushopt intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts 
md_clea
r arch_capabilities

kernel crypto flags
cat /boot/config-5.4.0-31-generic  | grep AES
CONFIG_CRYPTO_AEGIS128_AESNI_SSE2=m
CONFIG_CRYPTO_LIB_AES=y
CONFIG_CRYPTO_AES=y
CONFIG_CRYPTO_AES_TI=m
CONFIG_CRYPTO_AES_NI_INTEL=m
CONFIG_CRYPTO_CAMELLIA_AESNI_AVX_X86_64=m
CONFIG_CRYPTO_CAMELLIA_AESNI_AVX2_X86_64=m
CONFIG_CRYPTO_DEV_PADLOCK_AES=m

/etc/crypttab
LUKS_DATA_6T_1 UUID=the_uuid /etc/....keyfile luks

Related bug reports:
https://gitlab.com/cryptsetup/cryptsetup/-/issues/568 -> rejected, referred to 
ubuntu kernel team.

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1922022

Title:
  Btrfs blocked io when running on top of luks encrypted partition

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1922022/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to