http://bugs.winehq.org/show_bug.cgi?id=19406
Summary: winhttp:WinHttpSetTimeouts resolve and connect timeout not supported Product: Wine Version: 1.1.26 Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winhttp AssignedTo: wine-bugs@winehq.org ReportedBy: kejly@kejly.cz
When playing "Battlefield heroes" game with Wine 1.1.26, after logging into "Mozilla Firefox" and starting game, it can't connect to game server, wine fills log with: fixme:winhttp:WinHttpSetTimeouts resolve and connect timeout not supported
This was working with Wine 1.1.25, see attached logs from working wine 1.1.25 and broken Wine 1.1.26.
http://bugs.winehq.org/show_bug.cgi?id=19406
--- Comment #1 from David Kejzlar kejly@kejly.cz 2009-07-21 10:49:00 --- Created an attachment (id=22502) --> (http://bugs.winehq.org/attachment.cgi?id=22502) Log of working game login in Wine 1.1.25
http://bugs.winehq.org/show_bug.cgi?id=19406
--- Comment #2 from Juan Lang juan_lang@yahoo.com 2009-07-21 10:55:00 --- Please perform a regression test: http://wiki.winehq.org/RegressionTesting
http://bugs.winehq.org/show_bug.cgi?id=19406
--- Comment #3 from David Kejzlar kejly@kejly.cz 2009-07-21 10:55:45 --- Created an attachment (id=22503) --> (http://bugs.winehq.org/attachment.cgi?id=22503) Log of broken game login in Wine 1.1.26
http://bugs.winehq.org/show_bug.cgi?id=19406
--- Comment #4 from Juan Lang juan_lang@yahoo.com 2009-07-21 10:58:07 --- Actually, please attach a +winhttp log, as this is almost certainly the patch that caused the regression: http://source.winehq.org/git/wine.git/?a=commit;h=9d9c505a273edbb79ce7dc60a3...
http://bugs.winehq.org/show_bug.cgi?id=19406
--- Comment #5 from David Kejzlar kejly@kejly.cz 2009-07-21 11:01:35 --- (In reply to comment #4)
Actually, please attach a +winhttp log, as this is almost certainly the patch that caused the regression: http://source.winehq.org/git/wine.git/?a=commit;h=9d9c505a273edbb79ce7dc60a3...
Sorry, I forgot to write it in report, but both attachments are logged with +winhttp, WINEDEBUG=+winhttp wine firefox.exe I will try regression test now.
http://bugs.winehq.org/show_bug.cgi?id=19406
--- Comment #6 from Juan Lang juan_lang@yahoo.com 2009-07-21 12:14:26 --- (In reply to comment #5)
Sorry, I forgot to write it in report, but both attachments are logged with +winhttp, WINEDEBUG=+winhttp wine firefox.exe
Okay, I'll have a look. You really should attach the log here rather than pasting a URL to one, the URL is likely to die at some point, which makes it not very useful for bug tracking.
I will try regression test now.
Like I said, don't bother: I'm certain the commit I mentioned caused it, as it's been the only change to that function.
http://bugs.winehq.org/show_bug.cgi?id=19406
--- Comment #7 from David Kejzlar kejly@kejly.cz 2009-07-21 12:27:49 --- (In reply to comment #6)
(In reply to comment #5)
Sorry, I forgot to write it in report, but both attachments are logged with +winhttp, WINEDEBUG=+winhttp wine firefox.exe
Okay, I'll have a look. You really should attach the log here rather than pasting a URL to one, the URL is likely to die at some point, which makes it not very useful for bug tracking.
I will try regression test now.
Like I said, don't bother: I'm certain the commit I mentioned caused it, as it's been the only change to that function.
Sorry for the log, it was too big to post. Now I've compressed it with rar (not really unixish) and it fits, repost.
http://bugs.winehq.org/show_bug.cgi?id=19406
David Kejzlar kejly@kejly.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #22503|0 |1 is obsolete| |
--- Comment #8 from David Kejzlar kejly@kejly.cz 2009-07-21 12:29:33 --- Created an attachment (id=22506) --> (http://bugs.winehq.org/attachment.cgi?id=22506) Log of broken game login in Wine 1.1.26, attached to thread
http://bugs.winehq.org/show_bug.cgi?id=19406
--- Comment #9 from Juan Lang juan_lang@yahoo.com 2009-07-21 12:30:10 ---
From the failing log:
trace:winhttp:WinHttpSetTimeouts 0x3, 0, 60000, 30000, 30000 fixme:winhttp:WinHttpSetTimeouts resolve and connect timeout not supported trace:winhttp:addref_object 0x81ab4f8 -> refcount = 2 trace:winhttp:grab_object handle 0x3 -> 0x81ab4f8 warn:winhttp:netconn_set_timeout setsockopt failed (Chybný popisovač souboru) warn:winhttp:netconn_set_timeout setsockopt failed (Chybný popisovač souboru)
And, from winhttp/session.c: if (netconn_set_timeout( &request->netconn, TRUE, send )) ret = FALSE; (snip) return ret;
So I'd say the failing setsockopt is the issue. Google tells me "Chybný popisovač souboru" is "Bad file descriptor" in English.
Looking further at the log, the handle passed to WinHttpSetTimeouts is 0x3. It's created with WinHttpOpenRequest:
trace:winhttp:WinHttpOpenRequest 0x2, L"GET", L"/nucleus/authToken", (null), (null), (nil), 0x00800100 (snip) trace:winhttp:WinHttpOpenRequest returning 0x3
Note that the flags include WINHTTP_FLAG_SECURE (0x00800000). Looking at WinHttpOpenRequest,
if (!netconn_init( &request->netconn, request->hdr.flags & WINHTTP_FLAG_SECURE )) goto end;
That is, it calls netconn_init, with secure = TRUE since WINHTTP_FLAG_SECURE was set. From net.c:
BOOL netconn_init( netconn_t *conn, BOOL secure ) { conn->socket = -1; if (!secure) return TRUE;
#if defined(SONAME_LIBSSL) && defined(SONAME_LIBCRYPTO) if (libssl_handle) return TRUE;
So, conn->socket is currently set to -1, so setsockopt will fail. I'd guess that WinHttpSetTimeouts should still succeed in this case, perhaps by storing the timeouts and calling setsockopt when the connection is actually created.
http://bugs.winehq.org/show_bug.cgi?id=19406
--- Comment #10 from David Kejzlar kejly@kejly.cz 2009-07-21 12:40:16 --- (In reply to comment #8)
Created an attachment (id=22506)
--> (http://bugs.winehq.org/attachment.cgi?id=22506) [details]
Log of broken game login in Wine 1.1.26, attached to thread
Good, that you've found it, I don't understand a word in your explanation, I'm just bfu. Sorry for the czech descriptor, but google always helps. So I'm finish with the report, when regression test isn't needed. Thanks best regards David
http://bugs.winehq.org/show_bug.cgi?id=19406
--- Comment #11 from Juan Lang juan_lang@yahoo.com 2009-07-21 12:42:19 --- Created an attachment (id=22507) --> (http://bugs.winehq.org/attachment.cgi?id=22507) Patch
Does this patch help?
http://bugs.winehq.org/show_bug.cgi?id=19406
Juan Lang juan_lang@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |juan_lang@yahoo.com
http://bugs.winehq.org/show_bug.cgi?id=19406
--- Comment #12 from David Kejzlar kejly@kejly.cz 2009-07-21 15:15:45 --- (In reply to comment #11)
Created an attachment (id=22507)
--> (http://bugs.winehq.org/attachment.cgi?id=22507) [details]
Patch
Does this patch help?
I'm unable to install Wine from source (git or 1.1.26), installation works but no programs can be started in Wine, so I can't test it. Sorry.
http://bugs.winehq.org/show_bug.cgi?id=19406
Juan Lang juan_lang@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
--- Comment #13 from Juan Lang juan_lang@yahoo.com 2009-07-21 17:01:24 --- (In reply to comment #12)
I'm unable to install Wine from source (git or 1.1.26), installation works but no programs can be started in Wine, so I can't test it. Sorry.
Okay, I'm going to have to hope they work then, since I don't have the game to test with. Patches sent: http://www.winehq.org/pipermail/wine-patches/2009-July/076227.html http://www.winehq.org/pipermail/wine-patches/2009-July/076228.html http://www.winehq.org/pipermail/wine-patches/2009-July/076229.html http://www.winehq.org/pipermail/wine-patches/2009-July/076230.html http://www.winehq.org/pipermail/wine-patches/2009-July/076231.html http://www.winehq.org/pipermail/wine-patches/2009-July/076232.html
http://bugs.winehq.org/show_bug.cgi?id=19406
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression Summary|winhttp:WinHttpSetTimeouts |Battlefield heroes - can't |resolve and connect timeout |connect to game server |not supported |
http://bugs.winehq.org/show_bug.cgi?id=19406
Juan Lang juan_lang@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #14 from Juan Lang juan_lang@yahoo.com 2009-07-22 10:43:51 --- This should be fixed with today's git. Feel free to reopen if it doesn't work for you with 1.1.27.
http://bugs.winehq.org/show_bug.cgi?id=19406
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #15 from Alexandre Julliard julliard@winehq.org 2009-08-07 12:58:58 --- Closing bugs fixed in 1.1.27.