add abort call to deadlock detection code

Added a call to abort to generate core dumps on failure and fixed a few warnings