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

Still getting GC crashes even with GAP_jll disabling task stack scanning #1032

Open
fingolfin opened this issue Sep 4, 2024 · 14 comments
Open

Comments

@fingolfin
Copy link
Member

... at least in CI, I cannot yet reproduce it locally.

@ThomasBreuer
Copy link
Member

I get the following on my notebook with Julia 1.8.5 and with GAP.jl as in the current master branch.

julia> versioninfo()
Julia Version 1.8.5
Commit 17cfb8e65ea (2023-01-08 06:45 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 8 × AMD Ryzen 7 3700U with Radeon Vega Mobile Gfx
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, znver1)
  Threads: 1 on 8 virtual cores

julia> using GAP
[ Info: Compiling JuliaInterface ...
 ┌───────┐   GAP 4.13.1 of 2024-06-11
 │  GAP  │   https://www.gap-system.org
 └───────┘   Architecture: x86_64-pc-linux-gnu-julia1.8-64-kv9
 Configuration:  gmp 6.2.1, Julia GC, Julia 1.8.5, readline
 Loading the library and packages ...
reading ~/.gap/gaprc
 Packages:   AClib 1.3.2, Alnuth 3.2.1dev, AtlasRep 2.1.9, AutPGrp 1.11, 
             Browse 1.8.21, CRISP 1.4.6, Cryst 4.1.27, CrystCat 1.1.10, 
             CTblLib 1.3.9, FactInt 1.6.3, FGA 1.5.0, Forms 1.2.11, 
             GAPDoc 1.6.7.dev, genss 1.6.8, IO 4.8.2, IRREDSOL 1.4.4, 
             JuliaInterface 0.11.1, LAGUNA 3.9.6, orb 4.9.0, Polenta 1.3.10, 
             Polycyclic 2.17dev, PrimGrp 3.4.4, RadiRoot 2.9, recog 1.4.3, 
             ResClasses 4.7.3, SmallGrp 1.5.3, Sophus 1.27, SpinSym 1.5.2, 
             StandardFF 1.0, TomLib 1.2.11, TransGrp 3.6.5, utils 0.85
 Try '??help' for help. See also '?copyright', '?cite' and '?authors'

julia> using Test

julia> include("test/Aqua.jl") # testfile in GAP.jl
Method ambiguity: Error During Test at /home/sam/.julia/packages/Aqua/tHrmY/src/Aqua.jl:67
  Got exception outside of a @test
  Failed to parse output of `detect_ambiguities`.
  The stdout was:
  
  
  The stderr was:
  
  signal (11): Segmentation fault
  in expression starting at none:8
  MarkBag at /workspace/srcdir/gap-4.13.1/src/julia_gc.c:1070 [inlined]
  MarkArrayOfBags at /workspace/srcdir/gap-4.13.1/src/bags.inc:21
  BagMarkFunc at /workspace/srcdir/gap-4.13.1/src/julia_gc.c:710
  gc_mark_loop at /cache/build/default-amdci4-2/julialang/julia-release-1-dot-8/src/gc.c:2830
  _jl_gc_collect at /cache/build/default-amdci4-2/julialang/julia-release-1-dot-8/src/gc.c:3117
  ijl_gc_collect at /cache/build/default-amdci4-2/julialang/julia-release-1-dot-8/src/gc.c:3346
  maybe_collect at /cache/build/default-amdci4-2/julialang/julia-release-1-dot-8/src/gc.c:903 [inlined]
  jl_gc_pool_alloc_inner at /cache/build/default-amdci4-2/julialang/julia-release-1-dot-8/src/gc.c:1247 [inlined]
  jl_gc_pool_alloc_noinline at /cache/build/default-amdci4-2/julialang/julia-release-1-dot-8/src/gc.c:1306 [inlined]
  jl_gc_alloc_ at /cache/build/default-amdci4-2/julialang/julia-release-1-dot-8/src/julia_internal.h:368 [inlined]
  jl_gc_alloc at /cache/build/default-amdci4-2/julialang/julia-release-1-dot-8/src/gc.c:3391
  NewBag at /workspace/srcdir/gap-4.13.1/src/julia_gc.c:982
  CodeFuncExprBegin at /workspace/srcdir/gap-4.13.1/src/code.c:812
  ReadFuncExprBody at /workspace/srcdir/gap-4.13.1/src/read.c:1285
  ReadFuncExprAbbrevSingle at /workspace/srcdir/gap-4.13.1/src/read.c:1452 [inlined]
  ReadCallVarAss at /workspace/srcdir/gap-4.13.1/src/read.c:830
  ReadAtom at /workspace/srcdir/gap-4.13.1/src/read.c:1587
  ReadFactor at /workspace/srcdir/gap-4.13.1/src/read.c:1658
  ReadTerm at /workspace/srcdir/gap-4.13.1/src/read.c:1707
  ReadAri at /workspace/srcdir/gap-4.13.1/src/read.c:1739
  ReadRel at /workspace/srcdir/gap-4.13.1/src/read.c:1776
  ReadAnd at /workspace/srcdir/gap-4.13.1/src/read.c:1813
  ReadExpr at /workspace/srcdir/gap-4.13.1/src/read.c:1888
  ReadSelector at /workspace/srcdir/gap-4.13.1/src/read.c:622
  ReadCallVarAss at /workspace/srcdir/gap-4.13.1/src/read.c:868
  ReadAtom at /workspace/srcdir/gap-4.13.1/src/read.c:1587
  ReadFactor at /workspace/srcdir/gap-4.13.1/src/read.c:1658
  ReadTerm at /workspace/srcdir/gap-4.13.1/src/read.c:1707
  ReadAri at /workspace/srcdir/gap-4.13.1/src/read.c:1739
  ReadRel at /workspace/srcdir/gap-4.13.1/src/read.c:1776
  ReadAnd at /workspace/srcdir/gap-4.13.1/src/read.c:1813
  ReadExpr at /workspace/srcdir/gap-4.13.1/src/read.c:1888
  ReadFuncExprBody at /workspace/srcdir/gap-4.13.1/src/read.c:1294
  ReadFuncExprAbbrevSingle at /workspace/srcdir/gap-4.13.1/src/read.c:1452 [inlined]
  ReadCallVarAss at /workspace/srcdir/gap-4.13.1/src/read.c:830
  ReadAtom at /workspace/srcdir/gap-4.13.1/src/read.c:1587
  ReadFactor at /workspace/srcdir/gap-4.13.1/src/read.c:1658
  ReadTerm at /workspace/srcdir/gap-4.13.1/src/read.c:1707
  ReadAri at /workspace/srcdir/gap-4.13.1/src/read.c:1739
  ReadRel at /workspace/srcdir/gap-4.13.1/src/read.c:1776
  ReadAnd at /workspace/srcdir/gap-4.13.1/src/read.c:1813
  ReadExpr at /workspace/srcdir/gap-4.13.1/src/read.c:1888
  ReadSelector at /workspace/srcdir/gap-4.13.1/src/read.c:622
  ReadCallVarAss at /workspace/srcdir/gap-4.13.1/src/read.c:868
  ReadAtom at /workspace/srcdir/gap-4.13.1/src/read.c:1587
  ReadFactor at /workspace/srcdir/gap-4.13.1/src/read.c:1658
  ReadTerm at /workspace/srcdir/gap-4.13.1/src/read.c:1707
  ReadAri at /workspace/srcdir/gap-4.13.1/src/read.c:1739
  ReadRel at /workspace/srcdir/gap-4.13.1/src/read.c:1776
  ReadAnd at /workspace/srcdir/gap-4.13.1/src/read.c:1813
  ReadExpr at /workspace/srcdir/gap-4.13.1/src/read.c:1888
  ReadSelector at /workspace/srcdir/gap-4.13.1/src/read.c:617
  ReadCallVarAss at /workspace/srcdir/gap-4.13.1/src/read.c:868
  ReadAtom at /workspace/srcdir/gap-4.13.1/src/read.c:1587
  ReadFactor at /workspace/srcdir/gap-4.13.1/src/read.c:1658
  ReadTerm at /workspace/srcdir/gap-4.13.1/src/read.c:1707
  ReadAri at /workspace/srcdir/gap-4.13.1/src/read.c:1739
  ReadRel at /workspace/srcdir/gap-4.13.1/src/read.c:1776
  ReadAnd at /workspace/srcdir/gap-4.13.1/src/read.c:1813
  ReadExpr at /workspace/srcdir/gap-4.13.1/src/read.c:1888
  ReadCallVarAss at /workspace/srcdir/gap-4.13.1/src/read.c:890
  TryReadStatement at /workspace/srcdir/gap-4.13.1/src/read.c:2404
  ReadStats at /workspace/srcdir/gap-4.13.1/src/read.c:2433
  ReadFuncExprBody at /workspace/srcdir/gap-4.13.1/src/read.c:1304
  ReadFuncExpr at /workspace/srcdir/gap-4.13.1/src/read.c:1396
  ReadLiteral at /workspace/srcdir/gap-4.13.1/src/read.c:1552
  ReadAtom at /workspace/srcdir/gap-4.13.1/src/read.c:1596
  ReadFactor at /workspace/srcdir/gap-4.13.1/src/read.c:1658
  ReadTerm at /workspace/srcdir/gap-4.13.1/src/read.c:1707
  ReadAri at /workspace/srcdir/gap-4.13.1/src/read.c:1739
  ReadRel at /workspace/srcdir/gap-4.13.1/src/read.c:1776
  ReadAnd at /workspace/srcdir/gap-4.13.1/src/read.c:1813
  ReadExpr at /workspace/srcdir/gap-4.13.1/src/read.c:1888
  ReadRecExpr at /workspace/srcdir/gap-4.13.1/src/read.c:1117
  ReadLiteral at /workspace/srcdir/gap-4.13.1/src/read.c:1546
  ReadAtom at /workspace/srcdir/gap-4.13.1/src/read.c:1596
  ReadFactor at /workspace/srcdir/gap-4.13.1/src/read.c:1658
  ReadTerm at /workspace/srcdir/gap-4.13.1/src/read.c:1707
  ReadAri at /workspace/srcdir/gap-4.13.1/src/read.c:1739
  ReadRel at /workspace/srcdir/gap-4.13.1/src/read.c:1776
  ReadAnd at /workspace/srcdir/gap-4.13.1/src/read.c:1813
  ReadExpr at /workspace/srcdir/gap-4.13.1/src/read.c:1888
  ReadSelector at /workspace/srcdir/gap-4.13.1/src/read.c:617
  ReadCallVarAss at /workspace/srcdir/gap-4.13.1/src/read.c:868
  ReadAtom at /workspace/srcdir/gap-4.13.1/src/read.c:1587
  ReadFactor at /workspace/srcdir/gap-4.13.1/src/read.c:1658
  ReadTerm at /workspace/srcdir/gap-4.13.1/src/read.c:1707
  ReadAri at /workspace/srcdir/gap-4.13.1/src/read.c:1739
  ReadRel at /workspace/srcdir/gap-4.13.1/src/read.c:1776
  ReadAnd at /workspace/srcdir/gap-4.13.1/src/read.c:1813
  ReadExpr at /workspace/srcdir/gap-4.13.1/src/read.c:1888
  ReadSelector at /workspace/srcdir/gap-4.13.1/src/read.c:622
  ReadCallVarAss at /workspace/srcdir/gap-4.13.1/src/read.c:868
  ReadAtom at /workspace/srcdir/gap-4.13.1/src/read.c:1587
  ReadFactor at /workspace/srcdir/gap-4.13.1/src/read.c:1658
  ReadTerm at /workspace/srcdir/gap-4.13.1/src/read.c:1707
  ReadAri at /workspace/srcdir/gap-4.13.1/src/read.c:1739
  ReadRel at /workspace/srcdir/gap-4.13.1/src/read.c:1776
  ReadAnd at /workspace/srcdir/gap-4.13.1/src/read.c:1813
  ReadExpr at /workspace/srcdir/gap-4.13.1/src/read.c:1888
  ReadEvalCommand at /workspace/srcdir/gap-4.13.1/src/read.c:2559
  READ_GAP_ROOT at /workspace/srcdir/gap-4.13.1/src/streams.c:409
  FuncREAD_GAP_ROOT at /workspace/srcdir/gap-4.13.1/src/streams.c:938
  CALL_1ARGS at /workspace/srcdir/gap-4.13.1/src/calls.h:311 [inlined]
  EvalOrExecCall at /workspace/srcdir/gap-4.13.1/src/funcs.c:147 [inlined]
  EvalFunccall1args at /workspace/srcdir/gap-4.13.1/src/funcs.c:303
  EVAL_EXPR at /workspace/srcdir/gap-4.13.1/src/exprs.h:98 [inlined]
  EvalUnknownBool at /workspace/srcdir/gap-4.13.1/src/exprs.c:101
  EVAL_BOOL_EXPR at /workspace/srcdir/gap-4.13.1/src/exprs.h:128 [inlined]
  EvalNot at /workspace/srcdir/gap-4.13.1/src/exprs.c:212
  EVAL_EXPR at /workspace/srcdir/gap-4.13.1/src/exprs.h:98 [inlined]
  ExecAssLVar at /workspace/srcdir/gap-4.13.1/src/vars.c:141
  EXEC_STAT at /workspace/srcdir/gap-4.13.1/src/stats.c:55 [inlined]
  ExecSeqStatHelper at /workspace/srcdir/gap-4.13.1/src/stats.c:147 [inlined]
  ExecSeqStat6 at /workspace/srcdir/gap-4.13.1/src/stats.c:185
  EXEC_STAT at /workspace/srcdir/gap-4.13.1/src/stats.c:55 [inlined]
  EXEC_CURR_FUNC at /workspace/srcdir/gap-4.13.1/src/stats.c:61
  DoExecFunc at /workspace/srcdir/gap-4.13.1/src/funcs.c:467 [inlined]
  DoExecFunc1args at /workspace/srcdir/gap-4.13.1/src/funcs.c:488
  CALL_1ARGS at /workspace/srcdir/gap-4.13.1/src/calls.h:311 [inlined]
  IntrFuncCallEnd at /workspace/srcdir/gap-4.13.1/src/intrprtr.c:395
  EvalRef at /workspace/srcdir/gap-4.13.1/src/read.c:367
  ReadCallVarAss at /workspace/srcdir/gap-4.13.1/src/read.c:874
  ReadAtom at /workspace/srcdir/gap-4.13.1/src/read.c:1587
  ReadFactor at /workspace/srcdir/gap-4.13.1/src/read.c:1658
  ReadTerm at /workspace/srcdir/gap-4.13.1/src/read.c:1707
  ReadAri at /workspace/srcdir/gap-4.13.1/src/read.c:1739
  ReadRel at /workspace/srcdir/gap-4.13.1/src/read.c:1776
  ReadAnd at /workspace/srcdir/gap-4.13.1/src/read.c:1813
  ReadExpr at /workspace/srcdir/gap-4.13.1/src/read.c:1888
  ReadEvalCommand at /workspace/srcdir/gap-4.13.1/src/read.c:2559
  READ_GAP_ROOT at /workspace/srcdir/gap-4.13.1/src/streams.c:409
  FuncREAD_GAP_ROOT at /workspace/srcdir/gap-4.13.1/src/streams.c:938
  CALL_1ARGS at /workspace/srcdir/gap-4.13.1/src/calls.h:311 [inlined]
  EvalOrExecCall at /workspace/srcdir/gap-4.13.1/src/funcs.c:147 [inlined]
  EvalFunccall1args at /workspace/srcdir/gap-4.13.1/src/funcs.c:303
  EVAL_EXPR at /workspace/srcdir/gap-4.13.1/src/exprs.h:98 [inlined]
  EvalUnknownBool at /workspace/srcdir/gap-4.13.1/src/exprs.c:101
  EVAL_BOOL_EXPR at /workspace/srcdir/gap-4.13.1/src/exprs.h:128 [inlined]
  EvalNot at /workspace/srcdir/gap-4.13.1/src/exprs.c:212
  EVAL_BOOL_EXPR at /workspace/srcdir/gap-4.13.1/src/exprs.h:128 [inlined]
  ExecIf at /workspace/srcdir/gap-4.13.1/src/stats.c:221
  EXEC_STAT at /workspace/srcdir/gap-4.13.1/src/stats.c:55 [inlined]
  ExecSeqStatHelper at /workspace/srcdir/gap-4.13.1/src/stats.c:147 [inlined]
  ExecSeqStat3 at /workspace/srcdir/gap-4.13.1/src/stats.c:170
  EXEC_STAT at /workspace/srcdir/gap-4.13.1/src/stats.c:55 [inlined]
  EXEC_CURR_FUNC at /workspace/srcdir/gap-4.13.1/src/stats.c:61
  DoExecFunc at /workspace/srcdir/gap-4.13.1/src/funcs.c:467 [inlined]
  DoExecFunc1args at /workspace/srcdir/gap-4.13.1/src/funcs.c:488
  CALL_1ARGS at /workspace/srcdir/gap-4.13.1/src/calls.h:311 [inlined]
  IntrFuncCallEnd at /workspace/srcdir/gap-4.13.1/src/intrprtr.c:395
  EvalRef at /workspace/srcdir/gap-4.13.1/src/read.c:367
  ReadCallVarAss at /workspace/srcdir/gap-4.13.1/src/read.c:874
  ReadAtom at /workspace/srcdir/gap-4.13.1/src/read.c:1587
  ReadFactor at /workspace/srcdir/gap-4.13.1/src/read.c:1658
  ReadTerm at /workspace/srcdir/gap-4.13.1/src/read.c:1707
  ReadAri at /workspace/srcdir/gap-4.13.1/src/read.c:1739
  ReadRel at /workspace/srcdir/gap-4.13.1/src/read.c:1776
  ReadAnd at /workspace/srcdir/gap-4.13.1/src/read.c:1813
  ReadExpr at /workspace/srcdir/gap-4.13.1/src/read.c:1888
  ReadEvalCommand at /workspace/srcdir/gap-4.13.1/src/read.c:2559
  READ_GAP_ROOT at /workspace/srcdir/gap-4.13.1/src/streams.c:409
  FuncREAD_GAP_ROOT at /workspace/srcdir/gap-4.13.1/src/streams.c:938
  CALL_1ARGS at /workspace/srcdir/gap-4.13.1/src/calls.h:311 [inlined]
  EvalOrExecCall at /workspace/srcdir/gap-4.13.1/src/funcs.c:147 [inlined]
  EvalFunccall1args at /workspace/srcdir/gap-4.13.1/src/funcs.c:303
  EVAL_EXPR at /workspace/srcdir/gap-4.13.1/src/exprs.h:98 [inlined]
  EvalUnknownBool at /workspace/srcdir/gap-4.13.1/src/exprs.c:101
  EVAL_BOOL_EXPR at /workspace/srcdir/gap-4.13.1/src/exprs.h:128 [inlined]
  EvalNot at /workspace/srcdir/gap-4.13.1/src/exprs.c:212
  EVAL_BOOL_EXPR at /workspace/srcdir/gap-4.13.1/src/exprs.h:128 [inlined]
  ExecIf at /workspace/srcdir/gap-4.13.1/src/stats.c:221
  EXEC_STAT at /workspace/srcdir/gap-4.13.1/src/stats.c:55 [inlined]
  ExecSeqStatHelper at /workspace/srcdir/gap-4.13.1/src/stats.c:147 [inlined]
  ExecSeqStat2 at /workspace/srcdir/gap-4.13.1/src/stats.c:165
  EXEC_STAT at /workspace/srcdir/gap-4.13.1/src/stats.c:55 [inlined]
  EXEC_CURR_FUNC at /workspace/srcdir/gap-4.13.1/src/stats.c:61
  DoExecFunc at /workspace/srcdir/gap-4.13.1/src/funcs.c:467 [inlined]
  DoExecFunc1args at /workspace/srcdir/gap-4.13.1/src/funcs.c:488
  CALL_1ARGS at /workspace/srcdir/gap-4.13.1/src/calls.h:311 [inlined]
  EvalOrExecCall at /workspace/srcdir/gap-4.13.1/src/funcs.c:147 [inlined]
  ExecProccall1args at /workspace/srcdir/gap-4.13.1/src/funcs.c:218
  EXEC_STAT at /workspace/srcdir/gap-4.13.1/src/stats.c:55 [inlined]
  ExecSeqStatHelper at /workspace/srcdir/gap-4.13.1/src/stats.c:147 [inlined]
  ExecSeqStat6 at /workspace/srcdir/gap-4.13.1/src/stats.c:185
  EXEC_STAT at /workspace/srcdir/gap-4.13.1/src/stats.c:55 [inlined]
  ExecSeqStatHelper at /workspace/srcdir/gap-4.13.1/src/stats.c:147 [inlined]
  ExecSeqStat7 at /workspace/srcdir/gap-4.13.1/src/stats.c:190
  EXEC_STAT at /workspace/srcdir/gap-4.13.1/src/stats.c:55 [inlined]
  ExecForRangeHelper at /workspace/srcdir/gap-4.13.1/src/stats.c:538 [inlined]
  ExecForRange at /workspace/srcdir/gap-4.13.1/src/stats.c:550
  EXEC_STAT at /workspace/srcdir/gap-4.13.1/src/stats.c:55 [inlined]
  ExecSeqStatHelper at /workspace/srcdir/gap-4.13.1/src/stats.c:147 [inlined]
  ExecSeqStat at /workspace/srcdir/gap-4.13.1/src/stats.c:160
  EXEC_STAT at /workspace/srcdir/gap-4.13.1/src/stats.c:55 [inlined]
  ExecSeqStatHelper at /workspace/srcdir/gap-4.13.1/src/stats.c:147 [inlined]
  ExecSeqStat7 at /workspace/srcdir/gap-4.13.1/src/stats.c:190
  EXEC_STAT at /workspace/srcdir/gap-4.13.1/src/stats.c:55 [inlined]
  EXEC_CURR_FUNC at /workspace/srcdir/gap-4.13.1/src/stats.c:61
  DoExecFunc at /workspace/srcdir/gap-4.13.1/src/funcs.c:467 [inlined]
  DoExecFunc1args at /workspace/srcdir/gap-4.13.1/src/funcs.c:488
  CALL_3ARGS at /workspace/srcdir/gap-4.13.1/src/calls.h:321 [inlined]
  EvalOrExecCall at /workspace/srcdir/gap-4.13.1/src/funcs.c:153 [inlined]
  EvalFunccall3args at /workspace/srcdir/gap-4.13.1/src/funcs.c:313
  EVAL_EXPR at /workspace/srcdir/gap-4.13.1/src/exprs.h:98 [inlined]
  EvalNe at /workspace/srcdir/gap-4.13.1/src/exprs.c:275
  EVAL_BOOL_EXPR at /workspace/srcdir/gap-4.13.1/src/exprs.h:128 [inlined]
  ExecIf at /workspace/srcdir/gap-4.13.1/src/stats.c:221
  EXEC_STAT at /workspace/srcdir/gap-4.13.1/src/stats.c:55 [inlined]
  ExecForHelper at /workspace/srcdir/gap-4.13.1/src/stats.c:402 [inlined]
  ExecFor at /workspace/srcdir/gap-4.13.1/src/stats.c:457
  EXEC_STAT at /workspace/srcdir/gap-4.13.1/src/stats.c:55 [inlined]
  ExecSeqStatHelper at /workspace/srcdir/gap-4.13.1/src/stats.c:147 [inlined]
  ExecSeqStat5 at /workspace/srcdir/gap-4.13.1/src/stats.c:180
  EXEC_STAT at /workspace/srcdir/gap-4.13.1/src/stats.c:55 [inlined]
  ExecSeqStatHelper at /workspace/srcdir/gap-4.13.1/src/stats.c:147 [inlined]
  ExecSeqStat at /workspace/srcdir/gap-4.13.1/src/stats.c:160
  EXEC_STAT at /workspace/srcdir/gap-4.13.1/src/stats.c:55 [inlined]
  ExecSeqStatHelper at /workspace/srcdir/gap-4.13.1/src/stats.c:147 [inlined]
  ExecSeqStat7 at /workspace/srcdir/gap-4.13.1/src/stats.c:190
  EXEC_STAT at /workspace/srcdir/gap-4.13.1/src/stats.c:55 [inlined]
  EXEC_CURR_FUNC at /workspace/srcdir/gap-4.13.1/src/stats.c:61
  DoExecFunc at /workspace/srcdir/gap-4.13.1/src/funcs.c:467 [inlined]
  DoExecFunc0args at /workspace/srcdir/gap-4.13.1/src/funcs.c:482
  CALL_0ARGS at /workspace/srcdir/gap-4.13.1/src/calls.h:306 [inlined]
  EvalOrExecCall at /workspace/srcdir/gap-4.13.1/src/funcs.c:144 [inlined]
  ExecProccall0args at /workspace/srcdir/gap-4.13.1/src/funcs.c:212
  EXEC_STAT at /workspace/srcdir/gap-4.13.1/src/stats.c:55 [inlined]
  ExecSeqStatHelper at /workspace/srcdir/gap-4.13.1/src/stats.c:147 [inlined]
  ExecSeqStat4 at /workspace/srcdir/gap-4.13.1/src/stats.c:175
  EXEC_STAT at /workspace/srcdir/gap-4.13.1/src/stats.c:55 [inlined]
  EXEC_CURR_FUNC at /workspace/srcdir/gap-4.13.1/src/stats.c:61
  DoExecFunc at /workspace/srcdir/gap-4.13.1/src/funcs.c:467 [inlined]
  DoExecFunc1args at /workspace/srcdir/gap-4.13.1/src/funcs.c:488
  CALL_1ARGS at /workspace/srcdir/gap-4.13.1/src/calls.h:311 [inlined]
  IntrFuncCallEnd at /workspace/srcdir/gap-4.13.1/src/intrprtr.c:395
  EvalRef at /workspace/srcdir/gap-4.13.1/src/read.c:367
  ReadCallVarAss at /workspace/srcdir/gap-4.13.1/src/read.c:874
  ReadAtom at /workspace/srcdir/gap-4.13.1/src/read.c:1587
  ReadFactor at /workspace/srcdir/gap-4.13.1/src/read.c:1658
  ReadTerm at /workspace/srcdir/gap-4.13.1/src/read.c:1707
  ReadAri at /workspace/srcdir/gap-4.13.1/src/read.c:1739
  ReadRel at /workspace/srcdir/gap-4.13.1/src/read.c:1776
  ReadAnd at /workspace/srcdir/gap-4.13.1/src/read.c:1813
  ReadExpr at /workspace/srcdir/gap-4.13.1/src/read.c:1888
  ReadEvalCommand at /workspace/srcdir/gap-4.13.1/src/read.c:2559
  READ_GAP_ROOT at /workspace/srcdir/gap-4.13.1/src/streams.c:409
  initialize at /export/home/sam/julia/packages/GAP.jl/src/GAP.jl:154
  __init__ at /export/home/sam/julia/packages/GAP.jl/src/GAP.jl:295
  unknown function (ip: 0x7f560bf889ff)
  _jl_invoke at /cache/build/default-amdci4-2/julialang/julia-release-1-dot-8/src/gf.c:2377 [inlined]
  ijl_apply_generic at /cache/build/default-amdci4-2/julialang/julia-release-1-dot-8/src/gf.c:2559
  jl_apply at /cache/build/default-amdci4-2/julialang/julia-release-1-dot-8/src/julia.h:1843 [inlined]
  jl_module_run_initializer at /cache/build/default-amdci4-2/julialang/julia-release-1-dot-8/src/toplevel.c:75
  ijl_init_restored_modules at /cache/build/default-amdci4-2/julialang/julia-release-1-dot-8/src/dump.c:2866
  _include_from_serialized at ./loading.jl:831
  _require_search_from_serialized at ./loading.jl:1039
  _require at ./loading.jl:1315
  _require_prelocked at ./loading.jl:1200
  macro expansion at ./lock.jl:223 [inlined]
  require at ./loading.jl:1195
  iterate at ./generator.jl:47 [inlined]
  _collect at ./array.jl:807
  collect_similar at ./array.jl:716 [inlined]
  map at ./abstractarray.jl:2933 [inlined]
  test_ambiguities_impl at /home/sam/.julia/packages/Aqua/tHrmY/src/ambiguities.jl:194
  unknown function (ip: 0x7f560bf75400)
  _jl_invoke at /cache/build/default-amdci4-2/julialang/julia-release-1-dot-8/src/gf.c:2377 [inlined]
  ijl_apply_generic at /cache/build/default-amdci4-2/julialang/julia-release-1-dot-8/src/gf.c:2559
  jl_apply at /cache/build/default-amdci4-2/julialang/julia-release-1-dot-8/src/julia.h:1843 [inlined]
  do_call at /cache/build/default-amdci4-2/julialang/julia-release-1-dot-8/src/interpreter.c:126
  eval_value at /cache/build/default-amdci4-2/julialang/julia-release-1-dot-8/src/interpreter.c:215
  eval_stmt_value at /cache/build/default-amdci4-2/julialang/julia-release-1-dot-8/src/interpreter.c:166 [inlined]
  eval_body at /cache/build/default-amdci4-2/julialang/julia-release-1-dot-8/src/interpreter.c:612
  jl_interpret_toplevel_thunk at /cache/build/default-amdci4-2/julialang/julia-release-1-dot-8/src/interpreter.c:750
  jl_toplevel_eval_flex at /cache/build/default-amdci4-2/julialang/julia-release-1-dot-8/src/toplevel.c:906
  jl_toplevel_eval_flex at /cache/build/default-amdci4-2/julialang/julia-release-1-dot-8/src/toplevel.c:850
  ijl_toplevel_eval_in at /cache/build/default-amdci4-2/julialang/julia-release-1-dot-8/src/toplevel.c:965
  eval at ./boot.jl:368 [inlined]
  exec_options at ./client.jl:276
  _start at ./client.jl:522
  jfptr__start_38041.clone_1 at /export/home/sam/julia/julia-1.8.5/lib/julia/sys.so (unknown line)
  _jl_invoke at /cache/build/default-amdci4-2/julialang/julia-release-1-dot-8/src/gf.c:2377 [inlined]
  ijl_apply_generic at /cache/build/default-amdci4-2/julialang/julia-release-1-dot-8/src/gf.c:2559
  jl_apply at /cache/build/default-amdci4-2/julialang/julia-release-1-dot-8/src/julia.h:1843 [inlined]
  true_main at /cache/build/default-amdci4-2/julialang/julia-release-1-dot-8/src/jlapi.c:575
  jl_repl_entrypoint at /cache/build/default-amdci4-2/julialang/julia-release-1-dot-8/src/jlapi.c:719
  main at /cache/build/default-amdci4-2/julialang/julia-release-1-dot-8/cli/loader_exe.c:59
  __libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
  unknown function (ip: 0x401098)
  Allocations: 4218221 (Pool: 4209994; Big: 8227); GC: 7
  
  Stacktrace:
    [1] error(s::String)
      @ Base ./error.jl:35
    [2] (::Aqua.var"#7#9"{String, IOStream})(errfile::String, err::IOStream)
      @ Aqua ~/.julia/packages/Aqua/tHrmY/src/ambiguities.jl:122
    [3] mktemp(fn::Aqua.var"#7#9"{String, IOStream}, parent::String)
      @ Base.Filesystem ./file.jl:736
    [4] mktemp
      @ ./file.jl:734 [inlined]
    [5] #6
      @ ~/.julia/packages/Aqua/tHrmY/src/ambiguities.jl:113 [inlined]
    [6] mktemp(fn::Aqua.var"#6#8", parent::String)
      @ Base.Filesystem ./file.jl:736
    [7] mktemp
      @ ./file.jl:734 [inlined]
    [8] _find_ambiguities(packages::Vector{Base.PkgId}; skipdetails::Bool, color::Nothing, exclude::Vector{Any}, detect_ambiguities_options::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
      @ Aqua ~/.julia/packages/Aqua/tHrmY/src/ambiguities.jl:112
    [9] _test_ambiguities(packages::Vector{Base.PkgId}; broken::Bool, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
      @ Aqua ~/.julia/packages/Aqua/tHrmY/src/ambiguities.jl:69
   [10] _test_ambiguities
      @ ~/.julia/packages/Aqua/tHrmY/src/ambiguities.jl:68 [inlined]
   [11] #test_ambiguities#1
      @ ~/.julia/packages/Aqua/tHrmY/src/ambiguities.jl:28 [inlined]
   [12] test_ambiguities
      @ ~/.julia/packages/Aqua/tHrmY/src/ambiguities.jl:28 [inlined]
   [13] macro expansion
      @ ~/.julia/packages/Aqua/tHrmY/src/Aqua.jl:69 [inlined]
   [14] macro expansion
      @ /export/home/sam/julia/julia-1.8.5/share/julia/stdlib/v1.8/Test/src/Test.jl:1363 [inlined]
   [15] test_all(testtarget::Module; ambiguities::Bool, unbound_args::Bool, undefined_exports::Bool, project_extras::Bool, stale_deps::Bool, deps_compat::Bool, piracies::NamedTuple{(:treat_as_own,), Tuple{Vector{DataType}}}, persistent_tasks::Bool)
      @ Aqua ~/.julia/packages/Aqua/tHrmY/src/Aqua.jl:68
   [16] macro expansion
      @ /export/home/sam/julia/packages/GAP.jl/test/Aqua.jl:4 [inlined]
   [17] macro expansion
      @ /export/home/sam/julia/julia-1.8.5/share/julia/stdlib/v1.8/Test/src/Test.jl:1363 [inlined]
   [18] top-level scope
      @ /export/home/sam/julia/packages/GAP.jl/test/Aqua.jl:4
   [19] include(fname::String)
      @ Base.MainInclude ./client.jl:476
   [20] top-level scope
      @ REPL[3]:1
   [21] eval
      @ ./boot.jl:368 [inlined]
   [22] eval_user_input(ast::Any, backend::REPL.REPLBackend)
      @ REPL /export/home/sam/julia/julia-1.8.5/share/julia/stdlib/v1.8/REPL/src/REPL.jl:151
   [23] repl_backend_loop(backend::REPL.REPLBackend)
      @ REPL /export/home/sam/julia/julia-1.8.5/share/julia/stdlib/v1.8/REPL/src/REPL.jl:247
   [24] start_repl_backend(backend::REPL.REPLBackend, consumer::Any)
      @ REPL /export/home/sam/julia/julia-1.8.5/share/julia/stdlib/v1.8/REPL/src/REPL.jl:232
   [25] run_repl(repl::REPL.AbstractREPL, consumer::Any; backend_on_current_task::Bool)
      @ REPL /export/home/sam/julia/julia-1.8.5/share/julia/stdlib/v1.8/REPL/src/REPL.jl:369
   [26] run_repl(repl::REPL.AbstractREPL, consumer::Any)
      @ REPL /export/home/sam/julia/julia-1.8.5/share/julia/stdlib/v1.8/REPL/src/REPL.jl:355
   [27] (::Base.var"#967#969"{Bool, Bool, Bool})(REPL::Module)
      @ Base ./client.jl:419
   [28] #invokelatest#2
      @ ./essentials.jl:729 [inlined]
   [29] invokelatest
      @ ./essentials.jl:726 [inlined]
   [30] run_main_repl(interactive::Bool, quiet::Bool, banner::Bool, history_file::Bool, color_set::Bool)
      @ Base ./client.jl:404
   [31] exec_options(opts::Base.JLOptions)
      @ Base ./client.jl:318
   [32] _start()
      @ Base ./client.jl:522
Skipping GAP.LargeBag
Skipping GAP.SmallBag
[ Info: Compiling JuliaInterface ...
Test Summary:                                | Pass  Error  Total   Time
Aqua.jl                                      |   10      1     11  23.8s
  Method ambiguity                           |           1      1   8.1s
  Unbound type parameters                    |    1             1   0.2s
  Undefined exports                          |    1             1   0.0s
  Compare Project.toml and test/Project.toml |    1             1   0.2s
  Stale dependencies                         |    1             1  11.1s
  Compat bounds                              |    4             4   0.4s
  Piracy                                     |    1             1   0.4s
  Persistent tasks                           |    1             1   0.0s
ERROR: LoadError: Some tests did not pass: 10 passed, 0 failed, 1 errored, 0 broken.
in expression starting at /export/home/sam/julia/packages/GAP.jl/test/Aqua.jl:3

@oscar-system oscar-system deleted a comment Sep 4, 2024
@fingolfin
Copy link
Member Author

@ThomasBreuer can you please also tell me the output of free -ght ?

@ThomasBreuer
Copy link
Member

output of free -ght:

              total        used        free      shared  buff/cache   available
Mem:           13Gi       4.0Gi       2.8Gi        39Mi       6.8Gi       9.2Gi
Swap:          14Gi          0B        14Gi
Total:         28Gi       4.0Gi        17Gi

@fingolfin
Copy link
Member Author

Trying to reproduce the crash on 8 systems concurrently (on Mac, seven linux machines; with different CPUs, RAM, Linux distro etc.). So far I got this

1 one machine crashed in ] test GAP -- but that's a bit slow for repeated debugging :-/
2. using GAP, Test ; include("test/Aqua.jl") with Julia 1.10.5: no crash

  • adding --heap-size-hint=1G still doesn't produce a crash
  • same but in Julia 1.8.5: still no crash :-( (and there is no --heap-size-hint optionin that version)

@fingolfin
Copy link
Member Author

Also tried ulimit -Sv 10000000 -Sm 10000000 before starting Julia. Still no luck in reproducing the crash locally :-(((((

@fingolfin
Copy link
Member Author

Also tried ulimit -Sv 8000000 -Sm 4000000 now. Also tried GAP.prompt() followed by TestDirectory("pkg/JuliaInterface/tst"); which reproduced the issue for me earlier. No difference between Julia 1.8.5 and 1.10.5 either.

Will next try to set up a Linux VM on my mac with reduced heap size to see if that helps reproducing the issue (the (sensible!) suggestion to SSH into the CI VMs unfortunately is of limited use to me as those environments are too limited and slow to do serious debugging)

@fingolfin
Copy link
Member Author

I've pushed two updates for GAP_jll: one rebuilds it once again, this time against the latest libjulia_jll (I made a mistake in the previous rebuild!) this may affect Julia nightly but should not matter for 1.11 and older.

The second update disables "precise marking" which I suspect may help with the crashes (if so, then I think it masks the issue, not fix it, but that's a separate concern).

I also (re)discovered https://github.com/nektos/act which may allow me to reproduce the crashes locally.

@fingolfin
Copy link
Member Author

Recently the CI tests on gap-system/gap involving GAP.jl started to crash when run in Julia nightly.

See for example https://github.com/gap-system/gap/actions/runs/11495638665/job/31995581546?pr=5823

However the "same" tests work here. I think this because of the GC workaround patch I am including in GAP_jll:

From cfc9fe38fed4c09f37e5771265415f464592fbe2 Mon Sep 17 00:00:00 2001
From: Max Horn <[email protected]>
Date: Tue, 3 Sep 2024 23:12:40 +0200
Subject: [PATCH] kernel: disable task stack rescan optimization

This seems to prevent recent crashes in GAP.jl. It is not a viable
long-term solution as it causes a severe performance penalty, but
it is worthwhile to experiment with this to see if this really
fixes all the crashes.
---
 src/julia_gc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/julia_gc.c b/src/julia_gc.c
index d44c69fc5..a3d3ee0fe 100644
--- a/src/julia_gc.c
+++ b/src/julia_gc.c
@@ -621,7 +621,7 @@ static void GapTaskScanner(jl_task_t * task, int root_task)
         // age bit back to new if tasks are being switched.
         jl_taggedvalue_t * tag = jl_astaggedvalue(task);
         if (tag->bits.gc & 2)
-            rescan = 0;
+            rescan = 1;
     }
 
     char *active_start, *active_end, *total_start, *total_end;
-- 
2.46.0

Put another way: it seems the elusive GC crash that I couldn't reproduce now happens all the time with Julia nightly.

That definitely needs to be looked into. On the upside, perhaps that means I can finally reproduce the issue again locally, and thus debug it properly!

Now the main problem will be to find a date where there are not 5 other things with deadlines waiting for me to resolve them so I can focus on this :-(

@lgoettgens
Copy link
Member

I don't want to kill all of your confidence, but in the julia nightly CI, there is a build warning. I only found it because locally, it results in an error instead (an IMO should do so in CI as well).

https://github.com/oscar-system/GAP.jl/actions/runs/11496373988/job/31997861877?pr=1059#step:7:282

/tmp/GAPROOT/src/weakptr.c: In function ‘SET_ELM_WPOBJ’:
/tmp/GAPROOT/src/weakptr.c:154:25: warning: implicit declaration of function ‘jl_gc_new_weakref’; did you mean ‘jl_gc_new_weakref_th’? [-Wimplicit-function-declaration]
  154 |         ptr[pos] = (Bag)jl_gc_new_weakref((jl_value_t *)val);
      |                         ^~~~~~~~~~~~~~~~~
      |                         jl_gc_new_weakref_th
/tmp/GAPROOT/src/weakptr.c:154:25: warning: nested extern declaration of ‘jl_gc_new_weakref’ [-Wnested-externs]
/tmp/GAPROOT/src/weakptr.c:154:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  154 |         ptr[pos] = (Bag)jl_gc_new_weakref((jl_value_t *)val);
      |                    ^

@fingolfin
Copy link
Member Author

thanks. indeed we should treat warnings as errors. and report an issue to julia that we need jl_gc_new_weakref to be public again. will do

@lgoettgens
Copy link
Member

I am already working on the julia PR

@fingolfin
Copy link
Member Author

actually we could also switch to using jl_gc_new_weakref_th ...

@lgoettgens
Copy link
Member

Yeah, true. This function seems to be available since JuliaLang/julia@f5b224d, which is in julia 0.5.

@lgoettgens
Copy link
Member

using the newest julia nightly with the new libjulia build, and doing all of the override things with the latest gap master is (at least on my machine) no reproducer of this problem.

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

3 participants