Bug 20120 – libcurl.dll hangs when running std.net.curl unittests

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
installer
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2019-08-11T08:06:14Z
Last change time
2019-08-20T13:19:43Z
Keywords
pull
Assigned to
No Owner
Creator
Rainer Schuetze

Comments

Comment #0 by r.sagitario — 2019-08-11T08:06:14Z
It seems the distribuuted libcurl.dll is broken since 2.072: executing dmd -unittest -main -run <phobos-path>\std\net\curl.d freezes until some timeout expires after a couple of minutes. The same happens with -m64. The unittests pass with the DLL that comes with dmd 2.071 or the ones from the LDC distro.
Comment #1 by r.sagitario — 2019-08-11T08:30:39Z
Might be related to the version of libcurl: LDC comes with version 7.48.0, and the regression happened when upgrading from 7.47.1 to 7.51.0
Comment #2 by kinke — 2019-08-11T08:40:43Z
(In reply to Rainer Schuetze from comment #1) > Might be related to the version of libcurl: LDC comes with version 7.48.0, > and the regression happened when upgrading from 7.47.1 to 7.51.0 Yes, exactly because we get CI failures with newer libcurl versions. I initially thought it may be specific to how it is built (compilation options, linked MSCRT etc.), so I tried to build the last libcurl versions myself [a while ago], but failed to produce a working one.
Comment #3 by r.sagitario — 2019-08-11T08:47:09Z
Yeah, just tried to rebuild it, too. There are a lot of vulnerabilities fixed since curl 7.48, so an update would be recommended. Maybe there is just something wrong with the tests?
Comment #4 by r.sagitario — 2019-08-12T06:21:59Z
bisecting curl shows this commit as the offender: https://github.com/curl/curl/commit/72d5e144fbc6a9db264ae425bb788af218f25d9e defining DONT_USE_RECV_BEFORE_SEND_WORKAROUND when compiling curl lets the std.net.curl unittests pass. Not sure who's to blame, though. From the discussions in the referenced issues, the curl developers were not too convinced about the patch. Maybe it is also Windows version specific.
Comment #5 by dlang-bot — 2019-08-12T06:32:15Z
@rainers updated dlang/installer pull request #399 "fix issue 20210 - libcurl.dll hangs when running std.net.curl unittests" fixing this issue: - fix issue 20120 - libcurl.dll hangs when running std.net.curl unittests disable the workaround introduced in https://github.com/curl/curl/commit/72d5e144fbc6a9db264ae425bb788af218f25d9e as it is causing the issue and the curl developers were not really convinced disabled by defining DONT_USE_RECV_BEFORE_SEND_WORKAROUND when compiling curl https://github.com/dlang/installer/pull/399
Comment #6 by greeenify — 2019-08-12T06:40:28Z
Maybe sth is wrong with the test server that is spawned to handle these test requests? It's a simple while loop after all. BTW how does this pass on the Auto-Tester? Isn't 2.079 used there?
Comment #7 by r.sagitario — 2019-08-12T07:27:43Z
(In reply to Seb from comment #6) > Maybe sth is wrong with the test server that is spawned to handle these test > requests? It's a simple while loop after all. The problem is reproducible locally. > BTW how does this pass on the Auto-Tester? Isn't 2.079 used there? I suspect the DLLs have never been updated on the build machines. They sit in a folder outside the build directories, see for example https://github.com/braddr/at-client/blob/8a2a2743716fcfde13d5ab0856bd4b5a0e403851/configs/WIN-F30QP0PU8L1#L23
Comment #8 by dlang-bot — 2019-08-20T13:19:43Z
dlang/installer pull request #399 "fix issue 20120 - libcurl.dll hangs when running std.net.curl unittests" was merged into build-curl: - 4c8aabf637e2677cd705dc94cf00815064690388 by Rainer Schuetze: fix issue 20120 - libcurl.dll hangs when running std.net.curl unittests disable the workaround introduced in https://github.com/curl/curl/commit/72d5e144fbc6a9db264ae425bb788af218f25d9e as it is causing the issue and the curl developers were not really convinced disabled by defining DONT_USE_RECV_BEFORE_SEND_WORKAROUND when compiling curl https://github.com/dlang/installer/pull/399