hoverfly-java icon indicating copy to clipboard operation
hoverfly-java copied to clipboard

`Text file busy` while running hoverfly with surefire forkmode

Open datenbrille opened this issue 4 years ago • 1 comments

Description of the bug

Currently we run a larger testsuite from maven and used hoverfly to simulate request. Lately we switched from sequential task execution to parallel execution with surefire and fork mode. This mean we are starting up to 4 JVM processes and run those simultaneously. After the switch ones or twice a day a test run fails with the mentioned error below. It seems that two JVM trying to access the same hoverfly file.

Steps to reproduce the issue

Run multiple hoverfly test with surefire fork mode more then 2.

Observed result

Hoverfly Java and Hoverfly error messages seen (If none, say none)

java.lang.IllegalStateException: Could not start Hoverfly process
Caused by: org.zeroturnaround.exec.ProcessInitException: Could not execute [/tmp/hoverfly.8441131355742916126/hoverfly_linux_amd64, -pp, 34205, -ap, 45433, -logs, json] in /tmp/hoverfly.8441131355742916126. Error=26, Text file busy
Caused by: java.io.IOException: Cannot run program "/tmp/hoverfly.8441131355742916126/hoverfly_linux_amd64" (in directory "/tmp/hoverfly.8441131355742916126"): error=26, Text file busy
Caused by: java.io.IOException: error=26, Text file busy

Expected result

Two JVM do not share the same hoverfly binary.

Additional relevant information

If not indicated above:

  1. Hoverfly Java version: 0.12.2, openjdk 1.8 Update 241

datenbrille avatar Mar 26 '20 10:03 datenbrille

Not sure if it's related to this JDK bug: https://bugs.openjdk.java.net/browse/JDK-8068370 Here is a similar issue: https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo/issues/246

tommysitu avatar Apr 01 '20 22:04 tommysitu