|
|
|
|
|
|
|
|
|
|
xen-bugs
[Xen-bugs] [Bug 968] New: xenstored spinning after EOF
http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=968
Summary: xenstored spinning after EOF
Product: Xen
Version: 3.0.4
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Tools
AssignedTo: xen-bugs@xxxxxxxxxxxxxxxxxxx
ReportedBy: peak@xxxxxxxxxxxxxxxxxxxxxx
The following piece of code in handle_input() in
tools/xenstore/xenstored_core.c reads bodies of incoming messages:
bytes = conn->read(conn, in->buffer + in->used,
in->hdr.msg.len - in->used);
if (bytes < 0)
goto bad_client;
When a socket connection is broken in the middle of a message body,
conn->read() gets an EOF and returns 0. handle_input() does not kill the
connection and returns to the main loop as if it has been an ordinary
successful partial read. select() in the main loop exits immediately because a
fd is always ready for reading after EOF and calls handle_input() again,
conn->read() returns 0 again, and everything is repeated over and over and...
xenstored starts spinning in the main loop without any sleeping and keeps
spinning until you kill it. Moreover, other socket connections, esp. newly
created, may starve because the illusionary activity of the broken one makes
the main loop skip them.
How to reproduce: kill a xenstore client (e.g. xenstore-ls) while it transmits
message body to xenstored.
Proposed fix: replace (bytes < 0) with (bytes <= 0).
--
Configure bugmail:
http://bugzilla.xensource.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
_______________________________________________
Xen-bugs mailing list
Xen-bugs@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-bugs
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-bugs] [Bug 968] New: xenstored spinning after EOF,
bugzilla-daemon <=
|
|
|
|
|