Maven builds randomly failing but passing on rebuild


I have a Maven build (that you can look at here). Whenever the system starts a new build, it fails for one of two reasons. If you look at build 37 it failed because of a timeout on a Maven timeout. Build 38 failed because the Maven test command “died unexpectedly”, but I don’t see any useful error output. Build 39 passed.

Build 37 was triggered by a push and 38 and 39 were rebuilds. I can’t figure out why rebuilding the same build would succeed sometimes and fail other times. Can someone help me figure out why this is happening and how I can make sure builds pass deterministically?

Thanks in advance!