Skip to content
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

julia-1.6.1 incompatible with (lib)curl-7.81.0 (seg fault) #35186

Closed
kwshi opened this issue Jan 22, 2022 · 7 comments
Closed

julia-1.6.1 incompatible with (lib)curl-7.81.0 (seg fault) #35186

kwshi opened this issue Jan 22, 2022 · 7 comments
Labels
bug Something isn't working Stale

Comments

@kwshi
Copy link
Contributor

kwshi commented Jan 22, 2022

System

  • xuname:
    Void 5.15.12_1 x86_64 AuthenticAMD notuptodate rFFFFFFFFFF
  • package:
    julia-1.6.1_1 libcurl-7.81.0_1

Issue

libcurl 7.81.0 (recently updated by 9da559d (PR #34870)) seems to have updated its ABI or something, to the effect that the current version of Julia crashes with segfault when attempting to make network requests (e.g., downloading packages). This issue needs to be fixed by Julia devs (who currently claim that curl-7.81 is currently officially unsupported, but I'm sure they'll get to it eventually); I'm just filing the issue here to help other Julia users on Void keep track of this issue and progress on fixing it (which, I imagine, involves updating julia to some version past 1.7 after the devs fix it, or backporting a patch fix, or something like that).

Relevant discussions on Julia repos:

Steps to reproduce the behavior

Install julia and libcurl, then try installing something:

julia -e 'import Pkg; Pkg.add("DataStructures")'
WARNING: failed to select UTF-8 encoding, using ASCII
  Installing known registries into `~/.julia`

signal (11): Segmentation fault
in expression starting at none:1
unknown function (ip: 0x7fb71b75e666)
unknown function (ip: 0x7fb71b73f38c)
unknown function (ip: 0x7fb71b740912)
curl_multi_socket_action at /usr/bin/../lib/julia/libcurl.so (unknown line)
unknown function (ip: 0x7fb76b489727)
unknown function (ip: 0x7fb76b489ca7)
unknown function (ip: 0x7fb76b4a19c4)
unknown function (ip: 0x7fb76b4a1b5c)
unknown function (ip: 0x7fb76b52c5e2)
unknown function (ip: 0x7fb71b73cd43)
curl_multi_add_handle at /usr/bin/../lib/julia/libcurl.so (unknown line)
unknown function (ip: 0x7fb76b532435)
unknown function (ip: 0x7fb76b532663)
unknown function (ip: 0x7fb76b2f65a8)
unknown function (ip: 0x7fb76b2f77f5)
unknown function (ip: 0x7fb76b2f7f17)
unknown function (ip: 0x7fb76b2f8709)
unknown function (ip: 0x7fb76b2f8784)
unknown function (ip: 0x7fb76b400e1b)
unknown function (ip: 0x7fb76b435660)
unknown function (ip: 0x7fb76b436221)
unknown function (ip: 0x7fb76b4363ad)
unknown function (ip: 0x7fb76b2fb32a)
unknown function (ip: 0x7fb76b2fc41e)
unknown function (ip: 0x7fb76b42564a)
unknown function (ip: 0x7fb76b4256cc)
unknown function (ip: 0x7fb76b2da6fe)
unknown function (ip: 0x7fb76b2da8ae)
unknown function (ip: 0x7fb76b3e563c)
unknown function (ip: 0x7fb76b5403b6)
unknown function (ip: 0x7fb76b3927fc)
unknown function (ip: 0x7fb76b44bf19)
unknown function (ip: 0x7fb76b555a47)
unknown function (ip: 0x7fb76b4c6dd6)
unknown function (ip: 0x7fb76b4c7644)
unknown function (ip: 0x7fb76b4c76cc)
unknown function (ip: 0x7fb76b4167e6)
unknown function (ip: 0x7fb76b30445f)
unknown function (ip: 0x7fb76b30991e)
unknown function (ip: 0x7fb778c4b9bb)
unknown function (ip: 0x7fb778c4b4fd)
unknown function (ip: 0x7fb778c4c1f7)
unknown function (ip: 0x7fb778c4cd6c)
unknown function (ip: 0x7fb778c67846)
unknown function (ip: 0x7fb778c684b7)
unknown function (ip: 0x7fb778c684b7)
jl_toplevel_eval_in at /usr/bin/../lib/julia/libjulia-internal.so.1 (unknown line)
unknown function (ip: 0x7fb76b3ab3d1)
unknown function (ip: 0x7fb76b3ae32c)
unknown function (ip: 0x7fb76b3ae495)
unknown function (ip: 0x7fb778c8a6f5)
repl_entrypoint at /usr/bin/../lib/julia/libjulia-internal.so.1 (unknown line)
main at julia (unknown line)
__libc_start_main at /builddir/glibc-2.32/csu/../csu/libc-start.c:314
_start at julia (unknown line)
Allocations: 2650 (Pool: 2640; Big: 10); GC: 0
Segmentation fault
@ericonr
Copy link
Member

ericonr commented Jan 22, 2022

Huh, that's definitely unexpected. Curl has had a stable ABI for ages now.

@ericonr
Copy link
Member

ericonr commented Jan 22, 2022

JuliaLang/Downloads.jl#172 (comment) seems to point at a solution.

The issue is they had infinite recursion going on in one of their methods and it was fixed in a version of Download.jl that wasn't used in latest julia.

@ericonr ericonr added the bug Something isn't working label Jan 22, 2022
@kwshi
Copy link
Contributor Author

kwshi commented Jan 22, 2022

Interesting. I'm still surprised at why that explanation/bug (infinite recursion) surfaces because of a version bump in curl.

@kwshi
Copy link
Contributor Author

kwshi commented Jan 22, 2022

Alternatively, what if we set USE_SYSTEM_CURL=0 in the build args? (It seems like we do this for several of the other library dependencies already, e.g. blas, lapack, llvm, libuv; so why not also do this with curl? Or, is the eventual goal to make those use the system libraries too?)

@ericonr
Copy link
Member

ericonr commented Jan 23, 2022

It would ideally be using system libraries. If we are going to do something, I'd rather simply fix the internal Download.jl in the julia package.

@non-Jedi
Copy link
Contributor

If the problem really is fixed by the PR linked from the issue, it's a relatively simple patch to carry for julia: https://patch-diff.githubusercontent.com/raw/JuliaLang/Downloads.jl/pull/164.patch. I'm working on getting julia 1.7.1 packaged, but I'll try to take a look after.

@github-actions
Copy link

Issues become stale 90 days after last activity and are closed 14 days after that. If this issue is still relevant bump it or assign it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Stale
Projects
None yet
Development

No branches or pull requests

3 participants