Page MenuHomeFreeBSD

g_mirror_taste: avoid deadlock, always clear tasting flag
ClosedPublic

Authored by rlibby on Jun 24 2019, 4:33 PM.
Tags
None
Referenced Files
F107170095: D20744.diff
Sat, Jan 11, 4:53 AM
Unknown Object (File)
Wed, Jan 8, 1:13 AM
Unknown Object (File)
Mon, Dec 16, 7:24 AM
Unknown Object (File)
Nov 7 2024, 8:53 PM
Unknown Object (File)
Sep 20 2024, 5:58 AM
Unknown Object (File)
Sep 19 2024, 2:48 PM
Unknown Object (File)
Sep 8 2024, 10:07 PM
Unknown Object (File)
Sep 4 2024, 8:50 PM
Subscribers

Details

Summary

If g_mirror_taste encountered an error at g_mirror_add_disk, it might
try to g_mirror_destroy the device with the G_MIRROR_DEVICE_FLAG_TASTING
flag still set. This would wait on a worker to complete the destruction
with g_mirror_try_destroy, but that function bails out if the tasting
flag is set, resulting in a deadlock. Clear the tasting flag before
trying to destroy the device.

Sponsored by: Dell EMC Isilon

Test Plan

sysctl debug.fail_point.mnowait="1%return"
kyua test -k /usr/tests/sys/geom/class/mirror/Kyuafile

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 25007
Build 23722: arc lint + arc unit

Event Timeline

As a precaution I'd suggest running the tests under /usr/tests/sys/geom/class/mirror.

This revision is now accepted and ready to land.Jun 24 2019, 6:16 PM

As a precaution I'd suggest running the tests under /usr/tests/sys/geom/class/mirror.

Yes, I believe that is what the kyua line above does (and that's how I found this). Or does that run only a subset of tests?

As a precaution I'd suggest running the tests under /usr/tests/sys/geom/class/mirror.

Yes, I believe that is what the kyua line above does (and that's how I found this). Or does that run only a subset of tests?

Oops, I missed that. No, what you did should run all of the tests.