Ctest gets hung-up, intermittently for specific tests

I am trying to build couchbase from source on Ubuntu16.04 setup for the branch 4.5.0.
I am able to build it successfully, however the tests are getting hang in-between. More specifically, most of the tests for sub-modules of forestdb are facing this problem.

The LastTestlogs also doesn’t give me much of the information. Is there any way to get more detailed logs so as to trace-back the issue?
OR any pointers around what might cause tests to hang, will help analyse the issue I am seeing.