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

Segfault in LibGit2 tests on Alpine Linux #28805

Closed
ararslan opened this issue Aug 21, 2018 · 2 comments · Fixed by #45638
Closed

Segfault in LibGit2 tests on Alpine Linux #28805

ararslan opened this issue Aug 21, 2018 · 2 comments · Fixed by #45638
Labels
compiler:musl Support for musl linked binaries on linux instead of glibc libgit2 The libgit2 library or the LibGit2 stdlib module system:linux Affects only Linux

Comments

@ararslan
Copy link
Member

Running the LibGit2 tests on Alpine Linux segfaults. Looks related to #27109, which was also occurring on Alpine Linux, but segfaults seem markedly worse...

Full log: https://gist.github.com/ararslan/0dcca48e790c6e2e3006659dd3664f98

/home/alex/julia # ./julia test/runtests.jl LibGit2/libgit2
Test        (Worker) | Time (s) | GC (s) | GC % | Alloc (MB) | RSS (MB)
The following 'Resetting the helper list...' warning is expected:
┌ Warning: Resetting the helper list is currently unsupported:
│ ignoring all git credential helpers
└ @ LibGit2 /home/alex/julia/usr/share/julia/stdlib/v1.1/LibGit2/src/gitcredential.jl:229
SSH credential prompt: Error During Test at /home/alex/julia/usr/share/julia/stdlib/v1.1/LibGit2/test/libgit2.jl:2078
  Got exception outside of a @test
  Could not locate challenge: "Passphrase for /home/alex/julia/usr/share/julia/stdlib/v1.1/LibGit2/test/keys/valid-passphrase: ". Process output found:
  """
  
  signal (11): Segmentation fault
  in expression starting at no file:0
  strlen at /lib/ld-musl-x86_64.so.1 (unknown line)
  jl_apply_generic at /home/alex/julia/src/gf.c:2183
  getpass at ./util.jl:491
  authenticate_ssh at /home/alex/julia/usr/share/julia/stdlib/v1.1/LibGit2/src/callbacks.jl:159
  credentials_callback at /home/alex/julia/usr/share/julia/stdlib/v1.1/LibGit2/src/callbacks.jl:318
  jl_sysimg_fvars_base at /home/alex/julia/usr/lib/julia/sys.so (unknown line)
  jl_apply_generic at /home/alex/julia/src/gf.c:2183
  unknown function (ip: 0x7f8689b53320)
  #credential_loop#7 at /home/alex/julia/usr/share/julia/stdlib/v1.1/LibGit2/test/libgit2-helpers.jl:31
  unknown function (ip: 0x7f8689b53185)
  jl_fptr_trampoline at /home/alex/julia/src/gf.c:1829
  jl_apply_generic at /home/alex/julia/src/gf.c:2183
  #credential_loop at ./none:0 [inlined]
  #credential_loop#9 at /home/alex/julia/usr/share/julia/stdlib/v1.1/LibGit2/test/libgit2-helpers.jl:77 [inlined]
  credential_loop at /home/alex/julia/usr/share/julia/stdlib/v1.1/LibGit2/test/libgit2-helpers.jl:77 [inlined]
  credential_loop at /home/alex/julia/usr/share/julia/stdlib/v1.1/LibGit2/test/libgit2-helpers.jl:77
  jl_fptr_trampoline at /home/alex/julia/src/gf.c:1829
  jl_apply_generic at /home/alex/julia/src/gf.c:2183
  do_call at /home/alex/julia/src/interpreter.c:324
  eval_value at /home/alex/julia/src/interpreter.c:430
  eval_stmt_value at /home/alex/julia/src/interpreter.c:363 [inlined]
  eval_body at /home/alex/julia/src/interpreter.c:684
  jl_interpret_toplevel_thunk_callback at /home/alex/julia/src/interpreter.c:803
  unknown function (ip: 0xfffffffffffffffe)
  unknown function (ip: 0x7f86a094096f)
  unknown function (ip: 0)
  jl_interpret_toplevel_thunk at /home/alex/julia/src/interpreter.c:812
  jl_toplevel_eval_flex at /home/alex/julia/src/toplevel.c:792
  jl_toplevel_eval_in at /home/alex/julia/src/builtins.c:622
  eval at ./boot.jl:319 [inlined]
  eval at ./client.jl:389
  jl_fptr_trampoline at /home/alex/julia/src/gf.c:1829
  jl_apply_generic at /home/alex/julia/src/gf.c:2183
  #3 at ./none:7
  #open#294 at ./iostream.jl:369
  jl_fptr_trampoline at /home/alex/julia/src/gf.c:1829
  jl_apply_generic at /home/alex/julia/src/gf.c:2183
  open at ./iostream.jl:367
  jl_fptr_trampoline at /home/alex/julia/src/gf.c:1829
  jl_apply_generic at /home/alex/julia/src/gf.c:2183
  do_call at /home/alex/julia/src/interpreter.c:324
  eval_value at /home/alex/julia/src/interpreter.c:430
  eval_stmt_value at /home/alex/julia/src/interpreter.c:363 [inlined]
  eval_body at /home/alex/julia/src/interpreter.c:684
  jl_interpret_toplevel_thunk_callback at /home/alex/julia/src/interpreter.c:803
  unknown function (ip: 0xfffffffffffffffe)
  unknown function (ip: 0x7f869eff0d2f)
  unknown function (ip: 0x7)
  jl_interpret_toplevel_thunk at /home/alex/julia/src/interpreter.c:812
  jl_toplevel_eval_flex at /home/alex/julia/src/toplevel.c:792
  jl_toplevel_eval_flex at /home/alex/julia/src/toplevel.c:739
  jl_toplevel_eval_in at /home/alex/julia/src/builtins.c:622
  eval at ./boot.jl:319
  jl_apply_generic at /home/alex/julia/src/gf.c:2183
  macro expansion at ./logging.jl:317 [inlined]
  exec_options at ./client.jl:219
  _start at ./client.jl:421
  jl_apply_generic at /home/alex/julia/src/gf.c:2183
  jl_apply at /home/alex/julia/ui/../src/julia.h:1552 [inlined]
  true_main at /home/alex/julia/ui/repl.c:112
  main at /home/alex/julia/ui/repl.c:233
  __libc_start_main at /lib/ld-musl-x86_64.so.1 (unknown line)
  Allocations: 793340 (Pool: 793071; Big: 269); GC: 0
  
  """
  Stacktrace:
   [1] show_method_candidates(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::MethodError, ::Any) at ./error.jl:42
   [2] macro expansion at ./task.jl:266 [inlined]
   [3] (::getfield(Main.Test5Main_LibGit2_libgit2.LibGit2Tests, Symbol("##7#10")){Int64,Cmd,Array{Pair{String,String},1},getfield(Main.Test5Main_LibGit2_libgit2.LibGit2Tests, Symbol("#format_output#9")){Bool},Base.GenericIOBuffer{Array{UInt8,1}}})(::RawFD, ::Base.TTY) at /home/alex/julia/usr/share/julia/stdlib/v1.1/LibGit2/test/libgit2.jl:56
   [4] with_fake_pty(::getfield(Main.Test5Main_LibGit2_libgit2.LibGit2Tests, Symbol("##7#10")){Int64,Cmd,Array{Pair{String,String},1},getfield(Main.Test5Main_LibGit2_libgit2.LibGit2Tests, Symbol("#format_output#9")){Bool},Base.GenericIOBuffer{Array{UInt8,1}}}) at /home/alex/julia/usr/share/julia/test/testhelpers/FakePTYs.jl:32
   [5] #challenge_prompt#6 at /home/alex/julia/usr/share/julia/stdlib/v1.1/LibGit2/test/libgit2.jl:50 [inlined]
   [6] #challenge_prompt at ./none:0 [inlined]
   [7] #challenge_prompt#1(::Int64, ::Bool, ::Function, ::Expr, ::Array{Pair{String,String},1}) at /home/alex/julia/usr/share/julia/stdlib/v1.1/LibGit2/test/libgit2.jl:31
   [8] challenge_prompt at /home/alex/julia/usr/share/julia/stdlib/v1.1/LibGit2/test/libgit2.jl:14 [inlined]
   [9] (::getfield(Main.Test5Main_LibGit2_libgit2.LibGit2Tests, Symbol("##114#234")){Expr})() at /home/alex/julia/usr/share/julia/stdlib/v1.1/LibGit2/test/libgit2.jl:2120
   [10] withenv(::getfield(Main.Test5Main_LibGit2_libgit2.LibGit2Tests, Symbol("##114#234")){Expr}, ::Pair{String,String}) at ./env.jl:148
   [11] macro expansion at /home/alex/julia/usr/share/julia/stdlib/v1.1/LibGit2/test/libgit2.jl:699 [inlined]
   [12] macro expansion at /home/alex/julia/usr/share/julia/stdlib/v1.1/Test/src/Test.jl:1083 [inlined]
   [13] macro expansion at /home/alex/julia/usr/share/julia/stdlib/v1.1/Test/src/Test.jl:1071 [inlined]
   [14] (::getfield(Main.Test5Main_LibGit2_libgit2.LibGit2Tests, Symbol("##19#134")))(::String) at /home/alex/julia/usr/share/julia/stdlib/v1.1/LibGit2/test/libgit2.jl:557
   [15] mktempdir(::getfield(Main.Test5Main_LibGit2_libgit2.LibGit2Tests, Symbol("##19#134")), ::String) at ./file.jl:576
   [16] mktempdir(::Function) at ./file.jl:574
   [17] top-level scope at none:0
   [18] include at ./boot.jl:317 [inlined]
   [19] include_relative at ./loading.jl:1038
   [20] include at ./sysimg.jl:29 [inlined]
   [21] include(::String) at /home/alex/julia/test/testdefs.jl:13
   [22] macro expansion at /home/alex/julia/test/testdefs.jl:22 [inlined]
   [23] macro expansion at /home/alex/julia/usr/share/julia/stdlib/v1.1/Test/src/Test.jl:1083 [inlined]
   [24] macro expansion at /home/alex/julia/test/testdefs.jl:21 [inlined]
   [25] macro expansion at ./util.jl:289 [inlined]
   [26] top-level scope at /home/alex/julia/test/testdefs.jl:19 [inlined]
   [27] top-level scope at ./none:0
   [28] eval at ./boot.jl:319 [inlined]
   [29] #runtests#55(::UInt128, ::Function, ::String, ::String, ::Bool) at /home/alex/julia/test/testdefs.jl:25
   [30] #runtests at ./none:0 [inlined] (repeats 2 times)
   [31] #143 at /home/alex/julia/usr/share/julia/stdlib/v1.1/Distributed/src/remotecall.jl:339 [inlined]
   [32] run_work_thunk(::getfield(Distributed, Symbol("##143#144")){typeof(runtests),Tuple{String,String},Base.Iterators.Pairs{Symbol,UInt128,Tuple{Symbol},NamedTuple{(:seed,),Tuple{UInt128}}}}, ::Bool) at /home/alex/julia/usr/share/julia/stdlib/v1.1/Distributed/src/process_messages.jl:56
   [33] #remotecall_fetch#148(::Base.Iterators.Pairs{Symbol,UInt128,Tuple{Symbol},NamedTuple{(:seed,),Tuple{UInt128}}}, ::Function, ::Function, ::Distributed.LocalProcess, ::String, ::Vararg{String,N} where N) at /home/alex/julia/usr/share/julia/stdlib/v1.1/Distributed/src/remotecall.jl:364
   [34] (::getfield(Distributed, Symbol("#kw##remotecall_fetch")))(::NamedTuple{(:seed,),Tuple{UInt128}}, ::typeof(remotecall_fetch), ::Function, ::Distributed.LocalProcess, ::String, ::Vararg{String,N} where N) at ./none:0
   [35] #remotecall_fetch#152(::Base.Iterators.Pairs{Symbol,UInt128,Tuple{Symbol},NamedTuple{(:seed,),Tuple{UInt128}}}, ::Function, ::Function, ::Int64, ::String, ::Vararg{String,N} where N) at /home/alex/julia/usr/share/julia/stdlib/v1.1/Distributed/src/remotecall.jl:392
   [36] (::getfield(Distributed, Symbol("#kw##remotecall_fetch")))(::NamedTuple{(:seed,),Tuple{UInt128}}, ::typeof(remotecall_fetch), ::Function, ::Int64, ::String, ::Vararg{String,N} where N) at ./none:0
   [37] macro expansion at /home/alex/julia/test/runtests.jl:144 [inlined]
   [38] (::getfield(Main, Symbol("##45#52")))() at ./task.jl:259
@ecsx1
Copy link

ecsx1 commented Dec 23, 2019

Test run finished with errors but couldn't replicate the segfault.
https://pastebin.com/raw/Ah9ZKj5p

@giordano
Copy link
Contributor

Should have been fixed by #45638

@giordano giordano linked a pull request Jun 20, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:musl Support for musl linked binaries on linux instead of glibc libgit2 The libgit2 library or the LibGit2 stdlib module system:linux Affects only Linux
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants