Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-12849

The parameter -XX:HeapDumpPath is not ovewritten by cassandra-env.sh

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • None
    • Local/Config
    • Normal
    • Low Hanging Fruit

    Description

      The parameter -XX:HeapDumpPath appears twice in the java process

      user@node:~$ sudo ps aux | grep --color HeapDumpPath

      java -ea -javaagent:/usr/share/cassandra/lib/jamm-0.3.0.jar -XX:+CMSClassUnloadingEnabled -XX:+UseThreadPriorities -XX:ThreadPriorityPolicy=42 -Xms1024M -Xmx1024M -Xmn200M -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/lib/cassandra-1477577769-pid1516.hprof -Xss256k
      ...............................
      -XX:HeapDumpPath=/home/cassandra/java_1477577769.hprof -XX:ErrorFile=/var/lib/cassandra/hs_err_1477577769.log org.apache.cassandra.service.CassandraDaemon

      The problem is when we have an OOM error, the JVM dump goes to /home/cassandra/java_1477577769.hprof * when the correct behavior is to go to the path defined by cassandra-env.sh */var/lib/cassandra-1477577769-pid1516.hprof

      This is quite annoying because cassandra takes into account only the path defined by the script init (usually that disk is not that big to keep 8Gb of a heap dump) and not the path defined in cassandra-env.sh

      user@node:~$ jmx4perl http://localhost:8523/jolokia read com.sun.management:type=HotSpotDiagnostic DiagnosticOptions
           {
              name => 'HeapDumpPath',
              origin => 'VM_CREATION',
              value => '/home/cassandra/java_1477043835.hprof',
              writeable => '[true]'
            },
      
      

      Attachments

        1. 12849-trunk.txt
          2 kB
          Yogesh Nachnani

        Issue Links

          Activity

            People

              Unassigned Unassigned
              carlo_4002 jean carlo rivera ura
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: