Skip to contentSkip to conversation

xenbus_transaction_end() and EAGAIN

DISCUSSION John Levon 2 participants 3 messages Oct 4, 2006

lore
Share & tools
lore

John Levon

author
#0 lore raw

I've just observed some very odd behaviour in our (essentially identical to Linux's) xen_shutdown_handler():

xm save johnlev /var/tmp/img
xen_shutdown_handler: "suspend"
xen_shutdown_handler: ""

The first is the watch asking us to suspend. Then we get an EAGAIN and loop around to try again, but this time the node is rewritten to be "", as we requested via xenbus_write(). As far as I can see it shouldn't be possible for our xenbus_write("") to have succeeded as part of the failed transaction. Is it possible the EAGAIN is coming from the higher levels somehow, rather than do_transaction_end() ?

Unfortunately I didn't have tracing on and have only ever reproduced this once, so can't provide any more detail.

regards
john

#1 lore raw
Quoted 6 lines · John Levon

The first is the watch asking us to suspend. Then we get an EAGAIN and loop around to try again, but this time the node is rewritten to be "", as we requested via xenbus_write(). As far as I can see it shouldn't be possible for our xenbus_write("") to have succeeded as part of the failed transaction. Is it possible the EAGAIN is coming from the higher levels somehow, rather than do_transaction_end() ?

No, the writes should be discarded of course. If xenstored ever returns EAGAIN it should mean that the transaction was discarded and not committed in part or whole. Could EAGAIN be coming from the xenbus layers in your guest OS?

-- Keir

author
#2 lore raw
Quoted 8 lines · Keir Fraser
Quoted 6 lines

The first is the watch asking us to suspend. Then we get an EAGAIN and loop around to try again, but this time the node is rewritten to be "", as we requested via xenbus_write(). As far as I can see it shouldn't be possible for our xenbus_write("") to have succeeded as part of the failed transaction. Is it possible the EAGAIN is coming from the higher levels somehow, rather than do_transaction_end() ?

No, the writes should be discarded of course.

Indeed.

Quoted 1 line

Could EAGAIN be coming from the xenbus layers in your guest OS?

I certainly can't see any path right now. I'm trying to reproduce again to confirm what's happening...

regards
john