hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vasu Mariyala (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HBASE-7817) Suggested JDWP debug options in hbase-env.sh are wrong
Date Fri, 29 Mar 2013 23:55:15 GMT

     [ https://issues.apache.org/jira/browse/HBASE-7817?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Vasu Mariyala updated HBASE-7817:

    Attachment: HBASE-7817.patch

Background of the issue:

Initializing the common configuration and setting up the environment variables is done by
hbase-config.sh. This file in turn sources hbase-env.sh to set up the environment variables.
For few environment variables which contain multiple configurations, new content is appended
to the existing content. 


export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS $HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10101"
export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8070"

Since most of the scripts like hbase-daemons.sh, hbase-daemon.sh can be run independently
by the users, all of these scripts source the hbase-config.sh. As a result, hbase-config.sh
and there by hbase-env.sh are invoked multiple times in a flow. Due to this, few environment
variables like HBASE_MASTER_OPTS contain duplicate data. In the scenarios like the jdwp debug
options, the duplicate content would not let hbase start successfully.

In addition to the above, there is a cyclic dependency between hbase-env.sh and hbase-daemon.sh

a) HBase-env.sh can export HBASE_USE_GC_LOGFILE


b) HBase-Daemon.sh sets HBASE_GC_OPTS

if [ "$HBASE_USE_GC_LOGFILE" = "true" ]; then
  export HBASE_GC_OPTS=" -Xloggc:${loggc}"

c) Back in HBase-env.sh, we have the SERVER_GC_OPTS and CLIENT_GC_OPTS depend on the HBASE_GC_OPTS
set in HBase-daemon.sh as below

export SERVER_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps $HBASE_GC_OPTS"
export CLIENT_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps $HBASE_GC_OPTS"

The patch fixes the issue mentioned in this jia and also removes the cyclic dependency between
these scripts.
> Suggested JDWP debug options in hbase-env.sh are wrong
> ------------------------------------------------------
>                 Key: HBASE-7817
>                 URL: https://issues.apache.org/jira/browse/HBASE-7817
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Ian Varley
>            Priority: Minor
>             Fix For: 0.95.0, 0.98.0, 0.94.7
>         Attachments: HBASE-7817.patch
> In the default hbase-env.sh in trunk, there's a section for lines you can uncomment to
enable JDWP remote debugging:
> {code:none}
>     # Enable remote JDWP debugging of major HBase processes. Meant for Core Developers

>     # export HBASE_MASTER_OPTS=" -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8070"
>     # export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8071"
>     # export HBASE_THRIFT_OPTS="$HBASE_THRIFT_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8072"
>     # export HBASE_ZOOKEEPER_OPTS="$HBASE_ZOOKEEPER_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8073"
> {code}
> However, this is wrong (at least, if you're starting from local source), because somewhere
in the chain of start-hbase.sh, it sources hbase-env.sh more than once, which has the effect
of including these options twice, which makes the JVM barf on startup, saying
> "ERROR: Cannot load this JVM TI agent twice, check your java command line for duplicate
jdwp options. Error occurred during initialization of VM; agent library failed to init: jdwp".
> Removing the first re-included instance of $HBASE_MASTER_OPTS (etc.) solves the problem.
This should either be changed in the default or these scripts shouldn't source hbase-env.sh
multiple times I think.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message