elharo opened a new issue, #170:
URL: https://github.com/apache/maven-toolchains-plugin/issues/170
## Summary
launches a subprocess and calls without a timeout. A hung or slow JVM
process will block Maven indefinitely.
## Location
https://github.com/apache/maven-toolchains-plugin/blob/master/src/main/java/org/apache/maven/plugins/toolchain/jdk/ToolchainDiscoverer.java#L243-L250
## Code
## Problem
without arguments blocks forever until the process completes. If the
discovered JDK's java binary is:
- A script that hangs
- A broken/corrupted installation
- An interactive shell
- Extremely slow (e.g., on a network filesystem)
Maven will hang indefinitely with no way to recover other than killing the
process.
## Impact
During JDK toolchain discovery, a single problematic JDK installation can
cause the entire Maven build to hang permanently. Since discovery scans many
directories (including user-controlled paths like , , etc.), a corrupted or
slow JDK in any of these locations blocks the build.
## Suggested Fix
Use with a reasonable timeout (e.g., 30 seconds), and if the process times
out, destroy it and log a warning:
--
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]