Github action crashing due to PyCall in finalizer
- Lenguaje dominante
- Julia
- Estrellas
- 1.5k
- Forks
- 186
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
I have tests for a package that uses PyPlot that appears to be crashing during finalizers, after the package tests have completed
~~The odd thing is this action is built with `PYTHON=""` and PyCall claims to be using the correct julia-provided python, but the crash is happening with the github action-provided python?~~ I was getting confused by the baked-in build paths from the feedstock-built python
julia 1.6.5 with
```
[438e738f] PyCall v1.93.0
[d330b81b] PyPlot v2.10.0
```
The userspace is my name because this is a self-hosted runner.
```
Testing Running tests...
PyPlot.PyCall.pyversion = v"3.9.7"
PyPlot.PyCall.libpython = "/home/ian/.julia/conda/3/lib/libpython3.9.so.1.0"
Test Summary: | Pass Total
Foo | 44 44
signal (11): Segmentation fault
in expression starting at none:0
PyErr_Occurred at /home/conda/feedstock_root/build_artifacts/python-split_1632942464411/work/Python/errors.c:253
find_name_in_mro at /home/conda/feedstock_root/build_artifacts/python-split_1632942464411/work/Objects/typeobject.c:3221 [inlined]
_PyType_Lookup at /home/conda/feedstock_root/build_artifacts/python-split_1632942464411/work/Objects/typeobject.c:3258 [inlined]
_PyType_Lookup at /home/conda/feedstock_root/build_artifacts/python-split_1632942464411/work/Objects/typeobject.c:3235
_PyObject_GenericGetAttrWithDict at /home/conda/feedstock_root/build_artifacts/python-split_1632942464411/work/Objects/object.c:1194
module_getattro at /home/conda/feedstock_root/build_artifacts/python-split_1632942464411/work/Objects/moduleobject.c:717
PyObject_GetAttrString at /home/conda/feedstock_root/build_artifacts/python-split_1632942464411/work/Objects/object.c:795
_getproperty at /home/ian/.julia/packages/PyCall/L0fLP/src/PyCall.jl:300
__getproperty at /home/ian/.julia/packages/PyCall/L0fLP/src/PyCall.jl:306 [inlined]
getproperty at /home/ian/.julia/packages/PyCall/L0fLP/src/PyCall.jl:311 [inlined]
#7 at /home/ian/.julia/packages/PyCall/L0fLP/src/gui.jl:200
macro expansion at ./asyncevent.jl:256 [inlined]
#583 at ./task.jl:411
unknown function (ip: 0x7f7d31b9f87c)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2237 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2419
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1703 [inlined]
start_task at /buildworker/worker/package_linux64/build/src/task.c:834
Allocations: 4907320277 (Pool: 4906960673; Big: 359604); GC: 2763
ERROR: Package Foo errored during testing (received signal: 11)
Stacktrace:
[1] pkgerror(msg::String)
@ Pkg.Types /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Types.jl:55
[2] test(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; coverage::Bool, julia_args::Cmd, test_args::Cmd, test_fn::Nothing)
@ Pkg.Operations /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Operations.jl:1694
[3] test(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; coverage::Bool, test_fn::Nothing, julia_args::Vector{String}, test_args::Cmd, kwargs::Base.Iterators.Pairs{Symbol, IOContext{Base.PipeEndpoint}, Tuple{Symbol}, NamedTuple{(:io,), Tuple{IOContext{Base.PipeEndpoint}}}})
@ Pkg.API /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:343
[4] test(pkgs::Vector{Pkg.Types.PackageSpec}; io::IOContext{Base.PipeEndpoint}, kwargs::Base.Iterators.Pairs{Symbol, Vector{String}, Tuple{Symbol}, NamedTuple{(:julia_args,), Tuple{Vector{String}}}})
@ Pkg.API /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:80
[5] test(; name::Nothing, uuid::Nothing, version::Nothing, url::Nothing, rev::Nothing, path::Nothing, mode::Pkg.Types.PackageMode, subdir::Nothing, kwargs::Base.Iterators.Pairs{Symbol, Vector{String}, Tuple{Symbol}, NamedTuple{(:julia_args,), Tuple{Vector{String}}}})
@ Pkg.API /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:96
[6] top-level scope
@ none:1
```
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Inspecciona las ubicaciones de la pila de PyCall en src/PyCall.jl alrededor de las líneas 300-311 y en gui.jl alrededor de la línea 200, centrándote en el acceso a atributos durante la ejecución del finalizer. Reproduce el problema con Julia 1.6.5, PyCall 1.93.0 y PyPlot 2.10.0, y luego ejecuta las pruebas del paquete; se considera terminado cuando finalicen sin segmentation fault después de completar las pruebas.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- backend
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100