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

grobidOrg / grobid / 29397184458

15 Jul 2026 07:23AM UTC coverage: 39.306% (+0.1%) from 39.173%
29397184458

push

github

web-flow
Fix JVM shutdown deadlock when closing JEP Python interpreters (#1506)

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

8919 of 25290 branches covered (35.27%)

Branch coverage included in aggregate %.

19071 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