• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

grobidOrg / grobid / 29348786821

14 Jul 2026 03:30PM UTC coverage: 39.309% (+0.1%) from 39.173%
29348786821

push

github

lfoppiano
Fix JVM shutdown deadlock when closing JEP Python interpreters

The shutdown hook closed Jep instances from the hook thread, but JEP
only allows an interpreter to be closed by the thread that created it:
every close() threw "Unsafe close() of Python sub-interpreter" and the
interpreter was never torn down, leaving the JVM parked forever after
DeLFT evaluations completed.

- delegate the close to the executor worker thread that owns the
  Jep instance, with a bounded wait
- make the executor threads named daemons so a wedged interpreter can
  never block JVM exit
- make shutdown() idempotent via AtomicBoolean instead of synchronized,
  removing a monitor deadlock between the hook thread and the worker
- replace the busy-wait in JEPThreadPoolClassifier.run() with
  future.get() and exception propagation, matching JEPThreadPool

8920 of 25290 branches covered (35.27%)

Branch coverage included in aggregate %.

19072 of 45920 relevant lines covered (41.53%)

1.68 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

34.42
/org/grobid/core/jni/JEPThreadPoolClassifier.java


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc