[Bug 60097] New: wineserver hangs with Assertion failed: (info->count), function enum_tcp_connections, file sock.c
http://bugs.winehq.org/show_bug.cgi?id=60097 Bug ID: 60097 Summary: wineserver hangs with Assertion failed: (info->count), function enum_tcp_connections, file sock.c Product: Wine Version: unspecified Hardware: aarch64 OS: MacOS Status: UNCONFIRMED Severity: normal Priority: P2 Component: wineserver Assignee: wine-bugs@list.winehq.org Reporter: fanoush@gmail.com Target Milestone: --- I run wine-stable from homewbrew and I use it to run Telerik Fiddler Classic (.NET application). This mostly works fine except it randomly freezes with error "Assertion failed: (info->count), function enum_tcp_connections, file sock.c, line 4327." Then Fiddler hangs completely and I need to kill everything via killall -m "wine*" and killall -9 -m "wine*" and then run Activity Monitor and force kill the last wine process to recover. It happens randomly, sometimes right after I start Fiddler but mostly it runs for hours or even days just fine until this happens. I checked the source and it happens here https://github.com/wine-mirror/wine/blob/stable/server/sock.c#L4327 This method is called from here https://github.com/wine-mirror/wine/blob/stable/server/sock.c#L4372 and here https://github.com/wine-mirror/wine/blob/stable/server/sock.c#L4380 I think it happens in the second place (as the conn needs to be set to reach that assert) and it can trigger when the first pass sets info.count to zero Not sure why this happens only in my case but in theory info.count being 0 in first pass is valid so the second usage could/should be run only if info.count from first pass is not zero? Unfortunately I don't know how to rebuild wine from source on my macbook to create patch and verify the fix. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60097 --- Comment #1 from Ken Sharp <imwellcushtymelike@gmail.com> --- What version of Wine? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60097 --- Comment #2 from fanoush <fanoush@gmail.com> --- It is wine-stable, wine --version gives only "wine-11.0", the 4327 line number from assert error matches the stable branch exactly as linked to github mirror in my first comment. I have now checked also master branch and the same code is still there, the last change that modified that code is https://github.com/wine-mirror/wine/commit/9085bc7b87f31ab49dee3a3541aefdae3... I guess that there should be another check after this one https://github.com/wine-mirror/wine/blob/master/server/sock.c#L4321 ``` if (max_conns < info.count) set_error( STATUS_BUFFER_TOO_SMALL ); ``` to check also for info.count being zero and do not call the enum_tcp_connections again in that case. I am using wine only to run Fiddler - it is http web proxy with https decryption so it is quite heavily using tcp connections but it it can also happen that in quiet periods there are no connections or perhaps all sockets are of different type than counted in the first pass of enum_tcp_connections so it happens that the count is zero (??) -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60097 --- Comment #3 from fanoush <fanoush@gmail.com> --- (In reply to fanoush from comment #2)
I guess that there should be another check after this one https://github.com/wine-mirror/wine/blob/master/server/sock.c#L4321 ``` if (max_conns < info.count) set_error( STATUS_BUFFER_TOO_SMALL ); ``` to check also for info.count being zero and do not call the enum_tcp_connections again in that case.
because set_reply_data_size will happily accept zero count and return some pointer https://github.com/wine-mirror/wine/blob/master/server/request.c#L137 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60097 --- Comment #4 from fanoush <fanoush@gmail.com> --- just a folowup, I moved to wine@devel which is latest 11.14 and I also managed to recompile wine 11.14 in macos and have patch prepared but I am waiting for reproducing it on 11.14 first, it did not happen yet. As I previously reported sometimes it could work for days before it is triggered so I'll wait for that and then try patched version (and wait again). For now the patch is adding the extra test like
if (!info.count) fprintf(stderr,"info count is zero!"; else if (max_conns < info.count) set_error( STATUS_BUFFER_TOO_SMALL );
so the second enumeration is not done. But I think the set_reply_data_size possibly not returning NULL pointer if size is 0 is unfortunate and may produce more bugs like this as I found patterns like https://github.com/wine-mirror/wine/blob/master/server/directory.c#L564 which may do same wrong thing when size is 0 for some reason and returned pointer is not null. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60097 fanoush <fanoush@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |11.14 --- Comment #5 from fanoush <fanoush@gmail.com> --- Ok so today it happened on 11.14 version too
0180:fixme:thread:NtQueryInformationThread ThreadIsIoPending info class not supported yet 0460:fixme:thread:NtQueryInformationThread ThreadIsIoPending info class not supported yet 0674:fixme:cryptnet:check_ocsp_response_info check responder id 0674:fixme:cryptnet:check_ocsp_response_info check responder id Assertion failed: (info->count), function enum_tcp_connections, file sock.c, line 4270.
so took 3 days of having it runing, now I replaced wineserver with patched one and will wait for the "info count is zero!" message and see whether it still works just fine after that -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla