hi there, I have a problem, but unfortunately without reproducer so far. I was wondering if anyone can help me guess what might be causing this issue, or suggest how to further investigate.
In this code there is a closure function, that uses literal_unroll
. When running single-process this works well. But when running in multiprocessing, I get this error.
Is this due to literal_unroll using weak references?
Thanks
File "/opt/conda/lib/python3.9/site-packages/numba/core/dispatcher.py", line 487, in _compile_for_args
raise e
File "/opt/conda/lib/python3.9/site-packages/numba/core/dispatcher.py", line 420, in _compile_for_args
return_val = self.compile(tuple(argtypes))
File "/opt/conda/lib/python3.9/site-packages/numba/core/dispatcher.py", line 965, in compile
cres = self._compiler.compile(args, return_type)
File "/opt/conda/lib/python3.9/site-packages/numba/core/dispatcher.py", line 125, in compile
status, retval = self._compile_cached(args, return_type)
File "/opt/conda/lib/python3.9/site-packages/numba/core/dispatcher.py", line 139, in _compile_cached
retval = self._compile_core(args, return_type)
File "/opt/conda/lib/python3.9/site-packages/numba/core/dispatcher.py", line 152, in _compile_core
cres = compiler.compile_extra(self.targetdescr.typing_context,
File "/opt/conda/lib/python3.9/site-packages/numba/core/compiler.py", line 716, in compile_extra
return pipeline.compile_extra(func)
File "/opt/conda/lib/python3.9/site-packages/numba/core/compiler.py", line 452, in compile_extra
return self._compile_bytecode()
File "/opt/conda/lib/python3.9/site-packages/numba/core/compiler.py", line 520, in _compile_bytecode
return self._compile_core()
File "/opt/conda/lib/python3.9/site-packages/numba/core/compiler.py", line 499, in _compile_core
raise e
File "/opt/conda/lib/python3.9/site-packages/numba/core/compiler.py", line 486, in _compile_core
pm.run(self.state)
File "/opt/conda/lib/python3.9/site-packages/numba/core/compiler_machinery.py", line 368, in run
raise patched_exception
File "/opt/conda/lib/python3.9/site-packages/numba/core/compiler_machinery.py", line 356, in run
self._runPass(idx, pass_inst, state)
File "/opt/conda/lib/python3.9/site-packages/numba/core/compiler_lock.py", line 35, in _acquire_compile_lock
return func(*args, **kwargs)
File "/opt/conda/lib/python3.9/site-packages/numba/core/compiler_machinery.py", line 311, in _runPass
mutated |= check(pss.run_pass, internal_state)
File "/opt/conda/lib/python3.9/site-packages/numba/core/compiler_machinery.py", line 273, in check
mangled = func(compiler_state)
File "/opt/conda/lib/python3.9/site-packages/numba/core/untyped_passes.py", line 1660, in run_pass
pm.run(state)
File "/opt/conda/lib/python3.9/site-packages/numba/core/compiler_machinery.py", line 368, in run
raise patched_exception
File "/opt/conda/lib/python3.9/site-packages/numba/core/compiler_machinery.py", line 356, in run
self._runPass(idx, pass_inst, state)
File "/opt/conda/lib/python3.9/site-packages/numba/core/compiler_lock.py", line 35, in _acquire_compile_lock
return func(*args, **kwargs)
File "/opt/conda/lib/python3.9/site-packages/numba/core/compiler_machinery.py", line 311, in _runPass
mutated |= check(pss.run_pass, internal_state)
File "/opt/conda/lib/python3.9/site-packages/numba/core/compiler_machinery.py", line 273, in check
mangled = func(compiler_state)
File "/opt/conda/lib/python3.9/site-packages/numba/core/untyped_passes.py", line 1285, in run_pass
stat = self.apply_transform(state)
File "/opt/conda/lib/python3.9/site-packages/numba/core/untyped_passes.py", line 1149, in apply_transform
self.unroll_loop(state, info)
File "/opt/conda/lib/python3.9/site-packages/numba/core/untyped_passes.py", line 1248, in unroll_loop
unrolled_body = self.inject_loop_body(
File "/opt/conda/lib/python3.9/site-packages/numba/core/untyped_passes.py", line 910, in inject_loop_body
switch_ir.blocks[lbl] = deepcopy(loop_blocks[loop_start_lbl])
File "/opt/conda/lib/python3.9/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/opt/conda/lib/python3.9/copy.py", line 270, in _reconstruct
state = deepcopy(state, memo)
File "/opt/conda/lib/python3.9/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/opt/conda/lib/python3.9/copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/opt/conda/lib/python3.9/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/opt/conda/lib/python3.9/copy.py", line 205, in _deepcopy_list
append(deepcopy(a, memo))
File "/opt/conda/lib/python3.9/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/opt/conda/lib/python3.9/copy.py", line 270, in _reconstruct
state = deepcopy(state, memo)
File "/opt/conda/lib/python3.9/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/opt/conda/lib/python3.9/copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/opt/conda/lib/python3.9/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/opt/conda/lib/python3.9/copy.py", line 270, in _reconstruct
state = deepcopy(state, memo)
File "/opt/conda/lib/python3.9/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/opt/conda/lib/python3.9/copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/opt/conda/lib/python3.9/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/opt/conda/lib/python3.9/copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/opt/conda/lib/python3.9/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/opt/conda/lib/python3.9/copy.py", line 264, in _reconstruct
y = func(*args)
File "/opt/conda/lib/python3.9/copy.py", line 263, in <genexpr>
args = (deepcopy(arg, memo) for arg in args)
File "/opt/conda/lib/python3.9/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/opt/conda/lib/python3.9/copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/opt/conda/lib/python3.9/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/opt/conda/lib/python3.9/copy.py", line 264, in _reconstruct
y = func(*args)
File "/opt/conda/lib/python3.9/copy.py", line 263, in <genexpr>
args = (deepcopy(arg, memo) for arg in args)
File "/opt/conda/lib/python3.9/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/opt/conda/lib/python3.9/copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/opt/conda/lib/python3.9/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/opt/conda/lib/python3.9/copy.py", line 210, in _deepcopy_tuple
y = [deepcopy(a, memo) for a in x]
File "/opt/conda/lib/python3.9/copy.py", line 210, in <listcomp>
y = [deepcopy(a, memo) for a in x]
File "/opt/conda/lib/python3.9/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/opt/conda/lib/python3.9/copy.py", line 264, in _reconstruct
y = func(*args)
File "/opt/conda/lib/python3.9/copy.py", line 263, in <genexpr>
args = (deepcopy(arg, memo) for arg in args)
File "/opt/conda/lib/python3.9/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/opt/conda/lib/python3.9/copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/opt/conda/lib/python3.9/copy.py", line 161, in deepcopy
rv = reductor(4)
File "/opt/conda/lib/python3.9/site-packages/numba/core/types/functions.py", line 486, in __getnewargs__
raise ReferenceError("underlying object has vanished")
ReferenceError: Failed in nopython mode pipeline (step: handles literal_unroll)
Failed in literal_unroll_subpipeline mode pipeline (step: performs mixed container unroll)
underlying object has vanished