FS#65540 - [julia] signal (11): Segmentation fault
Attached to Project:
Community Packages
Opened by Zorn (zsoerenm) - Tuesday, 18 February 2020, 12:26 GMT
Last edited by Antonio Rojas (arojas) - Saturday, 18 April 2020, 20:25 GMT
Opened by Zorn (zsoerenm) - Tuesday, 18 February 2020, 12:26 GMT
Last edited by Antonio Rojas (arojas) - Saturday, 18 April 2020, 20:25 GMT
|
Details
Description:
If you update packages through the julia package manager, you'll get a segmentation fault: ``` (v1.3) pkg> up Updating registry at `~/.julia/registries/General` Updating git-repo `https://github.com/JuliaRegistries/General.git` signal (11): Segmentation fault in expression starting at none:0 unknown function (ip: 0x7f0301d7be73) http_parser_execute at /usr/bin/../lib/libhttp_parser.so.2.9 (unknown line) unknown function (ip: 0x7f0301d7d390) unknown function (ip: 0x7f0301d7f770) unknown function (ip: 0x7f0301d81b58) unknown function (ip: 0x7f0301d7ff91) git_remote_fetch at /usr/bin/../lib/libgit2.so (unknown line) unknown function (ip: 0x7f0340bdacb2) #fetch at ./none:0 [inlined] #fetch#115 at /build/julia/src/julia-1.3.1/usr/share/julia/stdlib/v1.3/LibGit2/src/LibGit2.jl:290 #fetch at ./none:0 #fetch#5 at /build/julia/src/julia-1.3.1/usr/share/julia/stdlib/v1.3/Pkg/src/GitTools.jl:156 ``` Additional info: * package version: v1.3.1 * config and/or log files etc. * It is also mentioned here: https://discourse.julialang.org/t/pkg-crashes/34750/4 Steps to reproduce: Go to the package manager with ] and type `up` to update. |
This task depends upon
Closed by Antonio Rojas (arojas)
Saturday, 18 April 2020, 20:25 GMT
Reason for closing: Fixed
Additional comments about closing: julia 1.4.1-2
Saturday, 18 April 2020, 20:25 GMT
Reason for closing: Fixed
Additional comments about closing: julia 1.4.1-2
FS#65542it is mentioned that the crash was bisected to an update of:http-parser 2.9.2 -> 2.9.3
```
...
julia> Pkg.add("Test") # adding an stdlib doesn't require internet access
Cloning default registries into `/tmp/jl_2HmbMp`
Cloning registry from "https://github.com/JuliaRegistries/General.git"
signal (11): Segmentation fault
in expression starting at REPL[19]:1
unknown function (ip: 0x7f8f80d00e73)
http_parser_execute at /usr/lib/libhttp_parser.so.2.9 (unknown line)
unknown function (ip: 0x7f8f80d02390)
unknown function (ip: 0x7f8f80d04770)
unknown function (ip: 0x7f8f80d06b58)
unknown function (ip: 0x7f8f80d04f91)
git_remote_fetch at /.../aur/julia-mkl/src/julia-1.3.1/usr/bin/../lib/julia/libgit2.so (unknown line)
git_clone at /.../aur/julia-mkl/src/julia-1.3.1/usr/bin/../lib/julia/libgit2.so (unknown line)
...
```
```
(v1.3) pkg> up
Updating registry at `~/.julia/registries/General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
┌ Warning: Some registries failed to update:
│ — /home/zorn/.julia/registries/General — failed to fetch from repo
└ @ Pkg.Types /build/julia/src/julia-1.3.1/usr/share/julia/stdlib/v1.3/Pkg/src/Types.jl:1199
Updating git-repo `https://github.com/Evizero/UnicodePlots.jl.git`
ERROR: failed to fetch from https://github.com/Evizero/UnicodePlots.jl.git, error: GitError(Code:ERROR, Class:Invalid, invalid version 0 on git_proxy_options)
```
https://github.com/libgit2/libgit2/blob/master/docs/changelog.md
Maybe try to add these lines in prepare() PKGBUILD of julia:
cd stdlib/LibGit2/src
sed -i "s/:git_cred/:git_credential/g" callbacks.jl
and rebuild (it takes hours on my computer, so I could not try it yet).
[2020-03-01T19:37:32+0100] [ALPM] upgraded glib2 (2.62.5-1 -> 2.64.0-1)
[2020-03-01T19:37:32+0100] [ALPM] upgraded glib2-docs (2.62.5-1 -> 2.64.0-1)
[2020-03-01T19:37:32+0100] [ALPM] upgraded lib32-glib2 (2.62.5-1 -> 2.64.0-1)
```
pkg> repository remove General
pkg> repository add General
Cloning registry from "https://github.com/JuliaRegistries/General.git"
ERROR: failed to clone from https://github.com/JuliaRegistries/General.git, error: GitError(Code:ERROR, Class:Invalid, invalid version 0 on git_proxy_options)
```
Using: libgit2 1:0.99.0-2, (glib2 2.64.0-1), julia 2:1.3.1-1
The function `git_proxy_options` is part of libgit2.
Incidentally, I also get a test failure if I allow check() to run (LinearAlgebra/lu reports a failure), but I don't think this is related.
Upstream only supports the version of libgit2 bundled with Julia, so an official patch for Julia 1.3 and libgit2 0.99.0 is unlikely: https://github.com/JuliaLang/julia/issues/35043
(@v1.4) pkg> add Unitful
Cloning default registries into `~/tmp/cleandepot`
Cloning registry from "https://github.com/JuliaRegistries/General.git"
ERROR: failed to clone from https://github.com/JuliaRegistries/General.git, error: GitError(Code:ERROR, Class:Invalid, invalid version 0 on git_proxy_options)
As a temporary workaround until the package is fixed, calling Julia as "JULIA_PKG_SERVER=pkg.julialang.org julia" (cf. https://bugs.archlinux.org/task/65540#comment187329) should allow you to download and update packages as well. This doesn't fix the LibGit2 issue, but avoids using this library for downloading packages altogether.
Can someone confirm that applying the patch solves the issue?
Quoted from the julia issue: "If you already have the registry as a git clone it will keep using it as a git clone instead of using the Pkg server, thats why you have to delete it."
I hope the patch can be incorporated.
The `General` registry (list of packages) is maintained on GitHub. So `JULIA_PKG_SERVER` does
not solve the bug, pulling registries from GitHub.
Refresh the General repository; "pkg> registry remove General" and "pkg> registry add General"