You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a timeout occurs, the behavior is correct but, sometimes, a race condition happens and an unhandled exception is thrown.
To Reproduce
public class TimeoutTest {
public static void main(String[] args) {
ProcBuilder builder = new ProcBuilder("bash", "-i", "-c", "echo hello").withTimeoutMillis(1);
try {
builder.run();
} catch (TimeoutException ex) {
//OK
}
}
}
Expected behavior
No uncaught exception should be printed in stderr.
Actual Behaviour
These traces are printed by stderr
Exception in thread "Thread-1" java.lang.RuntimeException: ${END}
at org.buildobjects.process.Proc.dispatch(Proc.java:168)
at org.buildobjects.process.ByteArrayConsumptionThread$1.run(ByteArrayConsumptionThread.java:36)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.InterruptedException
at java.base/java.util.concurrent.locks.ReentrantLock$Sync.lockInterruptibly(ReentrantLock.java:159)
at java.base/java.util.concurrent.locks.ReentrantLock.lockInterruptibly(ReentrantLock.java:372)
at java.base/java.util.concurrent.LinkedBlockingQueue.put(LinkedBlockingQueue.java:332)
at org.buildobjects.process.Proc.dispatch(Proc.java:166)
... 2 more
Exception in thread "Thread-0" java.lang.RuntimeException: ${END}
at org.buildobjects.process.Proc.dispatch(Proc.java:168)
at org.buildobjects.process.StreamCopyConsumptionThread$1.run(StreamCopyConsumptionThread.java:30)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.InterruptedException
at java.base/java.util.concurrent.locks.ReentrantLock$Sync.lockInterruptibly(ReentrantLock.java:159)
at java.base/java.util.concurrent.locks.ReentrantLock.lockInterruptibly(ReentrantLock.java:372)
at java.base/java.util.concurrent.LinkedBlockingQueue.put(LinkedBlockingQueue.java:332)
at org.buildobjects.process.Proc.dispatch(Proc.java:166)
... 2 more
I didn't expect any uncaught exception.
Context
I did use Ubuntu.
The text was updated successfully, but these errors were encountered:
Describe the bug
When a timeout occurs, the behavior is correct but, sometimes, a race condition happens and an unhandled exception is thrown.
To Reproduce
Expected behavior
No uncaught exception should be printed in stderr.
Actual Behaviour
These traces are printed by stderr
I didn't expect any uncaught exception.
Context
I did use Ubuntu.
The text was updated successfully, but these errors were encountered: