[ https://issues.apache.org/jira/browse/IMPALA-6293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16704142#comment-16704142 ]
ASF subversion and git services commented on IMPALA-6293: --------------------------------------------------------- Commit a03fb1df4db7b79e8ed5e092556ebb3bfe99b70d in impala's branch refs/heads/master from [~fredyw] [ https://git-wip-us.apache.org/repos/asf?p=impala.git;h=a03fb1d ] IMPALA-6293: Unset JAVA_TOOL_OPTIONS variable from shell commands JAVA_TOOL_OPTIONS is a variable used by JVM to specify the JVM options. Impala has several flags that specify shell commands for Impala to run, such as - s3a_access_key_cmd - s3a_secret_key_cmd - ssl_private_key_password_cmd - webserver_private_key_password_cmd When debugging the JVM inside the Impala process, it is useful to specify JAVA_TOOL_OPTIONS to run the Java debugger on a particular port. However, JAVA_TOOL_OPTIONS remains in the environment, so it is passed to these shell commands. If any of these shell commands run Java, then that JVM will attempt to use the JAVA_TOOL_OPTIONS specified and thus try to bind to the same port. The Impala process JVM is already bound to that port, so this will fail. This patch fixes the issue by unsetting JAVA_TOOL_OPTIONS before running these shell commands. Testing: - Added a new test for os-util.cc Change-Id: I96a84a27d3bf7b02f04e70562acfd67386b93183 Reviewed-on: http://gerrit.cloudera.org:8080/12005 Reviewed-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com> > Shell commands run by Impala can fail when using the Java debugger > ------------------------------------------------------------------ > > Key: IMPALA-6293 > URL: https://issues.apache.org/jira/browse/IMPALA-6293 > Project: IMPALA > Issue Type: Bug > Components: Backend > Affects Versions: Impala 2.11.0 > Reporter: Joe McDonnell > Assignee: Fredy Wijaya > Priority: Major > > Impala has several parameters that specify shell commands for Impala to run: > s3a_access_key_cmd > s3a_secret_key_cmd > ssl_private_key_password_cmd > webserver_private_key_password_cmd > When debugging the JVM inside the Impala process, it is useful to specify > JAVA_TOOL_OPTIONS to run the Java debugger on a particular port. However, > JAVA_TOOL_OPTIONS remains in the environment, so it is passed to these shell > commands. If any of these shell commands run java, then that JVM will attempt > to use the JAVA_TOOL_OPTIONS specified and thus try to bind to the same port. > The Impala process JVM is already bound to that port, so this will fail. > Several of these commands run at startup, so Impala will fail to startup with > the Java debugger. > Impala should be careful about the environment variables that get passed to > these shell programs. In particular, JAVA_TOOL_OPTIONS should be scrubbed of > any Java debugger configuration to avoid these port conflicts. It might be > best to simply null out JAVA_TOOL_OPTIONS for these commands. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org For additional commands, e-mail: issues-all-h...@impala.apache.org