Generate a core dump when CompleteInTimeOrDie forcefully quits

Summary: CompleteInTimeOrDie was added to detect deadlocks and proactively exit. In addition, call os.abort() to generate a core dump so that the error is actionable.

Reviewed By: bmaurer

Differential Revision: D6938343

fbshipit-source-id: 8bd36da4f4bb1195bd3398f25d133a6ebf1c66ad
This commit is contained in:
Andrew Dye 2018-02-08 13:35:33 -08:00 committed by Facebook Github Bot
parent 01de4e40d6
commit 6ecaed5021

View file

@ -83,7 +83,7 @@ class WatcherThread(threading.Thread):
print("\n".join(code))
log.error("Process did not terminate cleanly in 10 s, forcing")
os._exit(1)
os.abort()
forcet = threading.Thread(target=forcequit, args=())
forcet.daemon = True