<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Nov 16, 2022, at 8:49 PM, Michael Hall <<a href="mailto:mik3hall@gmail.com" class="">mik3hall@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Nov 16, 2022, at 8:44 PM, Michael Hall <<a href="mailto:mik3hall@gmail.com" class="">mik3hall@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">@AlanBateman still can't reproduce any of that on my hardware, </span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""></div></blockquote><br class=""></div><div class="">Same using ‘make test’ besides my own modified. </div><div class=""><br class=""></div><div class="">Passed: java/nio/file/WatchService/LotsOfEvents.java</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class="">I've been backed up with other things and finally getting to look at this more closely. For testing, I tried both release and debug builds across a range of macOS releases on both x64 and aarch64. Unfortunately there is a lot of timeouts and intermittent failures and across quite a range of macOS releases (from 10.15 to 12.2).</blockquote><br class=""></div><div class="">Doesn’t this sort of sound like a threading/deadlock type issue? Intermittent - timeouts. Maybe your runloop concerns were well founded.</div></div></div></blockquote><br class=""></div><div class="">Or does this possibly go back to the earlier discussed file descriptors running out issues?</div><div class=""><br class=""></div><div class="">FSEvents API leaks file descriptors (KQUEUE)</div><div class=""><a href="https://stackoverflow.com/questions/20311184/fsevents-api-leaks-file-descriptors-kqueue" class="">https://stackoverflow.com/questions/20311184/fsevents-api-leaks-file-descriptors-kqueue</a></div></div></div></blockquote><br class=""></div><div>I changed my modified LotsOfEvents to run 20 times and saw no indication doing lsof’s that file descriptors might be leaked.</div><div><br class=""></div><div>All 20 did run successfully. Are there any suggestions as to what is being done differently for the frequent errors as opposed to when there are no failures?</div><div><br class=""></div><div>Again,</div><div>WatchService: Run loop 600003a5c500 - waiting for event source...<br class="">----------System.err:(12/655)----------<br class="">java.lang.RuntimeException: Key not signalled (unexpected)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>at LotsOfEvents.drainAndCheckOverflowEvents(LotsOfEvents.java:112)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>at LotsOfEvents.testOverflowEvent(LotsOfEvents.java:84)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>at LotsOfEvents.main(LotsOfEvents.java:51)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>at java.base/java.lang.reflect.Method.invoke(Method.java:578)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>at java.base/java.lang.Thread.run(Thread.java:1591)</div><div><br class=""></div><div>The runloop ‘appears’ to go into a wait for something that doesn’t happen. I think I saw LotsOfEvents may have different timeout limits than the test framework.</div><div><br class=""></div><div>WatchService: Run loop 60000<br class="">result: Error. Agent error: java.lang.Exception: Agent 8 timed out with a timeout of 480 seconds; check console log for any additional details<br class=""></div><div><br class=""></div><div>This one appears to be the testing framework issuing the timeout. 8 minutes seems more like a deadlock. Again following a run loop trace message.</div><div><br class=""></div><div>It seems like you could look into the run loop part of the code. I never had a good grasp on run loops. </div><div>Hoping that some change eliminates the errors. But being unable to reproduce the errors I don’t know that I would want to try this.</div><div><br class=""></div><div><br class=""></div><br class=""></body></html>