Repository navigation
drivers(xenstore): don't deliver user replies under msgbuffer_mutex - #118
Merged
Merged
Conversation
…cross synchronous register calls
bleggett
requested review from
antoineco,
azenla,
kaniini,
sveith and
tycho
as code owners
November 18, 2026 22:53
azenla
approved these changes
Nov 19, 2026
Open
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found this in some random e2e failures that happened after I added some xenstore restart tests.
See attached sysrq stack captured during the hang.
guest-sysrq-w.txt
Seems like the guest kernel's xenbus thread is stuck waiting for a lock, so no xenstore replies reach the guest after this point.
The lock involved, from what I can tell, is
u->msgbuffer_mutexindrivers/xen/xenbus/xenbus_dev_frontend.c:reply (unregister_xenbus_watch at line 535 -> xs_talkv).
earlier request on the same fd.
So if a fd still has a request waiting for its reply when it gets an UNWATCH, the UNWATCH holds the lock and waits for the xenbus thread. The xenbus thread waits for the lock, and at this point the whole guest xenstore connection stops.
Submitted upstream: https://lore.kernel.org/lkml/20261118-bleggett-xenbus-transactions-mutex-v1-1-6669e3f54955@edera.io/