RFR: JDK-8168141: javax/management/remote/mandatory/notif/EmptyDomainNotificationTest.java: No notif received!

Robbin Ehn robbin.ehn at oracle.com
Tue Nov 8 12:00:49 UTC 2016


Hi David,

On 11/08/2016 12:48 PM, David Holmes wrote:
> Sorry didn't see Staffan's earlier reply :)

Thanks anyways!

>> You should always perform a wait() in a loop checking the condition that
>> is being waited upon. This guards against lost-notifications and also
>> spurious wakeups.

If you both are talking about signals + pthread_cond_wait, we can fix 
that with e.g. semaphore instead. (since it keeps track of the number of 
posts) But that's whole nother discussion... :)

Lost notification, I don't see that?

>> If the notifyAll() happened before you get here then you will wait()
>> until jtreg does time you out - even though the notification correctly
>> occurred.

Correct, might work with move the start of synch block just after 
listener creation, before addListener, but maybe deadlock prone with 
mbsc.invoke ...

/Robbin


More information about the serviceability-dev mailing list