I am running Jupiter notebook to process some huge load on a list of arrays as:
import multiprocessing as mp
print("Number of processors: ", mp.cpu_count())
pool = mp.Pool(mp.cpu_count())
try:
a_results = pool.map_async(process_each_area, [area for area in areas]).get()
except:
print(e)
finally:
pool.close()
Each processed area create one result file, which I expect to see once all the processes are done.
On submission, all 96 cpu core get busy and I see 96 new kernels as:

$ ps -ef|grep ipykernel | wc -l 96
But after some time(80-90 minutes), all the cpu's go back to zero usage, while processes are still alive and not complete. I see then while grep as above. Also, results for all the areas are not created.
My question is: Why process go idle, but not complete after sometime? How can I debug them? Do we have threaddump in python?