-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libcurl 7.88.0- getaddrinfo() thread failed to start #10561
Comments
Possible resource issue or MITM issue. Allowing MITM was supposed to be fixed in 7.88.0 unless that broke something for you. Does it work if you use the curl tool (curl.exe)? Does it happen 100% of the time? If you go back to 7.86 does it work? If you git checkout curl-7_88_0 and then revert 7fa449c does it work? Do you have an anti-virus client that could be interfering? You could further narrow it down by bisecting. The 'Build but no install' step is specific to autotools builds so ignore it in this case. Since you are using a VS project configuration (eg 'DLL Release - DLL Windows SSPI - DLL WinIDN') your 'Build but no install' step would be run edit: I checked out curl-7_88_0 and built 'LIB Release - DLL Windows SSPI - DLL WinIDN' in VS2022 and ran |
I got the same message in command line a few hours ago when I was preparing examples for #10558. Update: resource – fake curl1.se, curl2.se, etc only. |
I have been able to reproduce approx every twenty minutes but only in certain circumstances. No debugging or printfs. OutputDebugString ok though. I run the same command repeatedly in a batch file, with apologies to the apache folks, until it fails: (edit: refer to jay:curl:win32_debug_socketpair_init instead for a faster and complete repeat.bat) FOR /L %%G IN (1,1,%MAX%) DO (
curld -sS -f -H "Connection: close" https://httpd.apache.org/ -o NUL --write-out "%%{time_total} "
if !ERRORLEVEL! NEQ 0 exit /b 1
) It looks like it is related to 7fa449c. Lines 118 to 124 in 41dfb7f
sread returns SOCKET_ERROR and WSAGetLastError returns WSAEWOULDBLOCK. The socket is non-blocking so we will have to take into account that sread/recv (and to a lesser extent swrite/send) may return this. @bagder |
MITM at fake addresses curl1.se/curl2.se/…? |
Reported-by: Gunamoi Software Debuggged-by: Jay Satiro Fixes #10561
Hi folks, I was able to determine that this fixes the problem and posted my procedure/results at https://curl.se/mail/lib-2023-02/0064.html |
Thanks for testing. It depends a lot on system resources and how many sockets are active at the same time. I've made a branch with all the debug statements that I added and a better repeat command using jay:curl:win32_debug_socketpair_init I have yet to investigate #10562 |
1. open sysinternals' dbgview 2. edit repeat.bat var CURL to path of a repo non-debug build curl.exe 3. run repeat.bat. should repro in less than 5 min, may take 20 min, stops after 30-60 min. ~~~ curl: (6) getaddrinfo() thread failed to start 0.000000 Reproduced in 738 tries. Ran from 15:58:20.66 to 16:00:18.40. ~~~ Ref: curl#10561 (comment)
Thanks a lot @renodr! |
Just for some followup! 😄 @jay I pulled a copy of your batch file down and edited it to go to linuxfromscratch.org (since I have access to that server) and then did a fresh build of cURL in a separate directory so that I could have a build available without #10562 applied to it. On the unpatched build, I got the following output: On the patched build, I get: It ran for about an hour and 20 minutes without issues, the only reason why it stopped was because I had a network outage I think this should be good to go! 😄 |
Test curl-for-win binaries: (disregard the version number in the filename, this is latest master + patch #10562) Ref: https://ci.appveyor.com/project/curlorg/curl-for-win/builds/46278505 |
@jay I have only tested on one machine, Windows 10. I downloaded a daily release, (curl-7.88.1-20230219.zip) @bagder Anyway, based on the tests by others, it looks like your solution will probably fix my issue. |
@gunamoi1: You can test the patch with these binaries: https://ci.appveyor.com/api/buildjobs/tcl16t5jhb3neqdj/artifacts/all-mingw-7.88.0.zip |
@vszakats @bagder Once compiled into a static LIB and the compiled into my programs, all works good and the original problem goes away. |
We have this same problem with 7.88.0 on some Windows machines, I'll try it with the new 7.88.1 |
I can confirm that updating to 7.88.1 solves our issue as well. |
Reported-by: Gunamoi Software Co-authored-by: Jay Satiro Fixes curl#10561 Closes curl#10562
I use libcurl, compiled as a static library, in many of my programs.
Code written in C++, for Windows, using Visual Studio.
libcurl static library is compiled to call DLL Windows SSPI, and DLL WinIDN.
I have used all previous versions from 7.50.3 to 7.86.0, and all works great.
Recently I saw 7.88.0 is available, so I downloaded and compiled that one, using the same settings as all my previous builds.
Now all of my programs fail, with a message:
"getaddrinfo() thread failed to start".
So, I have gone back to using the previous version 7.86.0, and all my programs work again.
What might be causing this bug in 7.88.0?
Is there some extra curl setup required in this new version which I will have to change in my programs to make them work with 7.88.0?
The text was updated successfully, but these errors were encountered: