libphobos: std.net.curl does not understand HTTP/2 status lines

Bug #1876293 reported by Carsten Schlote
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gcc-10 (Ubuntu)
Fix Released
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned

Bug Description

The GDC runtime access to the libcurl is broken. CURL operations abort with unexpected error codes.

Test programm:
```
import std.net.curl;
import std.stdio;

void main()
{
    HTTP http = HTTP();
    auto data = get("https://acme-staging-v02.api.letsencrypt.org/directory", http);
    writeln(data);
}
```
Compile this program and run it.
$ gdc curldownload.d -o curldownload -g
$ ./curldownload
std.net.curl.HTTPStatusException@/usr/lib/gcc/aarch64-linux-gnu/10/include/d/std/net/curl.d(1071): HTTP request returned status code 0 ()
----------------
??:? pure @safe bool std.exception.enforce!(bool).enforce(bool, lazy object.Throwable) [0xffff7faf82d3]
??:? char[] std.net.curl._basicHTTP!(char)._basicHTTP(const(char)[], const(void)[], std.net.curl.HTTP) [0xaaaad4d9384b]
??:? char[] std.net.curl.get!(std.net.curl.HTTP, char).get(const(char)[], std.net.curl.HTTP) [0xaaaad4d92833]
??:? _Dmain [0xaaaad4d9272f]
??:? ???[0xffff7fc808bb]
??:? ???[0xffff7fc80c2f]
??:? _d_run_main [0xffff7fc80d9f]
??:? main [0xaaaad4d927a3]
??:? __libc_start_main [0xffff7f6da08f]
??:? ???[0xaaaad4d92603]

The same issue also impacts the 'dub' package. It is *not* possible to update/fetch packages from code.dlang.org.

I compiled 'ldc2' from sources in its latest version. The code snippet works fine, when compiled with ldc- Also 'dub', when recompiled with ldc2, works fine.

So there is some problem with gdc and its access to libcurl. Maybe broken library bindungs? Some issue with ARM32 and ARM64 archs (same problem with ARM32(gnueabihf))?

Issue also reported on dlang.org : https://issues.dlang.org/show_bug.cgi?id=20380

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: gdc-10 10-20200411-0ubuntu1
ProcVersionSignature: Ubuntu 5.4.0-1008.8-raspi 5.4.29
Uname: Linux 5.4.0-1008-raspi aarch64
ApportVersion: 2.20.11-0ubuntu27
Architecture: arm64
CasperMD5CheckResult: skip
Date: Fri May 1 12:19:49 2020
SourcePackage: gcc-10
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Carsten Schlote (carsten-schlote) wrote :
Revision history for this message
Carsten Schlote (carsten-schlote) wrote :

Recompiling libcurl from sources and copying the library binaries over the 'official' ones in /usr/libs/ also fixed the problem in the past.

Revision history for this message
Iain Buclaw (iainb) wrote :

I believe this is the relevant upstream phobos issue.

https://issues.dlang.org/show_bug.cgi?id=19367

Patch can be applied cleanly enough to gcc sources.

https://patch-diff.githubusercontent.com/raw/dlang/phobos/pull/6752.diff

Iain Buclaw (iainb)
summary: - Broken CURL support with GDC
+ libphobos: std.net.curl does not understand HTTP/2 status lines
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gcc-10 - 10.1.0-1ubuntu1

---------------
gcc-10 (10.1.0-1ubuntu1) groovy; urgency=medium

  * GCC 10.1.0 release.

gcc-10 (10.1.0-1) unstable; urgency=medium

  * GCC 10.1.0 release.
  * lib*stdc++6: Depend on lib*gcc-sN instead of lib*gccN.
  * Build libphobos on hppa-linux-gnu.
  * Update NEWS files for GCC 10.
  * Refresh patches.

 -- Matthias Klose <email address hidden> Thu, 07 May 2020 13:58:39 +0200

Changed in gcc-10 (Ubuntu):
status: New → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Carsten, or anyone else affected,

Accepted gcc-10 into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gcc-10/10.2.0-5ubuntu1~20.04 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in gcc-10 (Ubuntu Focal):
status: New → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

This bug is fixed for focal as part of LP: #1879481 and does not require explicit validation.

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (12.1 KiB)

This bug was fixed in the package gcc-10 - 10.2.0-5ubuntu1~20.04

---------------
gcc-10 (10.2.0-5ubuntu1~20.04) focal-proposed; urgency=medium

  * SRU: LP: #1879481. Update to the GCC 10.2.0 release.

gcc-10 (10.2.0-5ubuntu1) groovy; urgency=medium

  * Merge with Debian; remaining changes:
    - Build from upstream sources.

gcc-10 (10.2.0-5) unstable; urgency=medium

  * Update to git 20200808 from the gcc-10 branch.
    - Fix PR target/96191 (ARM), PR target/96191 (AArch64),
      PR tree-optimization/96483, PR middle-end/96426, PR debug/96354,
      PR target/95435 (x86), PR tree-optimization/96058, PR middle-end/96335,
      PR lto/45375, PR c/96377, PR c++/96082, PR c++/95591, PR c++/95599,
      PR c++/95823, PR c++/95824, PR c++/95895, PR d/96140,
      PR fortran/96319, PR fortran/95612, PR fortran/95585.

gcc-10 (10.2.0-3ubuntu1) groovy; urgency=medium

  * Merge with Debian; remaining changes:
    - Build from upstream sources.
    - Don't run the tests on riscv64.

gcc-10 (10.2.0-3) unstable; urgency=medium

  * Update to git 20200725 from the gcc-10 branch.
    - Fix PR target/96190 (SPARC), PR target/96236 (PPC), PR target/96260,
      PR fortran/95980, PR fortran/95980, PR fortran/96086, PR fortran/89574,
      PR fortran/96220, PR fortran/96018.
  * Re-enable gm2, disabled by accident in 10.2.0-1.
  * Refresh gm2 patches.
  * Apply proposed gdc patch (Iain Buclaw). Closes: #966026.
  * Apply proposed patch for PR bootstrap/96203, add -fcf-protection=check.

gcc-10 (10.2.0-1ubuntu1) groovy; urgency=medium

  * Merge with Debian; remaining changes:
    - Build from upstream sources.
    - Don't run the tests on riscv64.

gcc-10 (10.2.0-1) unstable; urgency=medium

  * GCC 10.2.0 release.
    - Fix PR target/95726 (AArch64), PR target/96174 (x86), PR middle-end/95114,
      PR tree-optimization/96146, PR middle-end/96194, PR c++/95789,
      PR c++/96104, PR c++/96179.
    - Fix missing dependencies for selftests which occasionally causes
      failed builds. Closes: #960913.
  * Update gm2 from the gm2 gcc-10 branch.
  * Update the patch for PR lto/95604, replacing the error with a warning.
  * Build the GC enabled libobjc on arm64, mips and mipsel as well.
  * libgo: Merge the 1.14.6 changes, taken from the trunk.
  * Fix ASAN_INTERCEPT_VFORK related symbols. (Helmut Grohne). Closes: #965246.

gcc-10 (10.1.0-6ubuntu1) groovy; urgency=medium

  * Merge with Debian; remaining changes:
    - Build from upstream sources.
    - Don't run the tests on riscv64.

gcc-10 (10.1.0-6) unstable; urgency=medium

  * Update to git 20200714 from the gcc-10 branch.
    - Fix PR lto/95604, PR target/94891 (AArch64), PR target/94791 (AArch64),
      PR ipa/96130, PR middle-end/94600, PR middle-end/95270, PR c++/96063,
      PR c++/96077.
  * Also package the nvptx offload compiler on arm64.

gcc-10 (10.1.0-5) unstable; urgency=medium

  * Update to git 20200713 from the gcc-10 branch.
    - Fix PR bootstrap/94998, PR tree-optimization/94969, PR target/95018 (PPC),
      PR target/95347 (PPC), PR target/95347 (PPC), PR target/95713,
      PR target/94735 (ARM), PR target/94959 (ARM), PR c++/95505, PR c++/95508,
      PR fortran/95707, PR fortran...

Changed in gcc-10 (Ubuntu Focal):
status: Fix Committed → Fix Released
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.