ChoiByungHo created ZEPPELIN-6258:
-------------------------------------
Summary: Improve Process resource management in
SparkInterpreterLauncher
Key: ZEPPELIN-6258
URL: https://issues.apache.org/jira/browse/ZEPPELIN-6258
Project: Zeppelin
Issue Type: Bug
Reporter: ChoiByungHo
Assignee: ChoiByungHo
The `detectSparkScalaVersion` method in `SparkInterpreterLauncher.java` has
potential issues with Process resource management that could lead to process
hangs and resource leaks.
Current Issues
1. Missing stdout stream handling
The process's stdout stream is not consumed, which can cause buffer overflow
and process hang if the process produces output to stdout.
2. No timeout for process execution
The `process.waitFor()` call has no timeout, potentially causing indefinite
blocking if spark-submit hangs.
3. Process not properly destroyed
The Process instance is not explicitly destroyed after use, which may leave
zombie processes.
4. No exit value validation
The process exit value is not checked, making it difficult to diagnose failures.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)