简体   繁体   中英

Spurious wakeup occur in practice

During a loadtest with 3000 concurrent sessions and around 300 transactions per second on a Dual Quad core Windows 2008 64 bit server running Java 1.7.0_09 we observed in practice two confirmed instances of spurious wakeup ie threads which exited their wait() method without being notified and before the wait timeout has expired.

During the time of the wakeup the machine CPU was at less than 20% and plenty of memory was available. Also no excessive garbage collection has been observed. Luckily our recently introduced spin lock was able to trap this condition and continue the wait()

The spurious wakeup phenomena is documented in the JavaDoc of java.lang.Object wait() but its the first time I'm actually seeing it in practice. Is this a bug in Windows or in Java ?

由于它是文档记录,它不能是一个错误。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM