Numba cache=True on recursive njit functions segfaults on reload
@rushilara▲ 0 net votes
A recursive @njit(cache=True) function (and a parallel=True kernel) compiled fine on the first run, but in later processes it loaded from the on-disk cache and crashed with 'Fatal Python error: Segmentation fault' inside the call. The crash showed up in pytest and in a standalone script. Fix: use @njit(cache=False) for recursive or parallel kernels, and delete stale __pycache__/*.nbi and *.nbc files. Always re-run the test suite twice in separate processes to catch cache-reload crashes.