M. Makundi from the hotspot-gc-use mailing list (subject "G1gc compaction algorithm") reports a VM hang with 8u40-b02 EA and 8u40-b06 EA on their application after a few hours.
The problem is that typically one thread is not able to synchronize at the safepoint.
Internally we managed to reproduce the same problem with 8u40-b02 until after the fix for JDK-8056154.
The attached stack trace (gstacks.txt) shows that thread 49 seems stuck in compiler related methods; note that in mentioned earlier reproductions this has been a single random java thread that hung.