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

GC error on Julia master #3

Open
vchuravy opened this issue Jan 13, 2022 · 1 comment
Open

GC error on Julia master #3

vchuravy opened this issue Jan 13, 2022 · 1 comment

Comments

@vchuravy
Copy link

As seen on PkgEval https://s3.amazonaws.com/julialang-reports/nanosoldier/pkgeval/by_hash/ff8b327_vs_29ea1fe/Air.1.8.0-DEV-593ff735b36.log

vchuravy@odin ~/b/julia> ./julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.8.0-DEV.1261 (2022-01-10)
 _/ |\__'_|_|_|\__'_|  |  vc/funcinfo/c4ca9dc171* (fork: 1 commits, 4 days)
|__/                   |

(@v1.8) pkg> activate --temp
  Activating new project at `/tmp/jl_SuLou8`

(jl_SuLou8) pkg> add Air
    Updating registry at `~/.julia/registries/Experimental`
    Updating git-repo `https://github.com/vchuravy/Experimental`
    Updating registry at `~/.julia/registries/General`
    Updating git-repo `https://github.com/JuliaRegistries/General.git`
   Resolving package versions...
   Installed Air ─ v0.1.1
    Updating `/tmp/jl_SuLou8/Project.toml`
  [0c3b9dc7] + Air v0.1.1
    Updating `/tmp/jl_SuLou8/Manifest.toml`
  [0c3b9dc7] + Air v0.1.1
  [34da2185] + Compat v3.41.0
  [864edb3b] + DataStructures v0.18.11
  [ffbed154] + DocStringExtensions v0.8.6
⌅ [e30172f5] + Documenter v0.26.3
⌅ [b5f81e59] + IOCapture v0.1.1
  [682c06a0] + JSON v0.21.2
  [bac558e1] + OrderedCollections v1.4.1
  [69de0a69] + Parsers v2.1.3
  [0dad84c5] + ArgTools v1.1.1
  [56f22d72] + Artifacts
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [8bb1440f] + DelimitedFiles
  [8ba89e20] + Distributed
  [f43a241f] + Downloads v1.6.0
  [7b1f6079] + FileWatching
  [b77e0a4c] + InteractiveUtils
  [b27032c2] + LibCURL v0.6.3
  [76f85450] + LibGit2
  [8f399da3] + Libdl
  [37e2e46d] + LinearAlgebra
  [56ddb016] + Logging
  [d6f4376e] + Markdown
  [a63ad114] + Mmap
  [ca575930] + NetworkOptions v1.2.0
  [44cfe95a] + Pkg v1.8.0
  [de0858da] + Printf
  [3fa0cd96] + REPL
  [9a3f8284] + Random
  [ea8e919c] + SHA v0.7.0
  [9e88b42a] + Serialization
  [1a1011a3] + SharedArrays
  [6462fe0b] + Sockets
  [2f01184e] + SparseArrays
  [10745b16] + Statistics
  [fa267f1f] + TOML v1.0.0
  [a4e569a6] + Tar v1.10.0
  [8dfed614] + Test
  [cf7118a7] + UUIDs
  [4ec0a83e] + Unicode
  [e66e0078] + CompilerSupportLibraries_jll v0.5.0+0
  [deac9b47] + LibCURL_jll v7.73.0+4
  [29816b5a] + LibSSH2_jll v1.9.1+2
  [c8ffd9c3] + MbedTLS_jll v2.24.0+2
  [14a3606d] + MozillaCACerts_jll v2020.7.22
  [4536629a] + OpenBLAS_jll v0.3.17+2
  [83775a58] + Zlib_jll v1.2.12+1
  [8e850b90] + libblastrampoline_jll v3.1.0+0
  [8e850ede] + nghttp2_jll v1.41.0+1
  [3f19e933] + p7zip_jll v16.2.1+1
        Info Packages marked with ⌅ have new versions available but cannot be upgraded. To see why use `status --outdated`
Precompiling project...
  12 dependencies successfully precompiled in 7 seconds. 3 already precompiled.

(jl_SuLou8) pkg> test Air
     Testing Air
      Status `/tmp/jl_XstNlg/Project.toml`
  [0c3b9dc7] Air v0.1.1
  [864edb3b] DataStructures v0.18.11
⌅ [e30172f5] Documenter v0.26.3
  [9a3f8284] Random `@stdlib/Random`
  [2f01184e] SparseArrays `@stdlib/SparseArrays`
  [8dfed614] Test `@stdlib/Test`
      Status `/tmp/jl_XstNlg/Manifest.toml`
  [0c3b9dc7] Air v0.1.1
  [34da2185] Compat v3.41.0
  [864edb3b] DataStructures v0.18.11
  [ffbed154] DocStringExtensions v0.8.6
⌅ [e30172f5] Documenter v0.26.3
⌅ [b5f81e59] IOCapture v0.1.1
  [682c06a0] JSON v0.21.2
  [bac558e1] OrderedCollections v1.4.1
  [69de0a69] Parsers v2.1.3
  [0dad84c5] ArgTools v1.1.1 `@stdlib/ArgTools`
  [56f22d72] Artifacts `@stdlib/Artifacts`
  [2a0f44e3] Base64 `@stdlib/Base64`
  [ade2ca70] Dates `@stdlib/Dates`
  [8bb1440f] DelimitedFiles `@stdlib/DelimitedFiles`
  [8ba89e20] Distributed `@stdlib/Distributed`
  [f43a241f] Downloads v1.6.0 `@stdlib/Downloads`
  [7b1f6079] FileWatching `@stdlib/FileWatching`
  [b77e0a4c] InteractiveUtils `@stdlib/InteractiveUtils`
  [b27032c2] LibCURL v0.6.3 `@stdlib/LibCURL`
  [76f85450] LibGit2 `@stdlib/LibGit2`
  [8f399da3] Libdl `@stdlib/Libdl`
  [37e2e46d] LinearAlgebra `@stdlib/LinearAlgebra`
  [56ddb016] Logging `@stdlib/Logging`
  [d6f4376e] Markdown `@stdlib/Markdown`
  [a63ad114] Mmap `@stdlib/Mmap`
  [ca575930] NetworkOptions v1.2.0 `@stdlib/NetworkOptions`
  [44cfe95a] Pkg v1.8.0 `@stdlib/Pkg`
  [de0858da] Printf `@stdlib/Printf`
  [3fa0cd96] REPL `@stdlib/REPL`
  [9a3f8284] Random `@stdlib/Random`
  [ea8e919c] SHA v0.7.0 `@stdlib/SHA`
  [9e88b42a] Serialization `@stdlib/Serialization`
  [1a1011a3] SharedArrays `@stdlib/SharedArrays`
  [6462fe0b] Sockets `@stdlib/Sockets`
  [2f01184e] SparseArrays `@stdlib/SparseArrays`
  [10745b16] Statistics `@stdlib/Statistics`
  [fa267f1f] TOML v1.0.0 `@stdlib/TOML`
  [a4e569a6] Tar v1.10.0 `@stdlib/Tar`
  [8dfed614] Test `@stdlib/Test`
  [cf7118a7] UUIDs `@stdlib/UUIDs`
  [4ec0a83e] Unicode `@stdlib/Unicode`
  [e66e0078] CompilerSupportLibraries_jll v0.5.0+0 `@stdlib/CompilerSupportLibraries_jll`
  [deac9b47] LibCURL_jll v7.73.0+4 `@stdlib/LibCURL_jll`
  [29816b5a] LibSSH2_jll v1.9.1+2 `@stdlib/LibSSH2_jll`
  [c8ffd9c3] MbedTLS_jll v2.24.0+2 `@stdlib/MbedTLS_jll`
  [14a3606d] MozillaCACerts_jll v2020.7.22 `@stdlib/MozillaCACerts_jll`
  [4536629a] OpenBLAS_jll v0.3.17+2 `@stdlib/OpenBLAS_jll`
  [83775a58] Zlib_jll v1.2.12+1 `@stdlib/Zlib_jll`
  [8e850b90] libblastrampoline_jll v3.1.0+0 `@stdlib/libblastrampoline_jll`
  [8e850ede] nghttp2_jll v1.41.0+1 `@stdlib/nghttp2_jll`
  [3f19e933] p7zip_jll v16.2.1+1 `@stdlib/p7zip_jll`
        Info Packages marked with ⌅ have new versions available but cannot be upgraded. To see why use `status --outdated`
     Testing Running tests...

signal (11): Segmentation fault
in expression starting at /home/vchuravy/.julia/packages/Air/0ciXC/test/api.jl:4
gc_try_setmark at /home/vchuravy/src/julia/src/gc.c:1711 [inlined]
gc_mark_loop at /home/vchuravy/src/julia/src/gc.c:2303
_jl_gc_collect at /home/vchuravy/src/julia/src/gc.c:3044
ijl_gc_collect at /home/vchuravy/src/julia/src/gc.c:3273
maybe_collect at /home/vchuravy/src/julia/src/gc.c:884 [inlined]
ijl_gc_pool_alloc at /home/vchuravy/src/julia/src/gc.c:1211
jl_gc_alloc_ at /home/vchuravy/src/julia/src/julia_internal.h:359 [inlined]
jl_gc_alloc at /home/vchuravy/src/julia/src/gc.c:3318
_new_array_ at /home/vchuravy/src/julia/src/array.c:134
ijl_array_copy at /home/vchuravy/src/julia/src/array.c:1178
copy at ./array.jl:369 [inlined]
setindex at /home/vchuravy/.julia/packages/Air/0ciXC/src/api.jl:216 [inlined]
setindex at /home/vchuravy/.julia/packages/Air/0ciXC/src/ptree.jl:763
unknown function (ip: 0x7fbc1d2b46d5)
_jl_invoke at /home/vchuravy/src/julia/src/gf.c:2285 [inlined]
ijl_apply_generic at /home/vchuravy/src/julia/src/gf.c:2486
setindex at /home/vchuravy/.julia/packages/Air/0ciXC/src/pdict.jl:296
_pheap_swap at /home/vchuravy/.julia/packages/Air/0ciXC/src/pheap.jl:72
_pheap_fix_up at /home/vchuravy/.julia/packages/Air/0ciXC/src/pheap.jl:98
_pheap_fixw at /home/vchuravy/.julia/packages/Air/0ciXC/src/pheap.jl:156 [inlined]
push at /home/vchuravy/.julia/packages/Air/0ciXC/src/pheap.jl:183
push at /home/vchuravy/.julia/packages/Air/0ciXC/src/pwdict.jl:124 [inlined]
BottomRF at ./reduce.jl:81 [inlined]
afoldl at ./operators.jl:628
_jl_invoke at /home/vchuravy/src/julia/src/gf.c:2285 [inlined]
ijl_apply_generic at /home/vchuravy/src/julia/src/gf.c:2486
jl_apply at /home/vchuravy/src/julia/src/julia.h:1777 [inlined]
do_apply at /home/vchuravy/src/julia/src/builtins.c:713
_foldl_impl at ./tuple.jl:277 [inlined]
foldl_impl at ./reduce.jl:48 [inlined]
mapfoldl_impl at ./reduce.jl:44
unknown function (ip: 0x7fbc1d30356f)
_jl_invoke at /home/vchuravy/src/julia/src/gf.c:2285 [inlined]
ijl_apply_generic at /home/vchuravy/src/julia/src/gf.c:2486
#mapfoldl#254 at ./reduce.jl:162
mapfoldl##kw at ./reduce.jl:162 [inlined]
#mapreduce#258 at ./reduce.jl:294 [inlined]
mapreduce##kw at ./reduce.jl:294 [inlined]
#reduce#260 at ./reduce.jl:475 [inlined]
reduce##kw at ./reduce.jl:475
unknown function (ip: 0x7fbc1d3032cf)
_jl_invoke at /home/vchuravy/src/julia/src/gf.c:2285 [inlined]
ijl_apply_generic at /home/vchuravy/src/julia/src/gf.c:2486
PWDict at /home/vchuravy/.julia/packages/Air/0ciXC/src/pwdict.jl:70
_jl_invoke at /home/vchuravy/src/julia/src/gf.c:2285 [inlined]
ijl_apply_generic at /home/vchuravy/src/julia/src/gf.c:2486
jl_apply at /home/vchuravy/src/julia/src/julia.h:1777 [inlined]
do_apply at /home/vchuravy/src/julia/src/builtins.c:713
_jl_invoke at /home/vchuravy/src/julia/src/gf.c:2285 [inlined]
ijl_apply_generic at /home/vchuravy/src/julia/src/gf.c:2486
jl_apply at /home/vchuravy/src/julia/src/julia.h:1777 [inlined]
do_call at /home/vchuravy/src/julia/src/interpreter.c:126
eval_value at /home/vchuravy/src/julia/src/interpreter.c:215
eval_body at /home/vchuravy/src/julia/src/interpreter.c:468
eval_body at /home/vchuravy/src/julia/src/interpreter.c:523
eval_body at /home/vchuravy/src/julia/src/interpreter.c:523
eval_body at /home/vchuravy/src/julia/src/interpreter.c:523
eval_body at /home/vchuravy/src/julia/src/interpreter.c:523
jl_interpret_toplevel_thunk at /home/vchuravy/src/julia/src/interpreter.c:745
jl_toplevel_eval_flex at /home/vchuravy/src/julia/src/toplevel.c:888
jl_toplevel_eval_flex at /home/vchuravy/src/julia/src/toplevel.c:832
ijl_toplevel_eval_in at /home/vchuravy/src/julia/src/toplevel.c:947
eval at ./boot.jl:369 [inlined]
include_string at ./loading.jl:1251
_jl_invoke at /home/vchuravy/src/julia/src/gf.c:2285 [inlined]
ijl_apply_generic at /home/vchuravy/src/julia/src/gf.c:2486
_include at ./loading.jl:1308
include at ./client.jl:460
unknown function (ip: 0x7fbc1d29e062)
_jl_invoke at /home/vchuravy/src/julia/src/gf.c:2285 [inlined]
ijl_apply_generic at /home/vchuravy/src/julia/src/gf.c:2486
jl_apply at /home/vchuravy/src/julia/src/julia.h:1777 [inlined]
do_call at /home/vchuravy/src/julia/src/interpreter.c:126
eval_value at /home/vchuravy/src/julia/src/interpreter.c:215
eval_stmt_value at /home/vchuravy/src/julia/src/interpreter.c:166 [inlined]
eval_body at /home/vchuravy/src/julia/src/interpreter.c:599
eval_body at /home/vchuravy/src/julia/src/interpreter.c:523
eval_body at /home/vchuravy/src/julia/src/interpreter.c:523
jl_interpret_toplevel_thunk at /home/vchuravy/src/julia/src/interpreter.c:745
jl_toplevel_eval_flex at /home/vchuravy/src/julia/src/toplevel.c:888
jl_toplevel_eval_flex at /home/vchuravy/src/julia/src/toplevel.c:832
ijl_toplevel_eval_in at /home/vchuravy/src/julia/src/toplevel.c:947
eval at ./boot.jl:369 [inlined]
include_string at ./loading.jl:1251
_jl_invoke at /home/vchuravy/src/julia/src/gf.c:2285 [inlined]
ijl_apply_generic at /home/vchuravy/src/julia/src/gf.c:2486
_include at ./loading.jl:1308
include at ./client.jl:460
unknown function (ip: 0x7fbc1d29e062)
_jl_invoke at /home/vchuravy/src/julia/src/gf.c:2285 [inlined]
ijl_apply_generic at /home/vchuravy/src/julia/src/gf.c:2486
jl_apply at /home/vchuravy/src/julia/src/julia.h:1777 [inlined]
do_call at /home/vchuravy/src/julia/src/interpreter.c:126
eval_value at /home/vchuravy/src/julia/src/interpreter.c:215
eval_stmt_value at /home/vchuravy/src/julia/src/interpreter.c:166 [inlined]
eval_body at /home/vchuravy/src/julia/src/interpreter.c:599
jl_interpret_toplevel_thunk at /home/vchuravy/src/julia/src/interpreter.c:745
jl_toplevel_eval_flex at /home/vchuravy/src/julia/src/toplevel.c:888
jl_toplevel_eval_flex at /home/vchuravy/src/julia/src/toplevel.c:832
ijl_toplevel_eval_in at /home/vchuravy/src/julia/src/toplevel.c:947
eval at ./boot.jl:369 [inlined]
exec_options at ./client.jl:280
_start at ./client.jl:506
jfptr__start_50857 at /home/vchuravy/builds/julia/usr/lib/julia/sys.so (unknown line)
_jl_invoke at /home/vchuravy/src/julia/src/gf.c:2285 [inlined]
ijl_apply_generic at /home/vchuravy/src/julia/src/gf.c:2486
jl_apply at /home/vchuravy/src/julia/src/julia.h:1777 [inlined]
true_main at /home/vchuravy/src/julia/src/jlapi.c:562
jl_repl_entrypoint at /home/vchuravy/src/julia/src/jlapi.c:706
main at /home/vchuravy/src/julia/cli/loader_exe.c:59
__libc_start_main at /usr/lib/libc.so.6 (unknown line)
_start at /home/vchuravy/builds/julia/usr/bin/julia (unknown line)
Allocations: 14659175 (Pool: 14653902; Big: 5273); GC: 18
ERROR: Package Air errored during testing (received signal: 11)

(jl_SuLou8) pkg> 

Before I dive in to see if this is a JuliaLang proper bug, are you doing anything interesting with memory?

@noahbenson
Copy link
Owner

noahbenson commented Jan 13, 2022

Hmm, not that I'm aware of! I haven't really studied the Julia GC or allocation system in depth yet myself. All the allocations in Air, I believe, are either made via the copy() function or are just plain constructor allocations. Nor does Air ever call the GC nor deallocate memory itself.

Probably not related, but I recall noticing during tests that the GC could get temporarily pretty slow if you performed a lot of small allocations and deletions in one go (e.g., by building up a PDict from a very large Dict one key-value pair at a time). This isn't really a surprise, though; I mostly just noticed that it seemed to perform worse with these small allocations than the JVM did under a similar task. I haven't seen any crashes like this.

Let me know if I can be of any help with debugging this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants