JuliaPy / JuliaPy/PyCall.jl

importing inspect causes segfault

Ouverte
#604 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Julia
Étoiles
1.5k
Forks
186
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

I can use `@pyimport` on most modules without difficulty, but trying it on inspect causes a segfault:

```
---(Many, many, repeats of the following error)---
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2184
convert at /home/glynch/.julia/packages/PyCall/0jMpb/src/conversions.jl:607
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2184
convert at /home/glynch/.julia/packages/PyCall/0jMpb/src/conversions.jl:849
iterate at /home/glynch/.julia/packages/PyCall/0jMpb/src/conversions.jl:574
copy at ./abstractdict.jl:152
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2184
convert at /home/glynch/.julia/packages/PyCall/0jMpb/src/conversions.jl:607
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2184
convert at /home/glynch/.julia/packages/PyCall/0jMpb/src/conversions.jl:849
iterate at /home/glynch/.julia/packages/PyCall/0jMpb/src/conversions.jl:574
copy at ./abstractdict.jl:152
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2184
convert at /home/glynch/.julia/packages/PyCall/0jMpb/src/conversions.jl:607
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2184
convert at /home/glynch/.julia/packages/PyCall/0jMpb/src/conversions.jl:849
#75 at ./none:0
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2184
iterate at ./generator.jl:47 [inlined]
collect_to! at ./array.jl:656
collect_to_with_first! at ./array.jl:643 [inlined]
collect at ./array.jl:624
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2184
pywrap at /home/glynch/.julia/packages/PyCall/0jMpb/src/PyCall.jl:342
pywrap at /home/glynch/.julia/packages/PyCall/0jMpb/src/PyCall.jl:338
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2184
do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:324
eval_value at /buildworker/worker/package_linux64/build/src/interpreter.c:430
eval_stmt_value at /buildworker/worker/package_linux64/build/src/interpreter.c:363 [inlined]
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:682
jl_interpret_toplevel_thunk_callback at /buildworker/worker/package_linux64/build/src/interpreter.c:795
unknown function (ip: 0xfffffffffffffffe)
unknown function (ip: 0x7fd29333540f)
unknown function (ip: 0x4)
jl_interpret_toplevel_thunk at /buildworker/worker/package_linux64/build/src/interpreter.c:804
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:813
jl_toplevel_eval_in at /buildworker/worker/package_linux64/build/src/builtins.c:622
eval at ./boot.jl:319
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2184
eval_user_input at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:85
macro expansion at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:117 [inlined]
#28 at ./task.jl:259
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2184
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1537 [inlined]
start_task at /buildworker/worker/package_linux64/build/src/task.c:268
unknown function (ip: 0xffffffffffffffff)
Allocations: 31054891 (Pool: 31039570; Big: 15321); GC: 46
[1] 6686 segmentation fault (core dumped) julia1
```
It only segfaults after some time. Given the recursive nature of the error message and the time it takes to trigger a segfault I'm guessing that the import causes some sort of infinite loop?

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Reproduce the failure with @pyimport inspect and read the recursive conversion paths in src/conversions.jl, especially around lines 574, 607, and 849, along with pywrap in src/PyCall.jl around lines 338-342. Determine why importing inspect repeatedly enters those conversion paths; done means the import completes without a segmentation fault and the regression is covered by a reproducible check.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
julia, python
Domaine
backend
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
30/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.