Closed sempervictus closed 5 years ago
@sempervictus Addressing dynamic taskqs only: I wonder if your load is running afoul of the behavior caused by the spl_taskq_thread_sequential
parameter? By default, it's set to 4 which means a dynamic taskq has slightly different semantics than a non-dynamic taskq. Specifically, they'll run that many requests sequentially, potentially reducing concurrency, before spawning a new handler thread. Non-dynamic taskqs on the other hand, in which the full set of threads are pre-spawned will always provide for additional concurrency if a thread is available. I'm fairly certain it's safe to set spl_taskq_thread_sequential
to zero which will cause the concurrency behavior of dynamic taskqs to more closely match that of non-dynamic taskqs.
@dweeezil: thank you, will try that next. However, i first have to get the pool to import safely, and it seems to crash during ZIL replay.
Far as i can tell, when this error occurs, all subsequent writes go in to the ZIL instead of disk, and when the pool finally grinds to a halt, the host is hosed - ipmitool chassis power reset hosed. When the host reboots, and i import the pool, it hangs, for hours, usually resulting in the following crash:
[22871.132146] INFO: task txg_quiesce:29465 blocked for more than 180 seconds.
[22871.132864] Tainted: P OE 4.4.3-ssv-i7 #ssv
[22871.133463] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[22871.134271] txg_quiesce D ffff8800b83b3d48 0 29465 2 0x00000000
[22871.134276] ffff8800b83b3d48 ffffffff82c22500 ffff8800ba058000 ffff8800b83b4000
[22871.134279] ffff880bdf3b0918 ffff880bdf3b09e8 ffff880bdf3b0940 0000000000000000
[22871.134282] ffff8800b83b3d60 ffffffff827b9955 ffff880bdf3b09e0 ffff8800b83b3dc0
[22871.134285] Call Trace:
[22871.134293] [<ffffffff827b9955>] schedule+0x35/0x80
[22871.134306] [<ffffffffc009a16d>] cv_wait_common+0xed/0x120 [spl]
[22871.134311] [<ffffffff820bc5f0>] ? prepare_to_wait_event+0xf0/0xf0
[22871.134320] [<ffffffffc009a1b5>] __cv_wait+0x15/0x20 [spl]
[22871.134388] [<ffffffffc045d21e>] txg_quiesce_thread+0x2ce/0x3e0 [zfs]
[22871.134436] [<ffffffffc045cf50>] ? txg_delay+0x160/0x160 [zfs]
[22871.134443] [<ffffffffc00952f1>] thread_generic_wrapper+0x71/0x80 [spl]
[22871.134450] [<ffffffffc0095280>] ? __thread_exit+0x20/0x20 [spl]
[22871.134453] [<ffffffff82096f69>] kthread+0xc9/0xe0
[22871.134455] [<ffffffff82096ea0>] ? kthread_park+0x60/0x60
[22871.134459] [<ffffffff827bd78f>] ret_from_fork+0x3f/0x70
[22871.134461] [<ffffffff82096ea0>] ? kthread_park+0x60/0x60
[23051.218809] INFO: task txg_quiesce:29465 blocked for more than 180 seconds.
[23051.219528] Tainted: P OE 4.4.3-ssv-i7 #ssv
[23051.220133] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[23051.220948] txg_quiesce D ffff8800b83b3d48 0 29465 2 0x00000000
[23051.220953] ffff8800b83b3d48 ffffffff82c22500 ffff8800ba058000 ffff8800b83b4000
[23051.220956] ffff880bdf3b0918 ffff880bdf3b09e8 ffff880bdf3b0940 0000000000000000
[23051.220959] ffff8800b83b3d60 ffffffff827b9955 ffff880bdf3b09e0 ffff8800b83b3dc0
[23051.220962] Call Trace:
[23051.220971] [<ffffffff827b9955>] schedule+0x35/0x80
[23051.220984] [<ffffffffc009a16d>] cv_wait_common+0xed/0x120 [spl]
[23051.220989] [<ffffffff820bc5f0>] ? prepare_to_wait_event+0xf0/0xf0
[23051.220998] [<ffffffffc009a1b5>] __cv_wait+0x15/0x20 [spl]
[23051.221063] [<ffffffffc045d21e>] txg_quiesce_thread+0x2ce/0x3e0 [zfs]
[23051.221115] [<ffffffffc045cf50>] ? txg_delay+0x160/0x160 [zfs]
[23051.221123] [<ffffffffc00952f1>] thread_generic_wrapper+0x71/0x80 [spl]
[23051.221131] [<ffffffffc0095280>] ? __thread_exit+0x20/0x20 [spl]
[23051.221134] [<ffffffff82096f69>] kthread+0xc9/0xe0
[23051.221137] [<ffffffff82096ea0>] ? kthread_park+0x60/0x60
[23051.221140] [<ffffffff827bd78f>] ret_from_fork+0x3f/0x70
[23051.221143] [<ffffffff82096ea0>] ? kthread_park+0x60/0x60
[23051.221148] INFO: task mount.zfs:29611 blocked for more than 180 seconds.
[23051.221855] Tainted: P OE 4.4.3-ssv-i7 #ssv
[23051.222444] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[23051.223247] mount.zfs D ffff8805e32dfbc8 0 29611 29610 0x00000002
[23051.223251] ffff8805e32dfbc8 ffff880c23e74000 ffff8800be100000 ffff8805e32e0000
[23051.223257] ffff880bf4b9b220 ffff880bf4b9b2e0 ffff880bf4b9b248 0000000000000000
[23051.223261] ffff8805e32dfbe0 ffffffff827b9955 ffff880bf4b9b2d8 ffff8805e32dfc40
[23051.223264] Call Trace:
[23051.223268] [<ffffffff827b9955>] schedule+0x35/0x80
[23051.223278] [<ffffffffc009a16d>] cv_wait_common+0xed/0x120 [spl]
[23051.223281] [<ffffffff820bc5f0>] ? prepare_to_wait_event+0xf0/0xf0
[23051.223290] [<ffffffffc009a1b5>] __cv_wait+0x15/0x20 [spl]
[23051.223342] [<ffffffffc045ccb9>] txg_wait_synced+0xe9/0x130 [zfs]
[23051.223398] [<ffffffffc049f05a>] zil_replay+0xca/0x100 [zfs]
[23051.223453] [<ffffffffc048cb68>] zfs_sb_setup+0x158/0x170 [zfs]
[23051.223508] [<ffffffffc048d7c7>] zfs_domount+0x2a7/0x330 [zfs]
[23051.223512] [<ffffffff821f5ac0>] ? get_anon_bdev+0xf0/0xf0
[23051.223568] [<ffffffffc04aa9a0>] ? zpl_kill_sb+0x20/0x20 [zfs]
[23051.223626] [<ffffffffc04aa9cc>] zpl_fill_super+0x2c/0x40 [zfs]
[23051.223640] [<ffffffff821f651d>] mount_nodev+0x4d/0xa0
[23051.223700] [<ffffffffc04aae12>] zpl_mount+0x52/0x80 [zfs]
[23051.223708] [<ffffffff821f6ff9>] mount_fs+0x39/0x160
[23051.223717] [<ffffffff82211737>] vfs_kern_mount+0x67/0x110
[23051.223720] [<ffffffff82213cc0>] do_mount+0x220/0xdd0
[23051.223725] [<ffffffff821c20e8>] ? alloc_pages_current+0x88/0x120
[23051.223730] [<ffffffff82179efe>] ? __get_free_pages+0xe/0x40
[23051.223733] [<ffffffff82213976>] ? copy_mount_options+0x36/0x140
[23051.223736] [<ffffffff82214b5b>] SyS_mount+0x8b/0xe0
[23051.223739] [<ffffffff827bd3f6>] entry_SYSCALL_64_fastpath+0x16/0x75
[23231.308478] INFO: task txg_quiesce:29465 blocked for more than 180 seconds.
[23231.309193] Tainted: P OE 4.4.3-ssv-i7 #ssv
[23231.309790] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[23231.310594] txg_quiesce D ffff8800b83b3d48 0 29465 2 0x00000000
[23231.310599] ffff8800b83b3d48 ffffffff82c22500 ffff8800ba058000 ffff8800b83b4000
[23231.310603] ffff880bdf3b0918 ffff880bdf3b09e8 ffff880bdf3b0940 0000000000000000
[23231.310606] ffff8800b83b3d60 ffffffff827b9955 ffff880bdf3b09e0 ffff8800b83b3dc0
[23231.310609] Call Trace:
[23231.310617] [<ffffffff827b9955>] schedule+0x35/0x80
[23231.310631] [<ffffffffc009a16d>] cv_wait_common+0xed/0x120 [spl]
[23231.310636] [<ffffffff820bc5f0>] ? prepare_to_wait_event+0xf0/0xf0
[23231.310646] [<ffffffffc009a1b5>] __cv_wait+0x15/0x20 [spl]
[23231.310715] [<ffffffffc045d21e>] txg_quiesce_thread+0x2ce/0x3e0 [zfs]
[23231.310767] [<ffffffffc045cf50>] ? txg_delay+0x160/0x160 [zfs]
[23231.310775] [<ffffffffc00952f1>] thread_generic_wrapper+0x71/0x80 [spl]
[23231.310782] [<ffffffffc0095280>] ? __thread_exit+0x20/0x20 [spl]
[23231.310786] [<ffffffff82096f69>] kthread+0xc9/0xe0
[23231.310789] [<ffffffff82096ea0>] ? kthread_park+0x60/0x60
[23231.310792] [<ffffffff827bd78f>] ret_from_fork+0x3f/0x70
[23231.310794] [<ffffffff82096ea0>] ? kthread_park+0x60/0x60
[23231.310799] INFO: task mount.zfs:29611 blocked for more than 180 seconds.
[23231.311493] Tainted: P OE 4.4.3-ssv-i7 #ssv
[23231.312078] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[23231.312894] mount.zfs D ffff8805e32dfbc8 0 29611 29610 0x00000002
[23231.312898] ffff8805e32dfbc8 ffff880c23e74000 ffff8800be100000 ffff8805e32e0000
[23231.312903] ffff880bf4b9b220 ffff880bf4b9b2e0 ffff880bf4b9b248 0000000000000000
[23231.312907] ffff8805e32dfbe0 ffffffff827b9955 ffff880bf4b9b2d8 ffff8805e32dfc40
[23231.312910] Call Trace:
[23231.312914] [<ffffffff827b9955>] schedule+0x35/0x80
[23231.312923] [<ffffffffc009a16d>] cv_wait_common+0xed/0x120 [spl]
[23231.312927] [<ffffffff820bc5f0>] ? prepare_to_wait_event+0xf0/0xf0
[23231.312936] [<ffffffffc009a1b5>] __cv_wait+0x15/0x20 [spl]
[23231.312988] [<ffffffffc045ccb9>] txg_wait_synced+0xe9/0x130 [zfs]
[23231.313044] [<ffffffffc049f05a>] zil_replay+0xca/0x100 [zfs]
[23231.313099] [<ffffffffc048cb68>] zfs_sb_setup+0x158/0x170 [zfs]
[23231.313154] [<ffffffffc048d7c7>] zfs_domount+0x2a7/0x330 [zfs]
[23231.313159] [<ffffffff821f5ac0>] ? get_anon_bdev+0xf0/0xf0
[23231.313214] [<ffffffffc04aa9a0>] ? zpl_kill_sb+0x20/0x20 [zfs]
[23231.313273] [<ffffffffc04aa9cc>] zpl_fill_super+0x2c/0x40 [zfs]
[23231.313286] [<ffffffff821f651d>] mount_nodev+0x4d/0xa0
[23231.313347] [<ffffffffc04aae12>] zpl_mount+0x52/0x80 [zfs]
[23231.313354] [<ffffffff821f6ff9>] mount_fs+0x39/0x160
[23231.313363] [<ffffffff82211737>] vfs_kern_mount+0x67/0x110
[23231.313369] [<ffffffff82213cc0>] do_mount+0x220/0xdd0
[23231.313374] [<ffffffff821c20e8>] ? alloc_pages_current+0x88/0x120
[23231.313379] [<ffffffff82179efe>] ? __get_free_pages+0xe/0x40
[23231.313382] [<ffffffff82213976>] ? copy_mount_options+0x36/0x140
[23231.313385] [<ffffffff82214b5b>] SyS_mount+0x8b/0xe0
[23231.313388] [<ffffffff827bd3f6>] entry_SYSCALL_64_fastpath+0x16/0x75
[23411.398143] INFO: task txg_quiesce:29465 blocked for more than 180 seconds.
[23411.398848] Tainted: P OE 4.4.3-ssv-i7 #ssv
[23411.399439] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[23411.400253] txg_quiesce D ffff8800b83b3d48 0 29465 2 0x00000000
[23411.400258] ffff8800b83b3d48 ffffffff82c22500 ffff8800ba058000 ffff8800b83b4000
[23411.400261] ffff880bdf3b0918 ffff880bdf3b09e8 ffff880bdf3b0940 0000000000000000
[23411.400264] ffff8800b83b3d60 ffffffff827b9955 ffff880bdf3b09e0 ffff8800b83b3dc0
[23411.400267] Call Trace:
[23411.400276] [<ffffffff827b9955>] schedule+0x35/0x80
[23411.400289] [<ffffffffc009a16d>] cv_wait_common+0xed/0x120 [spl]
[23411.400294] [<ffffffff820bc5f0>] ? prepare_to_wait_event+0xf0/0xf0
[23411.400303] [<ffffffffc009a1b5>] __cv_wait+0x15/0x20 [spl]
[23411.400367] [<ffffffffc045d21e>] txg_quiesce_thread+0x2ce/0x3e0 [zfs]
[23411.400419] [<ffffffffc045cf50>] ? txg_delay+0x160/0x160 [zfs]
[23411.400427] [<ffffffffc00952f1>] thread_generic_wrapper+0x71/0x80 [spl]
[23411.400435] [<ffffffffc0095280>] ? __thread_exit+0x20/0x20 [spl]
[23411.400438] [<ffffffff82096f69>] kthread+0xc9/0xe0
[23411.400441] [<ffffffff82096ea0>] ? kthread_park+0x60/0x60
[23411.400444] [<ffffffff827bd78f>] ret_from_fork+0x3f/0x70
[23411.400447] [<ffffffff82096ea0>] ? kthread_park+0x60/0x60
[23411.400452] INFO: task mount.zfs:29611 blocked for more than 180 seconds.
[23411.401161] Tainted: P OE 4.4.3-ssv-i7 #ssv
[23411.419618] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[23411.457333] mount.zfs D ffff8805e32dfbc8 0 29611 29610 0x00000002
[23411.457337] ffff8805e32dfbc8 ffff880c23e74000 ffff8800be100000 ffff8805e32e0000
[23411.457340] ffff880bf4b9b220 ffff880bf4b9b2e0 ffff880bf4b9b248 0000000000000000
[23411.457345] ffff8805e32dfbe0 ffffffff827b9955 ffff880bf4b9b2d8 ffff8805e32dfc40
[23411.457349] Call Trace:
[23411.457356] [<ffffffff827b9955>] schedule+0x35/0x80
[23411.457366] [<ffffffffc009a16d>] cv_wait_common+0xed/0x120 [spl]
[23411.457370] [<ffffffff820bc5f0>] ? prepare_to_wait_event+0xf0/0xf0
[23411.457379] [<ffffffffc009a1b5>] __cv_wait+0x15/0x20 [spl]
[23411.457432] [<ffffffffc045ccb9>] txg_wait_synced+0xe9/0x130 [zfs]
[23411.457487] [<ffffffffc049f05a>] zil_replay+0xca/0x100 [zfs]
[23411.457543] [<ffffffffc048cb68>] zfs_sb_setup+0x158/0x170 [zfs]
[23411.457598] [<ffffffffc048d7c7>] zfs_domount+0x2a7/0x330 [zfs]
[23411.457602] [<ffffffff821f5ac0>] ? get_anon_bdev+0xf0/0xf0
[23411.457657] [<ffffffffc04aa9a0>] ? zpl_kill_sb+0x20/0x20 [zfs]
[23411.457713] [<ffffffffc04aa9cc>] zpl_fill_super+0x2c/0x40 [zfs]
[23411.457716] [<ffffffff821f651d>] mount_nodev+0x4d/0xa0
[23411.457772] [<ffffffffc04aae12>] zpl_mount+0x52/0x80 [zfs]
[23411.457775] [<ffffffff821f6ff9>] mount_fs+0x39/0x160
[23411.457780] [<ffffffff82211737>] vfs_kern_mount+0x67/0x110
[23411.457784] [<ffffffff82213cc0>] do_mount+0x220/0xdd0
[23411.457789] [<ffffffff821c20e8>] ? alloc_pages_current+0x88/0x120
[23411.457793] [<ffffffff82179efe>] ? __get_free_pages+0xe/0x40
[23411.457796] [<ffffffff82213976>] ? copy_mount_options+0x36/0x140
[23411.457800] [<ffffffff82214b5b>] SyS_mount+0x8b/0xe0
[23411.457803] [<ffffffff827bd3f6>] entry_SYSCALL_64_fastpath+0x16/0x75
[23591.541839] INFO: task txg_quiesce:29465 blocked for more than 180 seconds.
[23591.561287] Tainted: P OE 4.4.3-ssv-i7 #ssv
[23591.580486] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[23591.618601] txg_quiesce D ffff8800b83b3d48 0 29465 2 0x00000000
[23591.618606] ffff8800b83b3d48 ffffffff82c22500 ffff8800ba058000 ffff8800b83b4000
[23591.618610] ffff880bdf3b0918 ffff880bdf3b09e8 ffff880bdf3b0940 0000000000000000
[23591.618612] ffff8800b83b3d60 ffffffff827b9955 ffff880bdf3b09e0 ffff8800b83b3dc0
[23591.618615] Call Trace:
[23591.618624] [<ffffffff827b9955>] schedule+0x35/0x80
[23591.618637] [<ffffffffc009a16d>] cv_wait_common+0xed/0x120 [spl]
[23591.618643] [<ffffffff820bc5f0>] ? prepare_to_wait_event+0xf0/0xf0
[23591.618655] [<ffffffffc009a1b5>] __cv_wait+0x15/0x20 [spl]
[23591.618735] [<ffffffffc045d21e>] txg_quiesce_thread+0x2ce/0x3e0 [zfs]
[23591.618790] [<ffffffffc045cf50>] ? txg_delay+0x160/0x160 [zfs]
[23591.618801] [<ffffffffc00952f1>] thread_generic_wrapper+0x71/0x80 [spl]
[23591.618810] [<ffffffffc0095280>] ? __thread_exit+0x20/0x20 [spl]
[23591.618814] [<ffffffff82096f69>] kthread+0xc9/0xe0
[23591.618817] [<ffffffff82096ea0>] ? kthread_park+0x60/0x60
[23591.618820] [<ffffffff827bd78f>] ret_from_fork+0x3f/0x70
[23591.618822] [<ffffffff82096ea0>] ? kthread_park+0x60/0x60
[23591.618828] INFO: task mount.zfs:29611 blocked for more than 180 seconds.
[23591.638089] Tainted: P OE 4.4.3-ssv-i7 #ssv
[23591.657257] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[23591.695309] mount.zfs D ffff8805e32dfbc8 0 29611 29610 0x00000002
[23591.695313] ffff8805e32dfbc8 ffff880c23e74000 ffff8800be100000 ffff8805e32e0000
[23591.695316] ffff880bf4b9b220 ffff880bf4b9b2e0 ffff880bf4b9b248 0000000000000000
[23591.695319] ffff8805e32dfbe0 ffffffff827b9955 ffff880bf4b9b2d8 ffff8805e32dfc40
[23591.695322] Call Trace:
[23591.695326] [<ffffffff827b9955>] schedule+0x35/0x80
[23591.695336] [<ffffffffc009a16d>] cv_wait_common+0xed/0x120 [spl]
[23591.695340] [<ffffffff820bc5f0>] ? prepare_to_wait_event+0xf0/0xf0
[23591.695349] [<ffffffffc009a1b5>] __cv_wait+0x15/0x20 [spl]
[23591.695401] [<ffffffffc045ccb9>] txg_wait_synced+0xe9/0x130 [zfs]
[23591.695457] [<ffffffffc049f05a>] zil_replay+0xca/0x100 [zfs]
[23591.695512] [<ffffffffc048cb68>] zfs_sb_setup+0x158/0x170 [zfs]
[23591.695567] [<ffffffffc048d7c7>] zfs_domount+0x2a7/0x330 [zfs]
[23591.695571] [<ffffffff821f5ac0>] ? get_anon_bdev+0xf0/0xf0
[23591.695627] [<ffffffffc04aa9a0>] ? zpl_kill_sb+0x20/0x20 [zfs]
[23591.695682] [<ffffffffc04aa9cc>] zpl_fill_super+0x2c/0x40 [zfs]
[23591.695700] [<ffffffff821f651d>] mount_nodev+0x4d/0xa0
[23591.695761] [<ffffffffc04aae12>] zpl_mount+0x52/0x80 [zfs]
[23591.695769] [<ffffffff821f6ff9>] mount_fs+0x39/0x160
[23591.695777] [<ffffffff82211737>] vfs_kern_mount+0x67/0x110
[23591.695783] [<ffffffff82213cc0>] do_mount+0x220/0xdd0
[23591.695788] [<ffffffff821c20e8>] ? alloc_pages_current+0x88/0x120
[23591.695793] [<ffffffff82179efe>] ? __get_free_pages+0xe/0x40
[23591.695796] [<ffffffff82213976>] ? copy_mount_options+0x36/0x140
[23591.695799] [<ffffffff82214b5b>] SyS_mount+0x8b/0xe0
[23591.695802] [<ffffffff827bd3f6>] entry_SYSCALL_64_fastpath+0x16/0x75
[23771.780584] INFO: task txg_quiesce:29465 blocked for more than 180 seconds.
[23771.799927] Tainted: P OE 4.4.3-ssv-i7 #ssv
[23771.819108] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[23771.857347] txg_quiesce D ffff8800b83b3d48 0 29465 2 0x00000000
[23771.857353] ffff8800b83b3d48 ffffffff82c22500 ffff8800ba058000 ffff8800b83b4000
[23771.857356] ffff880bdf3b0918 ffff880bdf3b09e8 ffff880bdf3b0940 0000000000000000
[23771.857358] ffff8800b83b3d60 ffffffff827b9955 ffff880bdf3b09e0 ffff8800b83b3dc0
[23771.857361] Call Trace:
[23771.857370] [<ffffffff827b9955>] schedule+0x35/0x80
[23771.857383] [<ffffffffc009a16d>] cv_wait_common+0xed/0x120 [spl]
[23771.857388] [<ffffffff820bc5f0>] ? prepare_to_wait_event+0xf0/0xf0
[23771.857409] [<ffffffffc009a1b5>] __cv_wait+0x15/0x20 [spl]
[23771.857478] [<ffffffffc045d21e>] txg_quiesce_thread+0x2ce/0x3e0 [zfs]
[23771.857528] [<ffffffffc045cf50>] ? txg_delay+0x160/0x160 [zfs]
[23771.857536] [<ffffffffc00952f1>] thread_generic_wrapper+0x71/0x80 [spl]
[23771.857543] [<ffffffffc0095280>] ? __thread_exit+0x20/0x20 [spl]
[23771.857546] [<ffffffff82096f69>] kthread+0xc9/0xe0
[23771.857548] [<ffffffff82096ea0>] ? kthread_park+0x60/0x60
[23771.857552] [<ffffffff827bd78f>] ret_from_fork+0x3f/0x70
[23771.857554] [<ffffffff82096ea0>] ? kthread_park+0x60/0x60
Last time i ran into this, i was able to install upstream ZFS (without ABD) and it replayed the ZIL over ~4 hours or so. This was after several import attempts, so not sure if the upstream version had anything to do with success or that the pool was just able to replay enough data to work again.
@dweeezil: All of these bugs seem to end up in cv_wait_common to schedule, directly after which cv_wait_common has this pleasant commented snippet in it. If i'm reading the stack trace correctly, schedule doesn't return, but we've already dropped the mutex (mp), and can potentially have the race condition start during the evaluation of the conditional after line 105 (if there are other threads contending for the same resources). Any validity to this or am i looking down the wrong rabbit hole?
105 mutex_exit(mp);
106 if (io)
107 io_schedule();
108 else
109 schedule();
110
111 /* No more waiters a different mutex could be used */
112 if (atomic_dec_and_test(&cvp->cv_waiters)) {
113 /*
114 * This is set without any lock, so it's racy. But this is
115 * just for debug anyway, so make it best-effort
116 */
117 cvp->cv_mutex = NULL;
118 wake_up(&cvp->cv_destroy);
119 }
Any chance that the "racy condition" is in play here? I believe i saw the actual wake_up ca
While running burn-in tests on a recent build at the datacenter we found that our test loop, which iterates over ZVOLs with single depth synchronous IOs from FIO, can apparently still come up with the txg_quiesce_thread problem, but only when we're toggling ARC settings on the parent dataset between runs. The tests are each 5m of 8 threads doing sync read, random read, sync write, random write, and then a mix of random r/w. Its pretty abusive, and since we started using @DeHackEd's BE5 branch as a base for the build it's been very resistant to crashes of his nature under these conditions.
Disabling spl_taskq_thread_dynamic seems to either fix this, or bury it deeper than our current test pattern shows. The other interesting note is that this seems to occur on RAIDZ2 pools, entirely of SSD, while an all spinner 5-way mirror does not exhibit the behavior.
The zvol_request -> zfs_range_lock -> die_in_scheduling thing has come up before, and is easier to induce on smaller block sized ZVOLs - this happened @ volblocksize=4k while FIO was running 8 threads of blocksize=8k, direct=1, iodepth=1 directly on three ZVOLs in the same pool. This same system has passed this same test multiple times, even with spl_taskq_thread_dynamic=1, though has never failed wit spl_taskq_thread_dynamic=0 (which is how we still run production).
To narrow this down, the test stack which produced the following stack trace consisted of:
The resulting output to dmesg is:
The kernel version used here uses BFQ for IO scheduling, but without the BFS CPU scheduler. ZFS is atop dm-crypt in both pools, all disks are on identical SAS HBAs. All VDEVs are ashift=12 according to zdb.