Skip to content

Commit 9385f39

Browse files
mriggerclaude
andcommitted
Shut down executor threads after timeout to prevent JaCoCo EOFException
When executeMain times out, awaitTermination returns but worker threads remain running (non-daemon). For remote DBs like Materialize, threads blocked on network I/O prevent the JVM from exiting cleanly, causing surefire to forcibly kill the process before JaCoCo can flush jacoco.exec, resulting in an EOFException during report generation. Calling shutdownNow() after the timeout interrupts threads (PostgreSQL JDBC socket reads respond to Thread.interrupt()), allowing them to exit and JaCoCo to write complete coverage data. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 46813b5 commit 9385f39

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/sqlancer/Main.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,7 @@ private boolean run(MainOptions options, ExecutorService execService,
715715
execService.awaitTermination(Long.MAX_VALUE, TimeUnit.DAYS);
716716
} else {
717717
execService.awaitTermination(options.getTimeoutSeconds(), TimeUnit.SECONDS);
718+
execService.shutdownNow();
718719
}
719720
} catch (InterruptedException e) {
720721
e.printStackTrace();

0 commit comments

Comments
 (0)