Imports for VECs Can't Happen in Threads
insertinterestingnamehere opened this issue · 3 comments
insertinterestingnamehere commented
The following segfaults, but it should work fine:
from threading import Thread
from parla.multiload import multiload_contexts
if __name__ == '__main__':
def f():
with multiload_contexts[1]:
import numpy
t = Thread(target=f)
t.start()
t.join()
insertinterestingnamehere commented
Maybe related? #12
insertinterestingnamehere commented
Probably also related: #12
insertinterestingnamehere commented
Trace for this one:
0x7ff912225188: (handler+0x28)
0x7ff91252a830: (killpg+0x40)
0x7ff903cc7ece: (parse_iso_8601_datetime+0x44e)
0x100000001: -- error: unable to obtain symbol name for this frame
This points to https://github.com/numpy/numpy/blob/623bc1fae1d47df24e7f1e29321d0c0ba2771ce0/numpy/core/src/multiarray/datetime_strings.c#L221 as the issue. Offhand, I have no idea why that would be an issue though.