Heartbeats fail in both directions on the node running compact().
On the send side of a heartbeat, the sender need to up() the receiver node, which calls addToElectable() set which needs the rsbase mutex. The rsbase mutex is held by the syncthread as it tryToGoLiveAsSecondary()s, but the syncthread has to wait on a global write lock which it can't get because compact is holding a write lock.
On the receiving side, the issue is the exact same only the receiver is looking for the rsbase mutex in iAmElectable().
It might be possible to make tryToGoLiveAsSecondary() return prior to the global writeLock request if we are running compact.