In BPServiceActor.offerService we use an object waitForHeartBeats to wait until the next heartbeat happen. This is remanent from the apache hadoop implementation that mix offerService and incremental block report. In their case they may have to trigger an incremental block report before the time between heartbeats is expired. For this reason, they use an object on which they can call notify. In hops offerService and incremental block reports are separated. As a result, offerService will never be triggered before the end of the timeout and no notify is ever called on the waitForHeartBeats object. This can cause a deadlock in the case where the wait time for the waitForHeartBeats.wait call is equal to 0. We should replace this wait by a simple Thread.sleep.