thorium: add some code to detect soft lockups

Signed-off-by: Sébastien Boisvert <boisvert@anl.gov>