Add TestParallelDiropsHang / emulate gvfs-udisks2-volume-monitor
There is a hang that appears when enabling CAP_PARALLEL_DIROPS on Linux 4.15.0: https://github.com/hanwen/go-fuse/issues/281 The hang was originally triggered by gvfs-udisks2-volume-monitor. This test emulates what gvfs-udisks2-volume-monitor does. On 4.15.0 kernels, the test will get stuck, and after 120 seconds you get a kernel backtrace like this: [ 1813.463679] INFO: task nodefs.test:2357 blocked for more than 120 seconds. [ 1813.463685] Not tainted 4.15.0-45-generic #48~16.04.1-Ubuntu [ 1813.463687] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 1813.463689] nodefs.test D 0 2357 2311 0x00000004 [ 1813.463691] Call Trace: [ 1813.463709] __schedule+0x3d6/0x8b0 [ 1813.463712] schedule+0x36/0x80 [ 1813.463714] schedule_preempt_disabled+0xe/0x10 [ 1813.463716] __mutex_lock.isra.2+0x2ae/0x4e0 [ 1813.463720] ? ___slab_alloc+0x223/0x4e0 [ 1813.463722] ? _cond_resched+0x1a/0x50 [ 1813.463724] __mutex_lock_slowpath+0x13/0x20 [ 1813.463725] ? __mutex_lock_slowpath+0x13/0x20 [ 1813.463727] mutex_lock+0x2f/0x40 [ 1813.463729] fuse_lock_inode+0x2a/0x30 [ 1813.463732] fuse_lookup+0x31/0x140 [ 1813.463735] ? d_alloc_parallel+0xc1/0x4c0 [ 1813.463738] fuse_atomic_open+0x6d/0xf0 [ 1813.463740] path_openat+0xc5d/0x13f0 [ 1813.463744] do_filp_open+0x99/0x110 [ 1813.463747] ? __check_object_size+0xfc/0x1a0 [ 1813.463749] ? __alloc_fd+0x46/0x170 [ 1813.463752] do_sys_open+0x12d/0x290 [ 1813.463754] ? do_sys_open+0x12d/0x290 [ 1813.463756] SyS_openat+0x14/0x20 [ 1813.463759] do_syscall_64+0x73/0x130 [ 1813.463762] entry_SYSCALL_64_after_hwframe+0x3d/0xa2
Showing
Please register or sign in to comment