jmisb icon indicating copy to clipboard operation
jmisb copied to clipboard

api-ffmpeg integration tests are flaky

Open bradh opened this issue 3 years ago • 3 comments

Describe the bug During CI, the JDK 14 test sometimes fails, with errors that look like:

 [INFO] 
[INFO] Results:
[INFO] 
Error:  Failures: 
Error:    VideoFileInputOutputIT.testRipKlv:183->createFile:294 » NoClassDefFound Could not initialize class org.bytedeco.ffmpeg.global.swscale
Error:    VideoFileInputOutputIT.testSimple:101 » NoClassDefFound Could not initialize class org.bytedeco.ffmpeg.global.swscale
Error:    VideoFileInputOutputIT.testWithData:122->createFile:294 » NoClassDefFound Could not initialize class org.bytedeco.ffmpeg.global.swscale
Error:    VideoFileInputOutputIT.testWithDataH265:152->createFile:294 » NoClassDefFound Could not initialize class org.bytedeco.ffmpeg.global.swscale
[INFO] 
Error:  Tests run: 9, Failures: 4, Errors: 0, Skipped: 0

An example is at https://github.com/WestRidgeSystems/jmisb/runs/6536608638?check_suite_focus=true

The logs contain:

Debug: Locking /home/runner/.javacpp/cache before extracting
Debug: Failed to extract for jniswscale: java.lang.UnsatisfiedLinkError: java.nio.channels.FileLockInterruptionException

Possibly this is a race in some of our tests where we're calling Thread.interrupt() at the wrong time. However I'm only seeing that in a shutdown method.

To Reproduce I can't reproduce this locally on JDK 11. Possibly JDK 14 is needed.

Expected behavior Stable tests.

Screenshots N/A

Configuration (please complete the following information):

  • Happens on JDK 14 on Github actions.

Additional context Add any other context about the problem here.

bradh avatar May 22 '22 09:05 bradh

I wonder if we should update that to use JDK 17, since 14 was one of those releases that only got 6 months of support (which has now ended)?

I just tried running the failsafe tests locally a few times with an Oracle 17.0.3 JVM and didn't see anything.

Unless you have a need for 14, I'll probably just go ahead and update to 17, then we can see if the problem persists.

wlfgang avatar May 25 '22 17:05 wlfgang

I've added the PR for JDK 17, but also note that we had the same failure on JDK 11 at https://github.com/WestRidgeSystems/jmisb/runs/6634860480?check_suite_focus=true

So while the JDK 14 -> JDK 17 change is worth doing, its not sufficient to resolve this problem.

bradh avatar May 28 '22 05:05 bradh

Just had another JDK11 failure, so not JDK 14 specific.

bradh avatar Aug 28 '22 23:08 bradh