JuliaPy / JuliaPy/PyCall.jl

Thread Safety of PyCall with ibm db package

Aperta
#974 1 commento 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
Julia
Stelle
1.5k
Fork
186
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I'm having an issue using threads with PyCall. I'm using [IBM's db2 python](https://pypi.org/project/ibm-db/#api) package trying to execute queries on multiple threads and it will crash 99% of the time (race condition?). Serial code always works. I've tried using Threads, Dagger, and Distributed and all have the same issue. I [read that disabling faulthandler](https://discourse.julialang.org/t/help-with-pycall-related-segfault/55998/2) might fix it but I think I'm properly disabling it and it still occurs for me? Any help is appreciated.

Example with `@spawn` crashing:
![image](https://user-images.githubusercontent.com/56286587/158026534-59ed21ca-c47c-466e-ab23-73c49c5508b8.png)

Minimalist example showing it crashing:
![image](https://user-images.githubusercontent.com/56286587/158027553-e0fa5f26-d157-44ef-a377-3dd5149302ba.png)

![image](https://user-images.githubusercontent.com/56286587/158027549-df58dc01-d191-4b88-9eff-cec4a630fd6c.png)

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.