http://bugs.winehq.org/show_bug.cgi?id=18364
Summary: utorrent with an https tracker url stops working Product: Wine Version: 1.1.20 Platform: Other OS/Version: other Status: UNCONFIRMED Severity: major Priority: P2 Component: crypt32 AssignedTo: wine-bugs@winehq.org ReportedBy: howl.nsp@gmail.com
Created an attachment (id=20926) --> (http://bugs.winehq.org/attachment.cgi?id=20926) utorrent dump files with .19 and .20 wine
uTorrent 1.8.x crashes after time running when at least one torrent with an https url tracker is on it. The program tray icon stays and if you double click on it the window program is shown but it doesn't paint anything. Also the bittorrent connections stops to work.
http://bugs.winehq.org/show_bug.cgi?id=18364
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|major |normal Component|crypt32 |-unknown
--- Comment #1 from Vitaliy Margolen vitaliy@kievinfo.com 2009-05-05 10:18:34 --- Attachments are useless. Please include complete backtraces as produced with Wine.
Not major - http://bugs.winehq.org/page.cgi?id=fields.html#bug_severity
http://bugs.winehq.org/show_bug.cgi?id=18364
Simón simonbcn@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |simonbcn@gmail.com
--- Comment #2 from Simón simonbcn@gmail.com 2009-05-05 17:55:15 --- Same problem with wine 1.1.19 with µTorrent 1.8.2 under ubuntu 8.04 64 bits.
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #3 from Simón simonbcn@gmail.com 2009-05-05 18:10:38 --- How can I obtain these "complete backtraces"? Thanks.
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #4 from Juan Lang juan_lang@yahoo.com 2009-05-05 19:07:00 --- With any luck, they'll be on the command line. Please attach as a text file the entire console output from running utorrent. If these aren't useful, we may ask for additional debugging info.
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #5 from David Santamaría Rogado howl.nsp@gmail.com 2009-05-06 06:55:53 --- Created an attachment (id=20938) --> (http://bugs.winehq.org/attachment.cgi?id=20938) Backtrace of the problem
Here you have the backtrace and a little more output.
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #6 from Juan Lang juan_lang@yahoo.com 2009-05-06 10:42:00 --- Lots going on in that log. I'll focus on the crash, as the rest might be extraneous:
*** glibc detected *** ./Link to utorrent182.exe: double free or corruption (!prev): 0x7c0e20f0 *** ======= Backtrace: ========= /lib/tls/i686/cmov/libc.so.6[0xb7ddd454] /lib/tls/i686/cmov/libc.so.6(cfree+0x96)[0xb7ddf4b6] /usr/lib/i686/cmov/libcrypto.so.0.9.8(CRYPTO_free+0x3a)[0x7db2e68a] /usr/lib/i686/cmov/libcrypto.so.0.9.8(ERR_clear_error+0x5d8)[0x7dba0958] /usr/lib/i686/cmov/libcrypto.so.0.9.8(X509_STORE_set_default_paths+0x95)[0x7dbcf4b5] /usr/lib/i686/cmov/libssl.so.0.9.8(SSL_CTX_set_default_verify_paths+0x20)[0x7dc6b970] /usr/bin/../lib/wine/wininet.dll.so(NETCON_secure_connect+0x8e)[0x7dd523ee] /usr/bin/../lib/wine/wininet.dll.so(HTTP_HttpSendRequestW+0x19dc)[0x7dd45ffc]
I have to ask: did you build a 64-bit version of Wine to run a 64-bit version of uTorrent? If you're running the 32-bit version of Wine and the 32-bit version of uTorrent, it looks as though you've loaded the 64-bit version of OpenSSL (or GnuTLS or whatever's providing libcrypto.so.) That can't work. See http://wiki.winehq.org/WineOn64bit#head-7703cf4cc6b63630523cf66e77d621e4f81b...
http://bugs.winehq.org/show_bug.cgi?id=18364
Xavier xcarles@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #7 from Xavier xcarles@gmail.com 2009-05-06 13:35:23 --- *** This bug has been confirmed by popular vote. ***
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #8 from Simón simonbcn@gmail.com 2009-05-07 06:45:54 --- The problem occurs on Ubuntu 32-bit and 64-bit version.
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #9 from Simón simonbcn@gmail.com 2009-05-07 06:48:27 --- The installed versions of wine are those of your official repositories.
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #10 from Simón simonbcn@gmail.com 2009-05-07 07:20:36 --- The backtrace was obtained in Ubuntu 32-bits version.
http://bugs.winehq.org/show_bug.cgi?id=18364
Math mlafon@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mlafon@gmail.com
--- Comment #11 from Math mlafon@gmail.com 2009-06-22 04:54:24 --- I've got the same problem with IE7 when going to some HTTPS site (especially gmail) and can reproduce it every time.
wine 1.1.21 from http://wine.budgetdedicated.com/archive/index.html Ubuntu 9.04 64bits
--
*** glibc detected *** ~/.wine/drive_c/Program Files/Internet Explorer/iexplore.exe: double free or corruption (!prev): 0x7dbd1840 *** ======= Backtrace: ========= /lib32/libc.so.6[0xf7d71204] /lib32/libc.so.6(cfree+0x96)[0xf7d731e6] /lib32/i686/cmov/libcrypto.so.0.9.8(CRYPTO_free+0x3a)[0x7ca3e68a] /lib32/i686/cmov/libcrypto.so.0.9.8(ERR_clear_error+0x5c0)[0x7cab0950] /lib32/i686/cmov/libcrypto.so.0.9.8(X509_STORE_set_default_paths+0x95)[0x7cadf4c5] /lib32/i686/cmov/libssl.so.0.9.8(SSL_CTX_set_default_verify_paths+0x20)[0x7cb7b970] /usr/bin/../lib32/wine/wininet.dll.so(NETCON_secure_connect+0x8e)[0x7e161cae] /usr/bin/../lib32/wine/wininet.dll.so(HTTP_HttpSendRequestW+0x1a54)[0x7e156874] /usr/bin/../lib32/wine/wininet.dll.so[0x7e156b89] /usr/bin/../lib32/wine/wininet.dll.so[0x7e15c321] /usr/bin/../lib32/wine/ntdll.dll.so[0x7bc780bd] /usr/bin/../lib32/wine/ntdll.dll.so[0x7bc7407e] /usr/bin/../lib32/wine/ntdll.dll.so[0x7bc75ee2] /usr/bin/../lib32/wine/ntdll.dll.so[0x7bc760b0] /lib32/libpthread.so.0[0xf7e6b4ff] /lib32/libc.so.6(clone+0x5e)[0xf7de7b9e]
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #12 from Juan Lang juan_lang@yahoo.com 2009-08-18 12:26:32 --- Created an attachment (id=23167) --> (http://bugs.winehq.org/attachment.cgi?id=23167) Patch: Only initialize SSL_CTX once
Does this patch help?
http://bugs.winehq.org/show_bug.cgi?id=18364
Juan Lang juan_lang@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |juan_lang@yahoo.com
http://bugs.winehq.org/show_bug.cgi?id=18364
Juan Lang juan_lang@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |secur32
--- Comment #13 from Juan Lang juan_lang@yahoo.com 2009-08-24 11:39:23 --- Ping: anyone able to try with this patch?
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #14 from David Santamaría Rogado howl.nsp@gmail.com 2009-08-25 16:48:21 --- (In reply to comment #12)
Created an attachment (id=23167)
--> (http://bugs.winehq.org/attachment.cgi?id=23167) [details]
Patch: Only initialize SSL_CTX once
Does this patch help?
I'm going to try to make a patched package of wine based os the Scott Ritchie's ones for the people I know that use wine+utorrent.
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #15 from David Santamaría Rogado howl.nsp@gmail.com 2009-08-27 14:28:23 --- (In reply to comment #13)
Ping: anyone able to try with this patch?
With the patch there is no report at all with the tracker using https, so no connection is done.
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #16 from Juan Lang juan_lang@yahoo.com 2009-08-27 14:40:05 --- (In reply to comment #15)
With the patch there is no report at all with the tracker using https, so no connection is done.
Please attach a +wininet trace with the patch applied.
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #17 from David Santamaría Rogado howl.nsp@gmail.com 2009-08-27 15:16:20 --- (In reply to comment #16)
(In reply to comment #15)
With the patch there is no report at all with the tracker using https, so no connection is done.
Please attach a +wininet trace with the patch applied.
I don't know how to do.
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #18 from Juan Lang juan_lang@yahoo.com 2009-08-27 15:55:28 --- With the patch applied, run the program (utorrent.exe?) like so: WINEDEBUG=+wininet wine utorrent.exe >& log.txt Then attack log.txt here. If it's too large to attach, compress it first, e.g. using bzip2.
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #19 from David Santamaría Rogado howl.nsp@gmail.com 2009-08-27 19:55:58 --- (In reply to comment #18)
With the patch applied, run the program (utorrent.exe?) like so: WINEDEBUG=+wininet wine utorrent.exe >& log.txt Then attack log.txt here. If it's too large to attach, compress it first, e.g. using bzip2.
Ok, I will try to do it tomorrow.
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #20 from David Santamaría Rogado howl.nsp@gmail.com 2009-08-28 12:05:21 --- Created an attachment (id=23302) --> (http://bugs.winehq.org/attachment.cgi?id=23302) Output of utorrent with no torrents added
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #21 from David Santamaría Rogado howl.nsp@gmail.com 2009-08-28 12:11:01 --- Created an attachment (id=23303) --> (http://bugs.winehq.org/attachment.cgi?id=23303) Ouput with 6 torrent with http tracker added
http://bugs.winehq.org/show_bug.cgi?id=18364
David Santamaría Rogado howl.nsp@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #23303|Ouput with 6 torrent with |Output with 6 torrent with description|http tracker added |http tracker added
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #22 from David Santamaría Rogado howl.nsp@gmail.com 2009-08-28 12:12:48 --- Created an attachment (id=23304) --> (http://bugs.winehq.org/attachment.cgi?id=23304) Output with 6 torrent with httpS tracker added and no crash
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #23 from David Santamaría Rogado howl.nsp@gmail.com 2009-08-28 12:13:44 --- Created an attachment (id=23305) --> (http://bugs.winehq.org/attachment.cgi?id=23305) Backtrace 1
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #24 from David Santamaría Rogado howl.nsp@gmail.com 2009-08-28 12:14:34 --- Created an attachment (id=23306) --> (http://bugs.winehq.org/attachment.cgi?id=23306) Backtrace 2
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #25 from David Santamaría Rogado howl.nsp@gmail.com 2009-08-28 12:15:16 --- Created an attachment (id=23307) --> (http://bugs.winehq.org/attachment.cgi?id=23307) Backtrace 3
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #26 from David Santamaría Rogado howl.nsp@gmail.com 2009-08-28 12:15:59 --- Created an attachment (id=23308) --> (http://bugs.winehq.org/attachment.cgi?id=23308) Backtrace 4
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #27 from David Santamaría Rogado howl.nsp@gmail.com 2009-08-28 12:25:19 --- I have tested wine with the patch in my own machine and it can connect, so the no connection at all seems to be another problem of the other machine.
I have added some files, with the result of executing utorrent in wine 1.0.28 with the patch added. They are the result of just starting utorrent different times.
The firsts three are outputs of the program normal execution with no torrents added, with 6 torrents with http url announce and the third with 6 torrents with https torrents when doesn't crash (the error seems to be random). The next ones are the different backtraces that appears when it fails, always when reporting to the tracker with a https torrent.
Without the patch is possible to obtain the same backtraces.
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #28 from Juan Lang juan_lang@yahoo.com 2009-08-28 15:19:51 --- (In reply to comment #27)
The firsts three are outputs of the program normal execution with no torrents added, with 6 torrents with http url announce and the third with 6 torrents with https torrents when doesn't crash (the error seems to be random). The next ones are the different backtraces that appears when it fails, always when reporting to the tracker with a https torrent.
Without the patch is possible to obtain the same backtraces.
Thank you. The first three crashes are in a different location than previously, while the fourth appears to be the same crash.
My hunch is roughly the same as before: the version of OpenSSL (or the GnuTLS OpenSSL compatibility library) on your system fails if SSL_CTX_set_default_verify_paths is called twice. Without the earlier patch, it would be called every time a new SSL connection is made. With it, it's still possible under certain race conditions for it to be called twice, if two threads are attempting SSL connections at nearly the same time.
Shortly I'll upload a slightly more careful version of this patch and ask you to try it instead.
http://bugs.winehq.org/show_bug.cgi?id=18364
Juan Lang juan_lang@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|secur32 |wininet
--- Comment #29 from Juan Lang juan_lang@yahoo.com 2009-08-28 15:26:49 --- Oh, and this appears to be a wininet bug at the moment rather than a secur32 one.
http://bugs.winehq.org/show_bug.cgi?id=18364
Juan Lang juan_lang@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #23167|0 |1 is obsolete| |
--- Comment #30 from Juan Lang juan_lang@yahoo.com 2009-08-28 15:30:52 --- Created an attachment (id=23313) --> (http://bugs.winehq.org/attachment.cgi?id=23313) Patch: Only initialize SSL_CTX once (try 2)
Could you try this instead? I'm hoping it resolves at least one source of crashes, in particular this one: =>0 0x7daa0a15 SSL_CTX_set_default_verify_paths+0x15() in libssl.so.0.9.8 (0x012fc778) 1 0x7db1563e NETCON_secure_connect+0x11e() in wininet (0x012fc7b8) 2 0x7db0a30b HTTP_HttpSendRequestW+0x1a6b() in wininet (0x012fe9c8)
The other type of crash may still appear, as I haven't changed this code at all, nor do I really understand why it might be crashing: /lib32/i686/cmov/libssl.so.0.9.8(SSL_load_error_strings+0x17)[0x7daa40a7] /usr/bin/../lib32/wine/wininet.dll.so(NETCON_init+0x55e)[0x7db15f3e] /usr/bin/../lib32/wine/wininet.dll.so(HTTP_HttpOpenRequestW+0x166)[0x7db06f16]
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #31 from David Santamaría Rogado howl.nsp@gmail.com 2009-08-29 05:02:40 --- Created an attachment (id=23315) --> (http://bugs.winehq.org/attachment.cgi?id=23315) Backtrace with the new patch
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #32 from David Santamaría Rogado howl.nsp@gmail.com 2009-08-29 05:04:04 --- Created an attachment (id=23316) --> (http://bugs.winehq.org/attachment.cgi?id=23316) Backtrace 2 with the new patch
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #33 from David Santamaría Rogado howl.nsp@gmail.com 2009-08-29 05:10:43 --- (In reply to comment #30)
Created an attachment (id=23313)
--> (http://bugs.winehq.org/attachment.cgi?id=23313) [details]
Patch: Only initialize SSL_CTX once (try 2)
Could you try this instead? I'm hoping it resolves at least one source of crashes, in particular this one: =>0 0x7daa0a15 SSL_CTX_set_default_verify_paths+0x15() in libssl.so.0.9.8 (0x012fc778) 1 0x7db1563e NETCON_secure_connect+0x11e() in wininet (0x012fc7b8) 2 0x7db0a30b HTTP_HttpSendRequestW+0x1a6b() in wininet (0x012fe9c8)
The other type of crash may still appear, as I haven't changed this code at all, nor do I really understand why it might be crashing: /lib32/i686/cmov/libssl.so.0.9.8(SSL_load_error_strings+0x17)[0x7daa40a7] /usr/bin/../lib32/wine/wininet.dll.so(NETCON_init+0x55e)[0x7db15f3e] /usr/bin/../lib32/wine/wininet.dll.so(HTTP_HttpOpenRequestW+0x166)[0x7db06f16]
I have tested it and with some runs I could obtain two of the backtraces, the first is the =>0 0x7daa0a15 SSL_CTX_set_default_verify_paths+0x15() in libssl.so.0.9.8 (0x012fc778).
I have performed and md5sum of wininet.dll.so un-patched and patched to see if I was installing the repository wine instead of the one that I generate.
89792c2deeddfc2031ded3f6c04b97a9 wininet.dll.so -> sin parchear 2beda57feb19c1fbd2abae952c163159 wininet.dll.so -> parcheado
Seems to be patched well.
More info: The problem have been only reported with ubuntu hardy, intrepid and jaunty in 32 and 64 bits, don't know if other distros are affected, perhaps an openssl bug?
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #34 from Juan Lang juan_lang@yahoo.com 2009-08-31 12:49:58 --- (In reply to comment #33)
More info: The problem have been only reported with ubuntu hardy, intrepid and jaunty in 32 and 64 bits, don't know if other distros are affected, perhaps an openssl bug?
I appears that it could be. I can't reproduce the crash with a test app here on Jaunty, but perhaps I'm not recreating the same conditions. What tracker URL are you adding?
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #35 from David Santamaría Rogado howl.nsp@gmail.com 2009-08-31 13:39:27 --- (In reply to comment #34)
(In reply to comment #33)
More info: The problem have been only reported with ubuntu hardy, intrepid and jaunty in 32 and 64 bits, don't know if other distros are affected, perhaps an openssl bug?
I appears that it could be. I can't reproduce the crash with a test app here on Jaunty, but perhaps I'm not recreating the same conditions. What tracker URL are you adding?
The only tracker tested have been www.hd-spain.com, I can't attach you the complete url because the url itself include the user account identificator.
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #36 from David Santamaría Rogado howl.nsp@gmail.com 2009-08-31 13:54:49 --- Also, can tell me the url you have tried to try it myself.
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #37 from Juan Lang juan_lang@yahoo.com 2009-08-31 18:19:22 --- (In reply to comment #36)
Also, can tell me the url you have tried to try it myself.
I wasn't trying a URL. I wrote a small test app to test my theory that initializing the SSL library more than once will cause a crash. I couldn't verify that theory: my test app didn't crash. Because the crash is in the OpenSSL library, not in Wine, I don't have a clear idea of what's happening.
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #38 from Juan Lang juan_lang@yahoo.com 2009-08-31 19:42:50 --- Oh, another thing: could you attach a +wininet trace? The backtraces you posted don't appear to have the wininet debug channel enabled. Again, to do that you want to run utorrent.exe like so: WINEDEBUG=+wininet wine utorrent.exe >& log.txt and attach log.txt here.
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #39 from David Santamaría Rogado howl.nsp@gmail.com 2009-09-01 04:12:25 --- (In reply to comment #38)
Oh, another thing: could you attach a +wininet trace? The backtraces you posted don't appear to have the wininet debug channel enabled. Again, to do that you want to run utorrent.exe like so: WINEDEBUG=+wininet wine utorrent.exe >& log.txt and attach log.txt here.
Sorry, I didn't do it because I could connect with the patch where the other server don't, here you have the log for both SSL_CTX crash and double free corruption in glibc. Looking them the last thing done by wine is the same, is just when resolving the domain of the url.
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #40 from David Santamaría Rogado howl.nsp@gmail.com 2009-09-01 04:13:46 --- Created an attachment (id=23362) --> (http://bugs.winehq.org/attachment.cgi?id=23362) wininet debug when SSL_CTX crash
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #41 from David Santamaría Rogado howl.nsp@gmail.com 2009-09-01 04:15:04 --- Created an attachment (id=23363) --> (http://bugs.winehq.org/attachment.cgi?id=23363) wininet debug when double free corrupt crash
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #42 from David Santamaría Rogado howl.nsp@gmail.com 2009-09-01 04:18:04 --- Here you are. The patch to prevent CTX to inicialize more than one time is still needed? I don't know anything about the development of SSL connections.
Thanks for all the effort you are putting on this.
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #43 from Juan Lang juan_lang@yahoo.com 2009-09-03 15:54:29 --- (In reply to comment #42)
Here you are.
Hm, could you attach a +wininet,+tid trace? I'm curious whether threading has anything to do with the issue. According to the OpenSSL FAQ[1], OpenSSL is thread safe, provided CRYPTO_set_locking_callback() and CRYPTO_set_id_callback() are called, and wininet does neither.
[1] http://www.openssl.org/support/faq.html
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #44 from David Santamaría Rogado howl.nsp@gmail.com 2009-09-03 18:28:43 --- Created an attachment (id=23411) --> (http://bugs.winehq.org/attachment.cgi?id=23411) glibc double free corruption crash +wininet,+tid trace
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #45 from David Santamaría Rogado howl.nsp@gmail.com 2009-09-03 18:30:50 --- (In reply to comment #44)
Created an attachment (id=23411)
--> (http://bugs.winehq.org/attachment.cgi?id=23411) [details]
glibc double free corruption crash +wininet,+tid trace
I executed WINEDEBUG=+wininet,+tid wine utorrent.exe >& log.txt but no trace:tid line appears in the log so don't know if I did it right but I think the variable value is right.
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #46 from Juan Lang juan_lang@yahoo.com 2009-09-03 19:42:36 --- (In reply to comment #45)
I executed WINEDEBUG=+wininet,+tid wine utorrent.exe >& log.txt but no trace:tid line appears in the log so don't know if I did it right but I think the variable value is right.
You did it correctly. The +tid turns on tracing the thread ID. Here's an example: 0026:trace:wininet:NETCON_init using SSL connection Thread 26 is using SSL. Here's another: 0027:trace:wininet:NETCON_init using SSL connection and another, along with the crash: 0028:trace:wininet:NETCON_init using SSL connection wine: Assertion failed at address 0xf7f86425 (thread 0027), starting debugger...
So, at least my suspicion is correct: the threading is at issue.
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #47 from David Santamaría Rogado howl.nsp@gmail.com 2009-09-03 20:24:38 --- (In reply to comment #46)
(In reply to comment #45)
I executed WINEDEBUG=+wininet,+tid wine utorrent.exe >& log.txt but no trace:tid line appears in the log so don't know if I did it right but I think the variable value is right.
You did it correctly. The +tid turns on tracing the thread ID. Here's an example: 0026:trace:wininet:NETCON_init using SSL connection Thread 26 is using SSL. Here's another: 0027:trace:wininet:NETCON_init using SSL connection and another, along with the crash: 0028:trace:wininet:NETCON_init using SSL connection wine: Assertion failed at address 0xf7f86425 (thread 0027), starting debugger...
So, at least my suspicion is correct: the threading is at issue.
OK, and foret to advise you about newlines "Xlib: extension "Generic Event Extension" missing on display "192.168.0.20:20.0"." I did this last execution through a XDMCP session.
The problem then relies on the openssl implementation and not in wine's wininet, isn't it?
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #48 from Juan Lang juan_lang@yahoo.com 2009-09-03 21:45:08 --- (In reply to comment #47)
The problem then relies on the openssl implementation and not in wine's wininet, isn't it?
No, it's a problem with Wine's wininet. We're not calling OpenSSL correctly. The first patch I sent helps a small amount in this regard, but another one will be needed, I think. I'll have a look when I get a chance.
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #49 from Juan Lang juan_lang@yahoo.com 2009-09-03 22:06:08 --- Created an attachment (id=23417) --> (http://bugs.winehq.org/attachment.cgi?id=23417) Patch: Set callbacks needed by OpenSSL for multithreaded use
Here's an attempt at a fix. Could you apply it along with the other patch and test it?
http://bugs.winehq.org/show_bug.cgi?id=18364
Simón simonbcn@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|simonbcn@gmail.com |
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #50 from David Santamaría Rogado howl.nsp@gmail.com 2009-09-04 06:26:33 --- wine-1.1.29 has appeared in the Scott Richie's repository. The bug continues on it as expected, the first patch passes --dry-run ok but the second one:
$ patch --dry-run -p1 < ../0002-Set-callbacks-needed-by-OpenSSL-for-multithreaded-us.patch patching file dlls/wininet/netconnection.c Hunk #1 succeeded at 127 (offset -1 lines). Hunk #2 succeeded at 159 (offset -1 lines). Hunk #3 succeeded at 219 (offset -2 lines). Hunk #4 succeeded at 232 (offset -2 lines).
don't know if these lines mean that netconnection.c was edited but patch can apply the offset of lines with the new netconnection.c or what. I will wait for your confirmation before proceed.
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #51 from David Santamaría Rogado howl.nsp@gmail.com 2009-09-04 08:59:20 --- Sorry, was my fault, I dry runned the second patch without applying the first one, I only dry runned the first also, both patch without any issue in 1.1.29.
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #52 from Juan Lang juan_lang@yahoo.com 2009-09-04 10:26:20 --- (In reply to comment #51)
Sorry, was my fault, I dry runned the second patch without applying the first one, I only dry runned the first also, both patch without any issue in 1.1.29.
Okay, so just to be clear, you've got both patches applied, and there's still a crash?
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #53 from David Santamaría Rogado howl.nsp@gmail.com 2009-09-04 11:07:13 --- No I've to test it, I left it compiling, just a minute.
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #54 from David Santamaría Rogado howl.nsp@gmail.com 2009-09-04 11:26:11 --- Created an attachment (id=23425) --> (http://bugs.winehq.org/attachment.cgi?id=23425) Backtrace with the second patch also
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #55 from David Santamaría Rogado howl.nsp@gmail.com 2009-09-04 11:27:15 --- With the last patch applied it continues crashing.
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #56 from Juan Lang juan_lang@yahoo.com 2009-09-04 11:49:13 --- (In reply to comment #55)
With the last patch applied it continues crashing.
Thanks. Would you mind posting a +tid,+wininet trace again with both patches applied?
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #57 from David Santamaría Rogado howl.nsp@gmail.com 2009-09-04 16:42:27 --- Created an attachment (id=23435) --> (http://bugs.winehq.org/attachment.cgi?id=23435) Debug trace +tid,+wininet with the two patches
Here you are the new trace. I have to say something, don't know if it's coincidence as the appear randomly but with the two patches applied the only type of crash that have appeared is the glibc double free or corruption crash.
http://bugs.winehq.org/show_bug.cgi?id=18364
Jaime Lopez grogpeter@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |grogpeter@gmail.com
--- Comment #58 from Jaime Lopez grogpeter@gmail.com 2009-09-06 21:05:11 --- Hi, David will be out of his machine this week (will be back), has asked me to continue testing.
I've got installed Ubuntu 8.04 Hardy Heron 32 bits (David have got jauntry), I compiled wine-1.1.29~winehq0~ubuntu~8.04 with the two patches of the thread:
0001-Only-initialize-SSL_CTX-once.patch 0002-Set-callbacks-needed-by-OpenSSL-for-multithreaded-us.patch
At first time, after install the compiled .deb utorrent 1.3 and wine don't failed (I added 7 https torrents and triyed to restart utorrent, but don't failed).
I restarted the system and the first failure occurred with utorrent and https as expected (log01.txt). When i started the second time the program, the failure produced again as expected (log02.txt , the failure was faster than the previous).
I add attachment of the two failures, I launched utorrent alwais wich +wininet,+tid. ( WINEDEBUG=+tid,+wininet wine uTorrent.exe >& log.txt )
My control over Linux is lower than the level of David, but I will try to be as helpful as possible.
Thanks for the help and sorry for my English.
PS: I've readed than utorrent uses the IExplorer API to access https.
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #59 from Jaime Lopez grogpeter@gmail.com 2009-09-06 21:09:22 --- Created an attachment (id=23481) --> (http://bugs.winehq.org/attachment.cgi?id=23481) Jaime Debug01: +tid,+wininet with the two patches
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #60 from Jaime Lopez grogpeter@gmail.com 2009-09-06 21:10:42 --- Created an attachment (id=23482) --> (http://bugs.winehq.org/attachment.cgi?id=23482) Jaime Debug02: +tid,+wininet with the two patches
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #61 from Juan Lang juan_lang@yahoo.com 2009-09-17 11:11:11 --- I'm sorry I haven't had time to respond to this bug lately. I don't have much to say at the moment besides:
1. The program is using SSL from multiple threads, and I suspect the problems are related to this. 2. I haven't managed to reproduce the crash, since I don't know any https tracker URLs to test with myself. I also tried to write a test program that uses wininet to do https from multiple threads, but that program didn't crash for me.
I think being able to reproduce the bug is important to being able to fix it, so if anyone has a suggestion for a https tracker we can use that'd be very helpful.
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #62 from David Santamaría Rogado howl.nsp@gmail.com 2009-09-17 16:47:34 --- (In reply to comment #61)
I'm sorry I haven't had time to respond to this bug lately. I don't have much to say at the moment besides:
- The program is using SSL from multiple threads, and I suspect the problems
are related to this. 2. I haven't managed to reproduce the crash, since I don't know any https tracker URLs to test with myself. I also tried to write a test program that uses wininet to do https from multiple threads, but that program didn't crash for me.
I think being able to reproduce the bug is important to being able to fix it, so if anyone has a suggestion for a https tracker we can use that'd be very helpful.
I can create you an user for hd-spain tracker, the only needed thing is a nick and an e-mail for the forum and tracker passwords to be send.
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #63 from David Santamaría Rogado howl.nsp@gmail.com 2009-09-21 10:05:23 --- The only trackers also supporting https that I know are private and thus requiere an user to work, these trackers usually require invitation to register but I can make you and user for hd-spain without invitation to test this, if you want the user can be deleted when you finish reproducing the bug.
The problem is that I can't give you torrents of existing users, in the traces the url appear with the passkey for my user but doesn't matter because is in a test site. Instead of giving you an username and password for the tracker I can give you directly torrents of a user created specially for this bug.
You ask for https tracker torrents to reproduce the bug and I can give you but if you don't want them...
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #64 from Jaime Lopez grogpeter@gmail.com 2009-09-21 20:03:39 --- Created an attachment (id=23697) --> (http://bugs.winehq.org/attachment.cgi?id=23697) torrents for juan - test https
Hi Juan, i add a zip attachment whith 10 normal torrents to the https (report each 30 minutes) and the same 10 torrent but with announce to report each 2 minutes (if help to debug better)
The failure occurs randomly, sometimes takes a long time until it fails and sometimes fails shortly after starting utorrent.
Thanks for the help
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #65 from Juan Lang juan_lang@yahoo.com 2009-09-22 13:02:12 --- How do you install uTorrent? When I run the installer, the installer never finishes. Eventually it puts up a dialog saying something like, "It looks like uTorrent is running, but not responding. Please close any open uTorrent windows and try again." It does put an executable in the c:\Program Files\uTorrent directory, but the executable, when run, just starts the installer again.
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #66 from Jaime Lopez grogpeter@gmail.com 2009-09-22 19:37:04 --- We are using uTorrent 1.8.3, because we have not been able to install the 1.8.4 (seems they fixed a problem with the installation, but has emerged this new)
The 1.8.3 version is abailable from:
http://download.utorrent.com/1.8.3/utorrent.exe http://forum.utorrent.com/viewtopic.php?id=58768
PD: I've reported the install problem to the 1.8.4 thread of utorrent forums: http://forum.utorrent.com/viewtopic.php?pid=429073#p429073
http://bugs.winehq.org/show_bug.cgi?id=18364
Juan Lang juan_lang@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download URL| |http://download.utorrent.co | |m/1.8.3/utorrent.exe
--- Comment #67 from Juan Lang juan_lang@yahoo.com 2009-09-23 12:04:37 --- Do there need to be any live trackers? I added the torrents Jaime provided, but I haven't been able to reproduce the crash after about an hour of running.
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #68 from David Santamaría Rogado howl.nsp@gmail.com 2009-09-23 18:57:59 --- We have reports from people on the tracker that the stayed days without an error, don't know why but sometimes takes long to crash.
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #69 from Juan Lang juan_lang@yahoo.com 2009-09-28 15:46:51 --- I enabled hyperthreading on my machine, and I'm finally able to reproduce the problem. Unfortunately, I haven't been able to fix it :/
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #70 from Juan Lang juan_lang@yahoo.com 2009-09-28 17:48:42 --- Created an attachment (id=23815) --> (http://bugs.winehq.org/attachment.cgi?id=23815) Patch: Protect OpenSSL initialization with critical section
I believe this patch fixes the bug. Could you try it and let me know if it works for you?
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #71 from Juan Lang juan_lang@yahoo.com 2009-09-28 17:49:27 --- Edit: I should say, could you apply it on top of the previous two patches, and try with all three applied?
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #72 from David Santamaría Rogado howl.nsp@gmail.com 2009-09-28 21:29:20 --- (In reply to comment #71)
Edit: I should say, could you apply it on top of the previous two patches, and try with all three applied?
I have updated to the .30, without the patched bug is still there. With the three patches applied (.30 patch without any warn) it's solved.
There is only some issues, in comparison with Windows behavior, when starting multiple https torrents at once, in Windows they are reported almost simultaneously, but with wine the connection time varies usually tens seconds. Sometimes wine reports more like Windows and sometimes some torrents result in error 12170 with the red icon show in the torrent list for the pertinent torrent.
Error 12170 seems to be a timeout error, but when it happens utorrent retry automatically the connection.
Also when stopping torrents some of them aren't reported to the tracker resulting in 12007 error, this error is also something like a timeout.
I add here the timings of windows torrents, it's the epoch time when the tracker acquire the requests:
Windows torrents start: 1.- 1254189507 2.- 1254189507 3.- 1254189507 4.- 1254189507 5.- 1254189507 6.- 1254189507 7.- 1254189508 8.- 1254189508 9.- 1254189508 10.- 1254189508
Windows torrents stop: 1.- 1254189951 2.- 1254189951 3.- 1254189952 4.- 1254189952 5.- 1254189952 6.- 1254189952 7.- 1254189952 8.- 1254189952 9.- 1254189953 10.- 1254189953
Wine torrents start: 1.- 1254190552 2.- 1254190552 3.- 1254190552 4.- 1254190553 5.- 1254190553 6.- 1254190554 7.- 1254190557 8.- 1254190572 9.- 1254190572 10.- 1254190586
Wine torrents stop (two reports are missing): 1.- 1254190841 2.- 1254190843 3.- 1254190843 4.- 1254190844 5.- 1254190845 6.- 1254190850 7.- 1254190850 8.- 1254190851
When stopping torrents if connection fails utorrent doesn't try to reconnect to report the last data.
No always happens sometimes all the torrents are reported, and sometimes the times varies more between the first and the last report...
Thanks again for the efforts you are putting in this issue.
This bug doensn't happen anymore with the patches, so, I should open a new one for this new two issues, the connection times and the connection timeout, or can be treated in this bug report?
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #73 from Juan Lang juan_lang@yahoo.com 2009-09-28 23:15:54 --- (In reply to comment #72)
I have updated to the .30, without the patched bug is still there. With the three patches applied (.30 patch without any warn) it's solved.
Excellent. I'll send the patches in, and I expect this'll be fixed by 1.1.31.
This bug doensn't happen anymore with the patches, so, I should open a new one for this new two issues, the connection times and the connection timeout, or can be treated in this bug report?
Please open a separate report for the timeouts. We can keep this one open until the patches that fix it are committed to git.
http://bugs.winehq.org/show_bug.cgi?id=18364
Juan Lang juan_lang@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #23313|0 |1 is obsolete| |
http://bugs.winehq.org/show_bug.cgi?id=18364
Juan Lang juan_lang@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #23417|0 |1 is obsolete| |
http://bugs.winehq.org/show_bug.cgi?id=18364
Juan Lang juan_lang@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #23815|0 |1 is obsolete| |
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #74 from Juan Lang juan_lang@yahoo.com 2009-09-29 14:03:32 --- The patches didn't get applied, so I uploaded a new series of patches that apply to 1.1.30: http://www.winehq.org/pipermail/wine-patches/2009-September/079110.html http://www.winehq.org/pipermail/wine-patches/2009-September/079111.html http://www.winehq.org/pipermail/wine-patches/2009-September/079112.html http://www.winehq.org/pipermail/wine-patches/2009-September/079113.html http://www.winehq.org/pipermail/wine-patches/2009-September/079114.html http://www.winehq.org/pipermail/wine-patches/2009-September/079115.html http://www.winehq.org/pipermail/wine-patches/2009-September/079116.html
http://bugs.winehq.org/show_bug.cgi?id=18364
Juan Lang juan_lang@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |20206
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #75 from David Santamaría Rogado howl.nsp@gmail.com 2009-09-29 15:37:12 --- Applying only the new patches this bug is also solved.
http://bugs.winehq.org/show_bug.cgi?id=18364
Juan Lang juan_lang@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #76 from Juan Lang juan_lang@yahoo.com 2009-10-02 11:18:23 --- This should be fixed in today's git. Thanks for your help in reproducing the problem and testing the fixes, gentlemen.
http://bugs.winehq.org/show_bug.cgi?id=18364
--- Comment #77 from David Santamaría Rogado howl.nsp@gmail.com 2009-10-03 10:37:37 --- (In reply to comment #76)
This should be fixed in today's git. Thanks for your help in reproducing the problem and testing the fixes, gentlemen.
No no, thanks to you for resolving it. Good work.
http://bugs.winehq.org/show_bug.cgi?id=18364
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #78 from Alexandre Julliard julliard@winehq.org 2009-10-09 11:14:01 --- Closing bugs fixed in 1.1.31.