Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
4.1.6, 4.2.4
-
None
-
None
Description
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 :
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
- 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 :
:EXECUTE
"%JAVA%" %JAVA_OPTS% %OPTS% ...
Instead of using stop.bat, if we execute this command, the GCLog isn't corrupted anymore :
java -classpath "<KARAF_HOME>\lib\boot\org.apache.karaf.main-4.2.4.jar" -Dkaraf.home="<KARAF_HOME>" org.apache.karaf.main.Stop
Attachments
Issue Links
- duplicates
-
KARAF-5628 Corrupt gc.log due to unseparated VM settings
- Resolved
- is duplicated by
-
KARAF-5628 Corrupt gc.log due to unseparated VM settings
- Resolved