-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Java: ErrorStreamSink does not clean itself up (invoked by mvn exec:java) #2533
Java: ErrorStreamSink does not clean itself up (invoked by mvn exec:java) #2533
Comments
…rrupted When the thread is interrupted, it should understand the VM is asking it to shut down, and stop polling the child process' STDERR for more data. Previously, the thread did not check Thread.interrupted(), and hence was ignoring requests to terminate, resulting in ugly errors during clean-up. This adds the necessary check for interrupt status, and stops the error sink as asked by the VM. Fixes #2533
Alright so basically I reckon this is due to the What's tricky here is that it is surprisingly hard in Java to make a "blocking read with timeout" happen without involving yet another thread, which might also get locked on uninterruptible blocking operations... Additionally, I have not encountered this particular problem on |
Thank you for your answer, in our team we have a mix of Ubuntu users, Mac OS users and Windows Users (Windows + WSL), Vmware with Linux as guest, and we all experienced this problem, and I don't know what to provide with more information, as we settled on using the |
@bundgaard - it turns out I was actually not attempting to reproduce this problem correctly. It may however not be possible to completely fix this problem (although I have a PR out that attempts to)... The culprit here is that we have the Now -- should my current PR not be sufficient to solve it, I have a couple of other ideas that we can try, in order to more gracefully integrate with |
@RomainMuller Thanks for informing me, if I can provide you with anything, in respect to our company policy, I will gladly help you. Keep up the good work. |
…rrupted (#2540) Use `zt-exec` to launch the `jsii-runtime` process, as it offers better semantics for IO redirection than Java's standard `ProcessBuilder` API (that it wraps). This includes ways to pipe the standard outputs (in particular, `STDERR`) though a line handler, which is *exactly* what we need to achieve in this particular case. Since we no longer manage an error stream sink thread, we can hope that this solves the issue of the thread not responding to interruptions correctly. Fixes #2533
|
🐛 Bug Report
Affected Languages
TypeScript
orJavascript
Python
Java
C#
,F#
, ...)General Information
What is the problem?
We started receiving this error yesterday, and the only way to get rid of this error is using
-Dexec.cleanupDaemonThreads=false
Verbose Log
The text was updated successfully, but these errors were encountered: