Thread overview
[Issue 20120] libcurl.dll hangs when running std.net.curl unittests
Aug 11, 2019
Rainer Schuetze
Aug 11, 2019
kinke
Aug 11, 2019
Rainer Schuetze
Aug 12, 2019
Rainer Schuetze
Aug 12, 2019
Dlang Bot
Aug 12, 2019
Seb
Aug 12, 2019
Rainer Schuetze
Aug 20, 2019
Dlang Bot
August 11, 2019
https://issues.dlang.org/show_bug.cgi?id=20120

--- Comment #1 from Rainer Schuetze <r.sagitario@gmx.de> ---
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

--
August 11, 2019
https://issues.dlang.org/show_bug.cgi?id=20120

kinke <kinke@gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kinke@gmx.net

--- Comment #2 from kinke <kinke@gmx.net> ---
(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.

--
August 11, 2019
https://issues.dlang.org/show_bug.cgi?id=20120

--- Comment #3 from Rainer Schuetze <r.sagitario@gmx.de> ---
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?

--
August 12, 2019
https://issues.dlang.org/show_bug.cgi?id=20120

--- Comment #4 from Rainer Schuetze <r.sagitario@gmx.de> ---
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.

--
August 12, 2019
https://issues.dlang.org/show_bug.cgi?id=20120

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #5 from Dlang Bot <dlang-bot@dlang.rocks> ---
@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

--
August 12, 2019
https://issues.dlang.org/show_bug.cgi?id=20120

Seb <greeenify@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |greeenify@gmail.com

--- Comment #6 from Seb <greeenify@gmail.com> ---
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?

--
August 12, 2019
https://issues.dlang.org/show_bug.cgi?id=20120

--- Comment #7 from Rainer Schuetze <r.sagitario@gmx.de> ---
(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

--
August 20, 2019
https://issues.dlang.org/show_bug.cgi?id=20120

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #8 from Dlang Bot <dlang-bot@dlang.rocks> ---
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

--