[Bug 776052] New: xorg-x11-server ends in endless loop when blocked client disconnects
https://bugzilla.novell.com/show_bug.cgi?id=776052 https://bugzilla.novell.com/show_bug.cgi?id=776052#c0 Summary: xorg-x11-server ends in endless loop when blocked client disconnects Classification: openSUSE Product: openSUSE 12.2 Version: RC 1 Platform: Other OS/Version: Other Status: NEW Severity: Major Priority: P5 - None Component: X.Org AssignedTo: bnc-team-xorg-bugs@forge.provo.novell.com ReportedBy: dmueller@suse.com QAContact: xorg-maintainer-bugs@forge.provo.novell.com Found By: --- Blocker: --- Hi, strace shows something like: select(256, [1 3 9 10], [26], NULL, {0, 0}) = -1 EBADF (Bad file descriptor) select(30, [29], NULL, NULL, {0, 0}) = 0 (Timeout) select(256, [1 3 9 10], [26], NULL, {0, 0}) = -1 EBADF (Bad file descriptor) select(30, [29], NULL, NULL, {0, 0}) = 0 (Timeout) select(256, [1 3 9 10], [26], NULL, {0, 0}) = -1 EBADF (Bad file descriptor) select(30, [29], NULL, NULL, {0, 0}) = 0 (Timeout) select(256, [1 3 9 10], [26], NULL, {0, 0}) = -1 EBADF (Bad file descriptor) select(30, [29], NULL, NULL, {0, 0}) = 0 (Timeout) select(256, [1 3 9 10], [26], NULL, {0, 0}) = -1 EBADF (Bad file descriptor) select(30, [29], NULL, NULL, {0, 0}) = 0 (Timeout) select(256, [1 3 9 10], [26], NULL, {0, 0}) = -1 EBADF (Bad file descriptor) select(30, [29], NULL, NULL, {0, 0}) = 0 (Timeout) which means that [26] is the bad filedescriptor that disconnected. the code where it starves is here: os/WaitFor.c: else if (AnyClientsWriteBlocked) { XFD_COPYSET(&ClientsWriteBlocked, &clientsWritable); i = Select(MaxClients, &LastSelectMask, &clientsWritable, NULL, wt); } ... if (i < 0) { if (selecterr == EBADF) { /* Some client disconnected */ CheckConnections(); if (!XFD_ANYSET(&AllClients)) the problem here is that if a client is blocked, it adds it to the Writeable select mask. In my case the client is not part of AllClients anymore, CheckConnections() doesn't do anything because it only checks that fd 29 still exists, while fd 26 is actually gone. there are multiple ways to fix it: either make CheckConnections aware also of WriteBlocked Clients or remove WriteBlocked clients from the IgnoreClient() call (which I assume is the cause for the AllClients/WriteBlocked clients mismatch) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=776052
https://bugzilla.novell.com/show_bug.cgi?id=776052#c
Stefan Dirsch
https://bugzilla.novell.com/show_bug.cgi?id=776052
https://bugzilla.novell.com/show_bug.cgi?id=776052#c
Michal Srb
https://bugzilla.novell.com/show_bug.cgi?id=776052
https://bugzilla.novell.com/show_bug.cgi?id=776052#c1
Michal Srb
https://bugzilla.novell.com/show_bug.cgi?id=776052
https://bugzilla.novell.com/show_bug.cgi?id=776052#c2
Dirk Mueller
https://bugzilla.novell.com/show_bug.cgi?id=776052
https://bugzilla.novell.com/show_bug.cgi?id=776052#c4
Stefan Dirsch
participants (1)
-
bugzilla_noreply@novell.com