Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-27669

Creating an empty logger crashs Jenkins

    XMLWordPrintable

Details

    Description

      With support bundle plugin installed, when I create a new logger and let the logger classname field empty, Jenkins crashes when I click Save button.

      On save, Jenkins starts to write tons of exception logs and is not responsible anymore. Killing the JVM is the only way to stop it doing this.

      Logged exception looks like this one:

      Exception in thread "RequestHandlerThread[#10]" java.lang.ClassCircularityError: hudson/logging/LogRecorder
      	at com.cloudbees.jenkins.support.impl.JenkinsLogs$CustomHandler.publish(JenkinsLogs.java:507)
      	at java.util.logging.Logger.log(Logger.java:616)
      	at java.util.logging.Logger.doLog(Logger.java:641)
      	at java.util.logging.Logger.log(Logger.java:730)
      	at org.eclipse.jetty.util.log.JavaUtilLog.warn(JavaUtilLog.java:70)
      	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:698)
      	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
      	at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:745)
      

      On 1.580, faulty configuration is saved on disk. To restart the instance, faulty configuration file $JENKINS_HOME/log/<faulty>.xml must be removed.

      On 1.606, configuration is not saved, so restarting the instance works.

      Attachments

        Issue Links

          Activity

            jglick Jesse Glick added a comment -

            Reproduced in an acceptance test, but fixing is tedious. I do not know of a robust trick for preloading all classes that might be needed for a function, without actually running it.

            In some sense the fault is in Jetty: ClassLoader implementations must be extremely conservative about calling into foreign code, and in particular they should not make any (synchronous) logging calls.

            jglick Jesse Glick added a comment - Reproduced in an acceptance test, but fixing is tedious. I do not know of a robust trick for preloading all classes that might be needed for a function, without actually running it. In some sense the fault is in Jetty: ClassLoader implementations must be extremely conservative about calling into foreign code, and in particular they should not make any (synchronous) logging calls.

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/com/cloudbees/jenkins/support/impl/JenkinsLogs.java
            http://jenkins-ci.org/commit/support-core-plugin/43f0f84f2eee04623e464e9761c46915af6fd2bb
            Log:
            [FIXED JENKINS-27669] Force classes used by CustomHandler.publish to be loaded before we actually receive any log records.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/com/cloudbees/jenkins/support/impl/JenkinsLogs.java http://jenkins-ci.org/commit/support-core-plugin/43f0f84f2eee04623e464e9761c46915af6fd2bb Log: [FIXED JENKINS-27669] Force classes used by CustomHandler.publish to be loaded before we actually receive any log records.

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/com/cloudbees/jenkins/support/impl/JenkinsLogs.java
            http://jenkins-ci.org/commit/support-core-plugin/62ee0fdfa3325f121858644d6837312d2935cf57
            Log:
            Merge pull request #31 from jglick/ClassCircularityError-JENKINS-27669

            JENKINS-27669 Prevent ClassCircularityError

            Compare: https://github.com/jenkinsci/support-core-plugin/compare/db3e7f4e42ef...62ee0fdfa332

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/com/cloudbees/jenkins/support/impl/JenkinsLogs.java http://jenkins-ci.org/commit/support-core-plugin/62ee0fdfa3325f121858644d6837312d2935cf57 Log: Merge pull request #31 from jglick/ClassCircularityError- JENKINS-27669 JENKINS-27669 Prevent ClassCircularityError Compare: https://github.com/jenkinsci/support-core-plugin/compare/db3e7f4e42ef...62ee0fdfa332

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/test/java/plugins/SupportCorePluginTest.java
            http://jenkins-ci.org/commit/acceptance-test-harness/64c367031d50a70afcd9ea37c17a5de164f827c8
            Log:
            JENKINS-27669 Demonstrate ClassCircularityError before fix.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/test/java/plugins/SupportCorePluginTest.java http://jenkins-ci.org/commit/acceptance-test-harness/64c367031d50a70afcd9ea37c17a5de164f827c8 Log: JENKINS-27669 Demonstrate ClassCircularityError before fix.

            Code changed in jenkins
            User: Oliver Gondža
            Path:
            src/test/java/plugins/SupportCorePluginTest.java
            http://jenkins-ci.org/commit/acceptance-test-harness/6f66161fbde34a33942b83ce642b5d7f747a4203
            Log:
            Merge pull request #24 from jglick/ClassCircularityError-JENKINS-27669

            JENKINS-27669 Demonstrate ClassCircularityError before fix

            Compare: https://github.com/jenkinsci/acceptance-test-harness/compare/2920150fe326...6f66161fbde3

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oliver Gondža Path: src/test/java/plugins/SupportCorePluginTest.java http://jenkins-ci.org/commit/acceptance-test-harness/6f66161fbde34a33942b83ce642b5d7f747a4203 Log: Merge pull request #24 from jglick/ClassCircularityError- JENKINS-27669 JENKINS-27669 Demonstrate ClassCircularityError before fix Compare: https://github.com/jenkinsci/acceptance-test-harness/compare/2920150fe326...6f66161fbde3

            People

              jglick Jesse Glick
              ydubreuil Yoann Dubreuil
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: