How can I tell if my multithreaded Python program is crashing on my Pi 3 because there are too many threads? (Or poorly written ones?)
My multithreaded program involves three looping threads: a main loop, a talking UDP socket and listening UDP socket. The code runs fine on Ubuntu in a virtual box but crashes in a non-reproducible manner on the Raspberry Pi running a RT Raspbian kernel (from Emlid's blog). However, I haven't actually leveraged the RT scheduler at all (nor am I sure it is utilizable anymore since we're using Python and not C).
I plan to use Htop while running my code to view threads and CPU usage but I am unsure of what I should be looking for.
Would too many Python threads on a Pi 3 crash the program? How could I tell? Is it the GIL? How could this be overcome? Should I use another OS besides Raspbian? Ubuntu Snappy or Ubuntu Mate?
Please help. Thanks in advance.