-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deadlock from racing between zpool export and zvol create #5195
Comments
It looks to me that the two threads trying to lock the namespace above are blocked on the third thread that has locked the namespace and waiting for the taskq to complete outstanding tasks. |
@tuxoko |
@bprotopopov I'm not exactly sure if this race is still possible, I just tried to reproduce it with the above command but haven't succeeded yet. |
Hi, @tuxoko, thanks for pointing this out. This might not be easy to reproduce; the issue has been discussed (see the discussion about The destruction of the taskq was deferred to spa_deactivate() because taskq creation is handled by spa_activate(). I guess I'll have to think more about ways to close the race window you pointed out. |
I have looked into this a bit and tried to address this by adding suspend/resume functionality to the the
while
and
It is as if the |
Closing, I believe this issue was resolved @bprotopopov's zvol refactoring. |
Discovered from buildbot
http://build.zfsonlinux.org/builders/Amazon%202015.09%20x86_64%20%28TEST%29/builds/2839/steps/shell_12/logs/console
This can be reproduced easily with running these two concurrently
while :; do zpool import pp; zpool export pp; done
while :; do zfs create -sV 8G pp/vol0; zfs destroy pp/vol0; done
The text was updated successfully, but these errors were encountered: