On Tue, 15 Nov 2022 07:31:46 GMT, Alexander Zuev <[email protected]> wrote:
> On m1 mac sometimes (in very rare instance) it takes a long time to get the > sequencer so increasing timeout helps with that. > Also on m1 mac sequencer got notified about the first MetaMessage twice. The > reason is unclear but watching for that fixes the problem. Also on Linux > sometimes process hangs indefinitely without finishing hold by the > com.sun.media.sound.MediaDispatcher. Closing the sequencer at the end of the > test helps with that. test/jdk/javax/sound/midi/Sequencer/MetaCallback.java line 43: > 41: * @summary MIDI MetaMessage callback inconsistent > 42: * @key intermittent sound > 43: * @run main/othervm/timeout=300 MetaCallback "On m1 mac sometimes (in very rare instance) it takes a long time to get the sequencer so increasing timeout helps with that." Hmm. 5 minutes is a really long time for something that should take less than 1 second (getting the sequencer). Is that because something else (perhaps another process) is holding a needed resource ? Are any other tests running ? Or were you running this test in a loop ? Perhaps it is something like what you say happened on Linux where the test wouldn't exit until the sequencer was closed ? Suppose some other process managed to exist without properly releasing some system resource .. and the next app that needed it has to wait until the O/S cleaned up? Is that possible ? Our CI test harness automatically multiplies test timeout by 2 so you've now in effect got a VERY long 10 minute timeout on this test .. way too long I think. test/jdk/javax/sound/midi/Sequencer/MetaCallback.java line 69: > 67: // On M1 Mac sometimes system notifies listener about the same > message twice > 68: static List<MetaMessage> received = Collections.synchronizedList(new > ArrayList<>()); > 69: Is this our bug ? test/jdk/javax/sound/midi/Sequencer/MetaCallback.java line 112: > 110: sequencer.stop(); > 111: sequencer.close(); > 112: } I can believe this was a problem. IIRC on x64 mac I had some program block until I closed the sequencer. Can you check other jtreg sound tests for similar potential problems ------------- PR: https://git.openjdk.org/jdk/pull/11157
