Segmentation fault (core dumped) in 1.11.5 REPL

I was trying to use my own package Pivot.jl in REPL. When I type m<TAB>, I got a segmentation fault. I can try to avoid autocompletion. But it’s a bit annoying not able to use it. Does anyone have similar problem and has found a workaround?

julia> using Pivot

julia> m
[87616] signal 11 (1): Segmentation fault
in expression starting at none:0
_PyInterpreterState_GET at /usr/local/src/conda/python-3.12.6/Include/internal/pycore_pystate.h:133 [inlined]
notify_code_watchers at /usr/local/src/conda/python-3.12.6/Objects/codeobject.c:32 [inlined]
code_dealloc at /usr/local/src/conda/python-3.12.6/Objects/codeobject.c:1703
pydecref_ at /home/xing/.julia/packages/PyCall/1gn3u/src/PyCall.jl:118
pydecref at /home/xing/.julia/packages/PyCall/1gn3u/src/PyCall.jl:123
jfptr_pydecref_4550 at /home/xing/.julia/compiled/v1.11/PyCall/GkzkC_ZLpbM.so (unknown line)
run_finalizer at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/gc.c:303
jl_gc_run_finalizers_in_list at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/gc.c:393
run_finalizers at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/gc.c:439
enable_finalizers at ./gcutils.jl:161 [inlined]
unlock at ./lock.jl:178 [inlined]
macro expansion at ./lock.jl:275 [inlined]
#282 at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:2851
jfptr_YY.282_8768.1 at /home/xing/.julia/juliaup/julia-1.11.5+0.x64.linux.gnu/share/julia/compiled/v1.11/REPL/u0gqU_4x0TT.so (unknown line)
jl_apply at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/julia.h:2157 [inlined]
start_task at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/task.c:1202
Allocations: 7632460 (Pool: 7632168; Big: 292); GC: 13
Segmentation fault (core dumped)
1 Like

It looks related to SymPy/PyCall. Does the tab completion work with using SymPyonly?

Possibly related: Segmentation Fault · Issue #1090 · JuliaPy/PyCall.jl

1 Like

See also Tab Completion Freezing for Python Function Arguments · Issue #1085 · JuliaPy/PyCall.jl · GitHub

Regarding a workaround add this to your startup.jl to disable tab completion hinting.

if VERSION >= v"1.11.0-0"
  atreplinit() do repl
      repl.options.hint_tab_completes = false
  end
end

Once you’ve done that can you check if you get the same segfault just doing

julia> using Pivot

julia> m<tab>

It seems to be a bit random. This morning I cannot trigger this any more.