Tracking down instant crashes with multithreading

Hi All,

I’m working on converting a program from multi-process to multi-threading.
I’ve been through the code and am very confident that everything works in its own memoryspace (not writing to the same variables at the same time) and i’m using ReentrantLock appropriately.

However, I’m sometimes getting fail-fast crashes where the Julia application just exits with no indication what’s wrong.

No doubt it’s something I’m doing that’s caused this, but I don’t see a path forward using Julia in this manner, as it’s inevitable in future that further bugs will be introduced, and they are almost impossible to track down.

Does anyone know how I can use GDB or a similar package to track down instant process quits?


No-one can assist? Seems that there should be a way of determining the cause of a crash instead of the process just instantly quitting.

running with --checkbounds=yes is always a good idea here. RR can also be helpful.

Thanks for the pointer - however I would expect to get failures in single threaded mode if boundary issues were the case? Single threaded mode works fine - it’s just my worker processes suddenly quit with no explanation:

Unfortunately we are on windows. I guess I could spin up a linux VM and play there?

Any chance you are calling into non-julia code that isn’t threadsafe? Other than that, it’s hard to say what’s going wrong.

Maybe… the question is how do I determine what’s gone wrong?

At a very high level, the process knows that it has attempted to do X, and X is not possible, so it has quit.

The question is, how do I find out what X was?