karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julien Greffe (JIRA)" <j...@apache.org>
Subject [jira] [Created] (KARAF-6377) GCLog corrupted when executing stop
Date Wed, 07 Aug 2019 15:37:00 GMT
Julien Greffe created KARAF-6377:
------------------------------------

             Summary: GCLog corrupted when executing stop
                 Key: KARAF-6377
                 URL: https://issues.apache.org/jira/browse/KARAF-6377
             Project: Karaf
          Issue Type: Bug
          Components: karaf
    Affects Versions: 4.2.4, 4.1.6
            Reporter: Julien Greffe


Hello,

on a Karaf instance with GCLogs activated, executing the {{stop}} command leads to a corrupted
GCLog.

To reproduce :
 * add these lines inĀ {{<KARAF_HOME>/bin/setenv.bat}} :

{code:java}
SET JAVA_MIN_MEM=1024M
SET JAVA_MAX_MEM=2560M
SET KARAF_OPTS=-verbose:gc -Xloggc:gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation
-XX:NumberOfGCLogFiles=20 -XX:GCLogFileSize=10m{code}

 * start the container with {{<KARAF_HOME>/bin/karaf.bat}}
 * check the content of {{<KARAF_HOME/gc.log}}
 * stop the container with {{<KARAF_HOME/bin/stop.bat}}
 * check the content of {{<KARAF_HOME/gc.log}} >> corrupted with non printable characters

Quick analysis :
seems the issue is linked to the way {{stop}} condition is handled in {{karaf.bat}} and {{karaf}}
the final command executed :
{code}
:EXECUTE
"%JAVA%" %JAVA_OPTS% %OPTS% ...
{code}

Instead of using {{stop.bat}}, if we execute this command, the GCLog isn't corrupted anymore
:
{code}
java -classpath "<KARAF_HOME>\lib\boot\org.apache.karaf.main-4.2.4.jar" -Dkaraf.home="<KARAF_HOME>"
org.apache.karaf.main.Stop
{code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Mime
View raw message