JuliaPy / JuliaPy/PyCall.jl

Thread Safety of PyCall with ibm db package

Offen
#974 1 Kommentar 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Julia
Sterne
1.5k
Forks
186
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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)

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.