http://bugs.winehq.org/show_bug.cgi?id=25301
Summary: Occasional sock_check_pollhup() error on Solaris Product: Wine Version: 1.3.7 Platform: x86 OS/Version: Solaris Status: NEW Severity: normal Priority: P2 Component: wineserver AssignedTo: wine-bugs@winehq.org ReportedBy: fgouget@codeweavers.com
Created an attachment (id=32142) --> (http://bugs.winehq.org/attachment.cgi?id=32142) Additional sock_check_pollhup() traces
On Solaris 10u5 I would sometimes get the following error:
sock_init: ERROR in sock_check_pollhup()
Apparently I'm not the only one since it's present in the log of bug 18334 (although that bug is about something else entirely).
I have now found a way to reliably reproduce it on my system which is to run the following WineLib command:
./wine memtest.exe.so mmap 50 100
Of course make sure that the wine server is not running yet.
The purpose of sock_check_pollhup() is to figure out what poll() does when a socket is closed. The error happens because the poll() call that immediately follows a shutdown() call returns no event.
I then discovered that giving poll() a 1ms timeout fixes this problem although it still runs in 0.014 to 0.046ms.
Note that strictly speaking poll() is allowed to return nothing when given a 0ms timeout: 'if timeout is 0, poll() returns immediately', which it does. Still it's annoying and could well be considered a poll() bug.
The workaround seems ok though, especially since this is in code that's only invoked at startup.
http://bugs.winehq.org/show_bug.cgi?id=25301
--- Comment #1 from François Gouget fgouget@codeweavers.com 2010-11-26 10:54:15 CST --- Created an attachment (id=32143) --> (http://bugs.winehq.org/attachment.cgi?id=32143) memtest source
See the compilation instructions in memtest.c to produce a WineLib executable.
http://bugs.winehq.org/show_bug.cgi?id=25301
--- Comment #2 from François Gouget fgouget@codeweavers.com 2010-11-26 11:20:58 CST --- Created an attachment (id=32144) --> (http://bugs.winehq.org/attachment.cgi?id=32144) Add 1ms timeout
Sent to wine-patches: http://www.winehq.org/pipermail/wine-patches/2010-November/096213.html
http://bugs.winehq.org/show_bug.cgi?id=25301
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #3 from François Gouget fgouget@codeweavers.com 2010-12-11 07:37:08 CST --- This got committed so this is fixed.
commit c4c03180b0868fe93de4a5ccf52ba76bb00ffcab Author: Francois Gouget fgouget@free.fr Date: Fri Nov 26 18:08:30 2010 +0100
server: Make sock_check_pollhup() more reliable on Solaris.
http://bugs.winehq.org/show_bug.cgi?id=25301
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #4 from Alexandre Julliard julliard@winehq.org 2010-12-24 13:13:43 CST --- Closing bugs fixed in 1.3.10.
http://bugs.winehq.org/show_bug.cgi?id=25301
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |1.2.x
http://bugs.winehq.org/show_bug.cgi?id=25301
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|1.2.x |---