JuliaPy / JuliaPy/PythonCall.jl

Segfaults with frequent python calls from thread 1 on multithreaded Julia

Aperta
#201 18 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Julia
Stelle
1.1k
Fork
86
Merge medio
1g 22h
PR unite (30g)
3

Descrizione

In a complex application with high-frequency python calls I always run into

```
signal (11): Segmentation fault
in expression starting at REPL[41]:2
_PyTrash_begin at /opt/conda/conda-bld/python-split_1649141344976/work/Objects/object.c:2125
```

segfaults when Julia has multiple threads (e.g. `JULIA_NUM_THREADS=4`). I do make sure to only use PythonCall from thread 1 (and I use asserts to verify that) but somehow that doesn't seem to be enough. When running with `JULIA_NUM_THREADS=1`, all is fine. Is PythonCall incompatible with multi-threaded Julia in general?

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.