Skip to content
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

Potential txg_sync deadlock from sleeping in arc.c while holding a hash_lock #4040

Closed
ryao opened this issue Nov 23, 2015 · 1 comment
Closed

Comments

@ryao
Copy link
Contributor

ryao commented Nov 23, 2015

The backtraces in #3835 make it look like something is holding the hash lock, which the txg_sync thread needs. The code for arc_read() is such that it is possible for us to sleep because we call kmem_zalloc(sizeof (arc_callback_t), KM_SLEEP) while holding the hash_lock. I do not know offhand if this would print to dmesg (as not all sleeps do), but this is not the only instance of a sleep while holding the hash_lock. arc_buf_clone() is also called under the hash_lock and it does a kmem_cache_alloc(buf_cache, KM_PUSHPAGE), which admittedly, is not quite as bad, but it illustrates that we have other potential places where we can sleep. Given that the hash_lock is just supposed to protect insertion, I think we could switch to finer grained locking.

I will be working on this more as I find time. I am opining this issue for opinions from others regarding this.

@gmelikov
Copy link
Member

#3835 is resolved now, i think we can close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants