3 Replies Latest reply on Apr 22, 2017 6:42 PM by hchenkwi

    Wildfly crash when gc rotate log

    hchenkwi

      Hi there,

       

      I had a situation that I suspect Wildfly crash is related to GC log rotating.

       

      I'm using solaris 10, java 1.8, Wildfly 10.0.Final. And I set the GC options to be the following:

      JAVA_OPTS="$JAVA_OPTS -XX:-HeapDumpOnOutOfMemoryError -verbosegc -XX:+PrintGCDetails -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=30 -XX:GCLogFileSize=30M -XX:+PrintGCDateStamps -XX:-TraceClassUnloading -Xloggc:/mylocation/standalone/log/gc.log"

       

      for some reason, one day I saw the last line of gc log is like:

      2017-03-01 10:47:58 GC log file has reached the maximum size. Saved as /mylocation/standalone/log/gc.log.0

       

      and the gc.log.1 file seems created, but size is 0. the Wildfly server log also stopped at this timestamp. from server.log file, everything was running normal, no error, it is just suddenly ended at this timestamp when gc rotate file.  I couldn't tell if java process was running at that time because it was not recorded, but I felt the java process may just suddenly dead, otherwise the server.log file should not just suddenly ended.

       

      Wildfly has been running well for sometime, but I never paid attention if the gc log file ever rotated, so I cannot tell if this is the first time it got rotated.

       

      I never saw this situation before. Does anyone know any issues related to java 1.8, gc log rotating?

       

      Any suggestions are greatly appreciate.

       

      Thanks, Helen

        • 1. Re: Wildfly crash when gc rotate log
          hchenkwi

          I just tested again with gc rotating size to be 1M and let it run for a few days.

          Today it reached rotating size, the gc log file was renamed to be gc.log.0, and gc.log.1.current was created with size 0. then all the log files seems no activities any more. server.log file no change, gc.log.1.current no change,  I couldn't access Wildfly via port 8080 any more. Wildfly java process hung at that time. 

          I collected 3 jstack for wildfly java process with 1 minute interval, they are exactly the same, this means java process really hung.

           

          Does anyone have any suggestions?

           

          Thanks, Helen

          • 2. Re: Wildfly crash when gc rotate log
            ctomc

            Helen Chen wrote:

             

            Does anyone have any suggestions?

             

            Upgrade to Solaris 11

            upgrade to latest jdk8 build.

             

            problem looks related to your platform / jdk combination. Maybe even worth opening support case with Oracle...

            1 of 1 people found this helpful
            • 3. Re: Wildfly crash when gc rotate log
              hchenkwi

              upgraded java to latest version helps.