Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyCall segmentation fault when running a pure Julia task in parallel #33893

Closed
Deduction42 opened this issue Nov 19, 2019 · 7 comments
Closed
Labels
external dependencies Involves LLVM, OpenBLAS, or other linked libraries multithreading Base.Threads and related functionality

Comments

@Deduction42
Copy link

Deduction42 commented Nov 19, 2019

I'm not sure if this is a package issue or an issue with the new multi-threading tool with Julia 1.3-rc5. I am trying to use Python's fastparquet to write a dataframe into a parquet file (as there is no Julia package that allows me to do this). While doing this, I am running a task in parallel to process a Julia Dataframe. However, trying to do so results in a segfault. I know that I probably can't run multiple PyCalls with multithreading (as Python is not thread-safe), but does this mean I also cannot do something in pure Julia while making a Python call? I'm not sure if this is a bug or a system limitation (which should be documented somewhere but I can't find it).

signal (11): Segmentation fault
in expression starting at /home/********/Desktop/Parquet Append Testing/CsvProcessing.jl:176
_PyObject_Malloc at /home/********/miniconda3/lib/libpython3.7m.so.1.0 (unknown line)
PyUnicode_New at /home/********/miniconda3/lib/libpython3.7m.so.1.0 (unknown line)
_PyUnicodeWriter_PrepareInternal at /home/********/miniconda3/lib/libpython3.7m.so.1.0 (unknown line)
PyUnicode_DecodeUTF8Stateful at /home/********/miniconda3/lib/libpython3.7m.so.1.0 (unknown line)
PyObject at /home/********/.julia/packages/PyCall/ttONZ/src/exception.jl:81
array2py at /home/********/.julia/packages/PyCall/ttONZ/src/conversions.jl:314
array2py at /home/********/.julia/packages/PyCall/ttONZ/src/conversions.jl:319
array2py at /home/********/.julia/packages/PyCall/ttONZ/src/conversions.jl:328 [inlined]
PyObject at /home/********/.julia/packages/PyCall/ttONZ/src/conversions.jl:330 [inlined]
_pycall! at /home/********/.julia/packages/PyCall/ttONZ/src/pyfncall.jl:24
_pycall! at /home/********/.julia/packages/PyCall/ttONZ/src/pyfncall.jl:11
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2135 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2305
#pycall#109 at /home/********/.julia/packages/PyCall/ttONZ/src/pyfncall.jl:83
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2135 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2305
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1631 [inlined]
jl_f__apply at /buildworker/worker/package_linux64/build/src/builtins.c:627
pycall at /home/********/.julia/packages/PyCall/ttONZ/src/pyfncall.jl:83
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2135 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2305
setindex! at /home/********/.julia/packages/Pandas/wBpaf/src/Pandas.jl:183
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2135 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2305
df2pandas at /home/********/Desktop/Parquet Append Testing/CsvProcessing.jl:40
macro expansion at ./util.jl:155 [inlined]
write_parquet at /home/********/Desktop/Parquet Append Testing/CsvProcessing.jl:48
write_parquet at /home/********/Desktop/Parquet Append Testing/CsvProcessing.jl:54 [inlined]
read_write at /home/********/Desktop/Parquet Append Testing/CsvProcessing.jl:131
macro expansion at ./util.jl:155 [inlined]
run_parser at /home/********/Desktop/Parquet Append Testing/CsvProcessing.jl:169
unknown function (ip: 0x7fe8cf52d71c)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2141 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2305
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1631 [inlined]
do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:328
eval_value at /buildworker/worker/package_linux64/build/src/interpreter.c:417
eval_stmt_value at /buildworker/worker/package_linux64/build/src/interpreter.c:368 [inlined]
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:778
jl_interpret_toplevel_thunk_callback at /buildworker/worker/package_linux64/build/src/interpreter.c:888
unknown function (ip: 0xfffffffffffffffe)
unknown function (ip: 0x7fe84161da8f)
unknown function (ip: 0xffffffffffffffff)
jl_interpret_toplevel_thunk at /buildworker/worker/package_linux64/build/src/interpreter.c:897
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:814
jl_parse_eval_all at /buildworker/worker/package_linux64/build/src/ast.c:873
include_string at ./loading.jl:1075
#139 at /home/********/.julia/packages/Atom/lBERI/src/eval.jl:138
withpath at /home/********/.julia/packages/CodeTools/xGemk/src/utils.jl:30
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2141 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2305
withpath at /home/********/.julia/packages/Atom/lBERI/src/eval.jl:47
#138 at /home/********/.julia/packages/Atom/lBERI/src/eval.jl:135 [inlined]
with_logstate at ./logging.jl:395
with_logger at ./logging.jl:491 [inlined]
#137 at /home/********/.julia/packages/Atom/lBERI/src/eval.jl:134 [inlined]
hideprompt at /home/********/.julia/packages/Atom/lBERI/src/repl.jl:85
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2141 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2305
macro expansion at /home/********/.julia/packages/Atom/lBERI/src/eval.jl:133 [inlined]
macro expansion at /home/********/.julia/packages/Media/ItEPc/src/dynamic.jl:24 [inlined]
#136 at /home/********/.julia/packages/Atom/lBERI/src/eval.jl:122
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2141 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2305
handlemsg at /home/********/.julia/packages/Atom/lBERI/src/comm.jl:164
unknown function (ip: 0x7fe8d2e1df3b)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2135 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2305
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1631 [inlined]
jl_f__apply at /buildworker/worker/package_linux64/build/src/builtins.c:627
#19 at ./task.jl:333
unknown function (ip: 0x7fe8d2e1cc47)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2135 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2305
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1631 [inlined]
start_task at /buildworker/worker/package_linux64/build/src/task.c:659
unknown function (ip: 0xffffffffffffffff)
Allocations: 288037862 (Pool: 287995801; Big: 42061); GC: 105

If you have a question please search or post to our Discourse site: https://discourse.julialang.org.
We use the GitHub issue tracker for bug reports and feature requests only.

If you're submitting a bug report, be sure to include as much relevant information as
possible, including a minimal reproducible example and the output of versioninfo().
If you're experiencing a problem with a particular package, open an issue on that
package's repository instead.

Thanks for contributing to the Julia project!

@stevengj stevengj added external dependencies Involves LLVM, OpenBLAS, or other linked libraries multithreading Base.Threads and related functionality labels Nov 26, 2019
@stevengj
Copy link
Member

I would hope that as long as you only ever use Python from a single thread you should be okay … can you put together a minimal example that illustrates the problem? ( i.e. delete every line in your code until the problem goes away...)

@mdav2
Copy link

mdav2 commented Jan 15, 2020

EDIT: It seems that this may only be a partial fix; when I increased the problem size, the problem resurfaced.
Bit late to the party here, but I ran into a very similar issue and was able to resolve it. I don't understand why, but moving all of my PyCall code (like using PyCall and pyimport satements) into one file did the trick.

In my case I am writing my own (Julia) package that uses a python package to obtain some methods that are difficult to code. Trouble was, I needed those methods both inside my package and when using my package. So I had two using PyCall regions. Coalescing them and exporting the python package from my package, then using that while using my package resolved the issue.

module dummy
using PyCall
const psi4 = PyNULL()
function __init__()
     copy!(psi4, pyimport("psi4")
end
export psi4
end
using dummy
psi4. ....

@Deduction42
Copy link
Author

Deduction42 commented Jan 24, 2020

I managed to figure out what the issue was. I have a function that reads a CSV file into a dataframe and does some transformations:
process_file (FileName::String)
I use this function on a list of CSV files assigned to different tasks

function working_dir_tasks(WorkingDir::String, process_file::Function; MaxFiles=(Threads.nthreads-1) )
    #Read the directory
    FileList = get_working_files()
    FileList = FileList[1:min(MaxFiles,length(FileList))]
    TaskList = Task[]

    for File in FileList
        t = Threads.@spawn process_file(File)
        push!(TaskList, t)
    end

    return TaskList
end

In the main program, I have a loop. If I try to write a list of tables using pure Julia code WHILE preprocessing other files, it crashes pretty reliably. It fails when trying to convert a Julia dataframe to a Pandas dataframe.

while true
            TaskList = working_dir_tasks(WorkingDir, custom_processing; MaxFiles=nProcess )

            #Write previous list of tables while getting new ones in background
            @time for Table in TableList
                write_parquet(ParquetFile, Table)
            end

            #Get new list from background tasks
            @time TableList = fetch.(TaskList)
end

However, if I fetch the results before running the Python code, it doesn't crash

while true
            TaskList = working_dir_tasks(WorkingDir, custom_processing; MaxFiles=nProcess )

            #Get new list from background tasks
            @time TableList = fetch.(TaskList)

            #Write previous list of tables while getting new ones in background
            @time for Table in TableList
                write_parquet(ParquetFile, Table)
            end
end

The error message I get upon crashing is a bit different this time. From what I can see still looks like the Python code and parallel Julia tasks are trying to access the same memory.


Exception: EXCEPTION_ACCESS_VIOLATION at 0x7ffaf5d8206d -- PyUnicode_New at C:\Users\********\Miniconda3\python37.dll (unknown line)
in expression starting at C:\Users\********\************!!************ - ********\********-Projects\********\Preprocessing\Csv2Parquet.jl:86
PyUnicode_New at C:\Users\********\Miniconda3\python37.dll (unknown line)
PyUnicode_New at C:\Users\********\Miniconda3\python37.dll (unknown line)
PyObject_GC_New at C:\Users\********\Miniconda3\python37.dll (unknown line)
PyCell_New at C:\Users\********\Miniconda3\python37.dll (unknown line)
PyEval_EvalCodeWithName at C:\Users\********\Miniconda3\python37.dll (unknown line)
PyMethodDef_RawFastCallKeywords at C:\Users\********\Miniconda3\python37.dll (unknown line)
PyEval_EvalFrameDefault at C:\Users\********\Miniconda3\python37.dll (unknown line)
PyStack_UnpackDict at C:\Users\********\Miniconda3\python37.dll (unknown line)
PyErr_NoMemory at C:\Users\********\Miniconda3\python37.dll (unknown line)
PyObject_Call at C:\Users\********\Miniconda3\python37.dll (unknown line)
PyErr_NoMemory at C:\Users\********\Miniconda3\python37.dll (unknown line)
PyErr_NoMemory at C:\Users\********\Miniconda3\python37.dll (unknown line)
Py_FinalizeEx at C:\Users\********\Miniconda3\python37.dll (unknown line)
Py_Finalize at C:\Users\********.julia\packages\PyCall\ttONZ\src\pyinit.jl:125
unknown function (ip: 00000000382349A3)
_jl_invoke at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\gf.c:2141 [inlined]
jl_apply_generic at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\gf.c:2305
_atexit at .\initdefs.jl:309
jfptr__atexit_12862.clone_1 at C:\Users\********\Julia-1.3.1\lib\julia\sys.dll (unknown line)
_jl_invoke at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\gf.c:2135 [inlined]
jl_apply_generic at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\gf.c:2305
jl_apply at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\julia.h:1631 [inlined]
jl_atexit_hook at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\init.c:242
jl_exit at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\jl_uv.c:629
jl_exception_handler at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\signals-win.c:308
__julia_personality at /cygdrive/d/buildbot/worker/package_win64/build/src/support/cygdrive/d/buildbot/worker/package_win64/build/src/support\win32_ucontext.c:28
_chkstk at C:\Windows\SYSTEM32\ntdll.dll (unknown line)
RtlRaiseException at C:\Windows\SYSTEM32\ntdll.dll (unknown line)
KiUserExceptionDispatcher at C:\Windows\SYSTEM32\ntdll.dll (unknown line)
PyUnicode_New at C:\Users\********\Miniconda3\python37.dll (unknown line)
PyUnicode_New at C:\Users\********\Miniconda3\python37.dll (unknown line)
PyErr_NoMemory at C:\Users\********\Miniconda3\python37.dll (unknown line)
PyErr_NoMemory at C:\Users\********\Miniconda3\python37.dll (unknown line)
PyErr_NoMemory at C:\Users\********\Miniconda3\python37.dll (unknown line)
PyObject at C:\Users\********.julia\packages\PyCall\ttONZ\src\exception.jl:81
array2py at C:\Users\********.julia\packages\PyCall\ttONZ\src\conversions.jl:314
array2py at C:\Users\********.julia\packages\PyCall\ttONZ\src\conversions.jl:319
array2py at C:\Users\********.julia\packages\PyCall\ttONZ\src\conversions.jl:328 [inlined]
PyObject at C:\Users\********.julia\packages\PyCall\ttONZ\src\conversions.jl:330 [inlined]
_pycall! at C:\Users\********.julia\packages\PyCall\ttONZ\src\pyfncall.jl:24
_pycall! at C:\Users\********.julia\packages\PyCall\ttONZ\src\pyfncall.jl:11
_jl_invoke at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\gf.c:2135 [inlined]
jl_apply_generic at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\gf.c:2305
#pycall#109 at C:\Users\********.julia\packages\PyCall\ttONZ\src\pyfncall.jl:83
_jl_invoke at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\gf.c:2135 [inlined]
jl_apply_generic at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\gf.c:2305
jl_apply at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\julia.h:1631 [inlined]
jl_f__apply at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\builtins.c:627
pycall at C:\Users\********.julia\packages\PyCall\ttONZ\src\pyfncall.jl:83
_jl_invoke at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\gf.c:2135 [inlined]
jl_apply_generic at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\gf.c:2305
setindex! at C:\Users\********.julia\packages\Pandas\wBpaf\src\Pandas.jl:183
_jl_invoke at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\gf.c:2135 [inlined]
jl_apply_generic at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\gf.c:2305
df2pandas at C:\Users\********\************!!************ - ********\********-Projects\********\Preprocessing\Subroutines.jl:63
macro expansion at C:\Users\********\************!!************ - ********\********-Projects\********\Preprocessing\Csv2Parquet.jl:74 [inlined]
macro expansion at .\util.jl:155 [inlined]
run_parser at C:\Users\********\************!!************ - ********\********-Projects\********\Preprocessing\Csv2Parquet.jl:73
_jl_invoke at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\gf.c:2141 [inlined]
jl_apply_generic at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\gf.c:2305
jl_apply at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\julia.h:1631 [inlined]
do_call at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\interpreter.c:328
eval_value at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\interpreter.c:417
eval_stmt_value at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\interpreter.c:368 [inlined]
eval_body at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\interpreter.c:764
jl_interpret_toplevel_thunk_callback at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\interpreter.c:888
unknown function (ip: FFFFFFFFFFFFFFFE)
unknown function (ip: 000000008A9C9D0F)
unknown function (ip: FFFFFFFFFFFFFFFF)
jl_toplevel_eval_flex at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\toplevel.c:814
jl_parse_eval_all at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\ast.c:873
include_string at .\loading.jl:1075
#139 at C:\Users\********.julia\packages\Atom\lBERI\src\eval.jl:138
withpath at C:\Users\********.julia\packages\CodeTools\sf1Tz\src\utils.jl:30
_jl_invoke at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\gf.c:2141 [inlined]
jl_apply_generic at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\gf.c:2305
withpath at C:\Users\********.julia\packages\Atom\lBERI\src\eval.jl:47
#138 at C:\Users\********.julia\packages\Atom\lBERI\src\eval.jl:135 [inlined]
with_logstate at .\logging.jl:395
with_logger at .\logging.jl:491 [inlined]
#137 at C:\Users\********.julia\packages\Atom\lBERI\src\eval.jl:134 [inlined]
hideprompt at C:\Users\********.julia\packages\Atom\lBERI\src\repl.jl:85
_jl_invoke at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\gf.c:2141 [inlined]
jl_apply_generic at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\gf.c:2305
macro expansion at C:\Users\********.julia\packages\Atom\lBERI\src\eval.jl:133 [inlined]
macro expansion at C:\Users\********.julia\packages\Media\ItEPc\src\dynamic.jl:24 [inlined]
#136 at C:\Users\********.julia\packages\Atom\lBERI\src\eval.jl:122
_jl_invoke at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\gf.c:2141 [inlined]
jl_apply_generic at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\gf.c:2305
handlemsg at C:\Users\********.julia\packages\Atom\lBERI\src\comm.jl:164
unknown function (ip: 00000000381686E2)
_jl_invoke at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\gf.c:2135 [inlined]
jl_apply_generic at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\gf.c:2305
jl_apply at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\julia.h:1631 [inlined]
jl_f__apply at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\builtins.c:627
#19 at .\task.jl:333
unknown function (ip: 000000001C3A2FFE)
_jl_invoke at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\gf.c:2135 [inlined]
jl_apply_generic at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\gf.c:2305
jl_apply at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\julia.h:1631 [inlined]
start_task at /cygdrive/d/buildbot/worker/package_win64/build/src/cygdrive/d/buildbot/worker/package_win64/build/src\task.c:659
Allocations: 4455239124 (Pool: 4455195467; Big: 43657); GC: 163

@Deduction42
Copy link
Author

It would also be interesting to note that the only thing I'm using Python for here is writing files to parquet. This code is literally trying to write parquet files using Python while reading and processing files in Julia. If Julia had a functional Parquet writer, none of this mess would have to happen.

@stevengj
Copy link
Member

It fails when trying to convert a Julia dataframe to a Pandas dataframe.

Doesn't this involve calling Python code, which is not thread-safe?

@Deduction42
Copy link
Author

Deduction42 commented Jan 24, 2020

Yes, but I'm only ever running the Python code on one thread. I'm running Julia on the other threads. However, I keep getting memory conflicts. I've tried a number of different configurations just to see, and this is what I found:

(1) Try to run pure Julia threads while calling Python to convert a Julia dataframe to pandas
Result: Crashes quickly
(2) Don't run julia threads while calling python to convert to pandas, but run Julia threads again while calling python fastparquet to write pandas to disk parquet:
Result: Crashes eventually (but runs for a couple minutes)
(3) Try to do something completely unrelated in Python like plotting random data:
Result: Ran for 10 minutes and I haven't seen it crash yet
(4) Don't run any julia threads while calling python
Result: Successfully ran a 48-hour task without crashing

So it looks like we really can't run Julia on other threads while calling python on the main thread.

@ViralBShah
Copy link
Member

Is this still crashing? Please reopen if so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external dependencies Involves LLVM, OpenBLAS, or other linked libraries multithreading Base.Threads and related functionality
Projects
None yet
Development

No branches or pull requests

4 participants