elharo opened a new issue, #385: URL: https://github.com/apache/maven-shared-utils/issues/385
`StreamPollFeeder.done` (line 40) is not declared `volatile`, but is read in `run()` outside any `synchronized` block (line 61) while being written in `waitUntilDone()` inside `synchronized (lock)` (line 107). When the `run()` thread is actively reading data (`input.available() > 0` is continuously true), it never enters the `synchronized (lock)` block where the lock's happens-before would provide visibility. So `waitUntilDone()` setting `done = true` may never be seen by the `run()` thread, causing it to loop forever — and `waitUntilDone()`'s subsequent `join()` call hangs too. Fix: declare `done` as `volatile`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
