You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Related to #219. There's currently a scenario with no possible workaround other than forcing a downstream user to set up environment variables to avoid a segfault.
Say that I import a package which uses serial Julia code. That package runs
However, at this point, the Julia runtime has already started. So now when I run a multithreaded portion of code, I will get a segfault, even though I implemented special workarounds in the multithreaded package.
How could I avoid this scenario? Indeed the user could always set up the environment variables themselves. But managing to figure this out from a random bus error will only be ~5% of users.
The text was updated successfully, but these errors were encountered:
if"juliacall"insys.modules:
warnings.warn(
"juliacall module already imported. Make sure that you have set `PYTHON_JULIACALL_HANDLE_SIGNALS=yes` to avoid segfaults."
)
Well firstly, packages shouldn't generally be setting global config such as that env var, though I understand why you're doing it.
Over in #219 I suggested adding a warning to set PYTHON_JULIACALL_HANDLE_SIGNALS=yes if Julia is started with multiple threads. Do you think this would be a sufficient warning?
Also, given Julia starts with 1 thread by default, presumably you're already telling your users to set PYTHON_JULIACALL_NUM_THREADS? In which case you can also tell them to set PYHON_JULIACALL_HANDLE_SIGNALS?
Affects: JuliaCall
Describe the bug
Related to #219. There's currently a scenario with no possible workaround other than forcing a downstream user to set up environment variables to avoid a segfault.
Say that I import a package which uses serial Julia code. That package runs
to start Julia.
Then, I import a different package. That package calls multithreaded Julia code, and thus to avoid a segfault (https://juliapy.github.io/PythonCall.jl/stable/faq/#Is-PythonCall/JuliaCall-thread-safe?) instead performs the import instead as:
However, at this point, the Julia runtime has already started. So now when I run a multithreaded portion of code, I will get a segfault, even though I implemented special workarounds in the multithreaded package.
How could I avoid this scenario? Indeed the user could always set up the environment variables themselves. But managing to figure this out from a random
bus error
will only be ~5% of users.The text was updated successfully, but these errors were encountered: