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

Poll SCM fails with java.lang.AbstractMethodError

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • core
    • None
    • Hudson 1.347, Mercurial plugin 1.25, Tomcat 6.0.20, Linux 2.6.18

      Since we upgraded to Hudson 1.347 and the Mercurial plugin 1.25 the SCM polling stops working once a day and we have to restart Tomcat. These are the symptoms:

      • The "Last Mercurial Polling Log" of any job shows an empty output, without any "hg incoming" command as usual:
        Last Mercurial Polling Log
        
        Started on Feb 25, 2010 6:21:24 AM
        
      • The Tomcat catalina.out log shows the following error all the time:
        Feb 25, 2010 7:57:24 AM hudson.triggers.SCMTrigger$Runner runPolling
        SEVERE: Failed to record SCM polling
        java.lang.AbstractMethodError
        	at hudson.scm.SCM.poll(SCM.java:344)
        	at hudson.model.AbstractProject.poll(AbstractProject.java:1137)
        	at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:319)
        	at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:346)
        	at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118)
        	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        	at java.lang.Thread.run(Thread.java:619)
        

      Thanks.

          [JENKINS-5756] Poll SCM fails with java.lang.AbstractMethodError

          Jesse Glick added a comment -

          Any ETA on 1.350 appearing?

          Jesse Glick added a comment - Any ETA on 1.350 appearing?

          Jesse Glick added a comment -

          A safer fix might be to avoid catching AME to begin with by using Class.getDeclaredMethod to check whether the implementor defines a given method or not. Cleaner still would have been to not introduce new abstract methods into existing classes, but rather to define SCM2 extends SCM with the new methods (which would also permit old SCM impls to continue to compile against a newer hudson-core.jar).

          Jesse Glick added a comment - A safer fix might be to avoid catching AME to begin with by using Class.getDeclaredMethod to check whether the implementor defines a given method or not. Cleaner still would have been to not introduce new abstract methods into existing classes, but rather to define SCM2 extends SCM with the new methods (which would also permit old SCM impls to continue to compile against a newer hudson-core.jar).

          Code changed in hudson
          User: : abayer
          Path:
          trunk/hudson/main/core/src/main/java/hudson/scm/SCM.java
          http://jenkins-ci.org/commit/28470
          Log:
          [JENKINS-5827, JENKINS-5756] This approach fixes both bugs in one fell swoop

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : abayer Path: trunk/hudson/main/core/src/main/java/hudson/scm/SCM.java http://jenkins-ci.org/commit/28470 Log: [JENKINS-5827, JENKINS-5756] This approach fixes both bugs in one fell swoop

          Code changed in hudson
          User: : abayer
          Path:
          trunk/hudson/main/core/src/main/java/hudson/scm/SCM.java
          http://jenkins-ci.org/commit/28471
          Log:
          [JENKINS-5827, JENKINS-5756] Whoops - missed something I had intended.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : abayer Path: trunk/hudson/main/core/src/main/java/hudson/scm/SCM.java http://jenkins-ci.org/commit/28471 Log: [JENKINS-5827, JENKINS-5756] Whoops - missed something I had intended.

          Code changed in hudson
          User: : kohsuke
          Path:
          trunk/hudson/main/core/src/main/java/hudson/scm/SCM.java
          http://jenkins-ci.org/commit/28474
          Log:
          Resurrecting the original fix for JENKINS-5756, as I'm still worried that bugparade 6933067 is related to some sort of the HotSpot optimization.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : kohsuke Path: trunk/hudson/main/core/src/main/java/hudson/scm/SCM.java http://jenkins-ci.org/commit/28474 Log: Resurrecting the original fix for JENKINS-5756 , as I'm still worried that bugparade 6933067 is related to some sort of the HotSpot optimization.

          Code changed in hudson
          User: : kohsuke
          Path:
          branches/rc/core/src/main/java/hudson/model/AbstractProject.java
          branches/rc/core/src/main/java/hudson/scm/SCM.java
          http://jenkins-ci.org/commit/28499
          Log:
          Do the same protection to _calcRevisionsFromBuild to avoid JENKINS-5756

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : kohsuke Path: branches/rc/core/src/main/java/hudson/model/AbstractProject.java branches/rc/core/src/main/java/hudson/scm/SCM.java http://jenkins-ci.org/commit/28499 Log: Do the same protection to _calcRevisionsFromBuild to avoid JENKINS-5756

          Jesse Glick added a comment -

          Cannot reproduce using your test program in 5u22, 6u37, or 7u9 on Linux—nor in 6u18, your originally reported platform. So are these workarounds still needed?

          Jesse Glick added a comment - Cannot reproduce using your test program in 5u22, 6u37, or 7u9 on Linux—nor in 6u18, your originally reported platform. So are these workarounds still needed?

          Code changed in jenkins
          User: Jesse Glick
          Path:
          core/src/main/java/hudson/ClassicPluginStrategy.java
          core/src/main/java/hudson/ExtensionFinder.java
          core/src/main/java/hudson/FilePath.java
          core/src/main/java/hudson/model/AbstractItem.java
          core/src/main/java/hudson/model/AbstractProject.java
          core/src/main/java/hudson/model/View.java
          core/src/main/java/hudson/model/queue/Executables.java
          core/src/main/java/hudson/model/queue/Tasks.java
          core/src/main/java/hudson/scm/SCM.java
          http://jenkins-ci.org/commit/jenkins/253943e13ef16a9e14b71ef07a30e51e6a66e38f
          Log:
          JENKINS-5756 Removing workarounds for HotSpot bug.
          https://bugs.openjdk.java.net/browse/JDK-6933067 claims to be fixed as of Java 6, our baseline.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/ClassicPluginStrategy.java core/src/main/java/hudson/ExtensionFinder.java core/src/main/java/hudson/FilePath.java core/src/main/java/hudson/model/AbstractItem.java core/src/main/java/hudson/model/AbstractProject.java core/src/main/java/hudson/model/View.java core/src/main/java/hudson/model/queue/Executables.java core/src/main/java/hudson/model/queue/Tasks.java core/src/main/java/hudson/scm/SCM.java http://jenkins-ci.org/commit/jenkins/253943e13ef16a9e14b71ef07a30e51e6a66e38f Log: JENKINS-5756 Removing workarounds for HotSpot bug. https://bugs.openjdk.java.net/browse/JDK-6933067 claims to be fixed as of Java 6, our baseline.

          dogfood added a comment -

          Integrated in jenkins_main_trunk #3703
          JENKINS-5756 Removing workarounds for HotSpot bug. (Revision 253943e13ef16a9e14b71ef07a30e51e6a66e38f)

          Result = SUCCESS
          Jesse Glick : 253943e13ef16a9e14b71ef07a30e51e6a66e38f
          Files :

          • core/src/main/java/hudson/model/View.java
          • core/src/main/java/hudson/model/AbstractProject.java
          • core/src/main/java/hudson/model/queue/Executables.java
          • core/src/main/java/hudson/FilePath.java
          • core/src/main/java/hudson/scm/SCM.java
          • core/src/main/java/hudson/ExtensionFinder.java
          • core/src/main/java/hudson/model/queue/Tasks.java
          • core/src/main/java/hudson/model/AbstractItem.java
          • core/src/main/java/hudson/ClassicPluginStrategy.java

          dogfood added a comment - Integrated in jenkins_main_trunk #3703 JENKINS-5756 Removing workarounds for HotSpot bug. (Revision 253943e13ef16a9e14b71ef07a30e51e6a66e38f) Result = SUCCESS Jesse Glick : 253943e13ef16a9e14b71ef07a30e51e6a66e38f Files : core/src/main/java/hudson/model/View.java core/src/main/java/hudson/model/AbstractProject.java core/src/main/java/hudson/model/queue/Executables.java core/src/main/java/hudson/FilePath.java core/src/main/java/hudson/scm/SCM.java core/src/main/java/hudson/ExtensionFinder.java core/src/main/java/hudson/model/queue/Tasks.java core/src/main/java/hudson/model/AbstractItem.java core/src/main/java/hudson/ClassicPluginStrategy.java

          Code changed in jenkins
          User: Oliver Gondža
          Path:
          core/src/main/java/hudson/ClassicPluginStrategy.java
          core/src/main/java/hudson/ExtensionFinder.java
          core/src/main/java/hudson/model/AbstractItem.java
          core/src/main/java/hudson/model/AbstractProject.java
          core/src/main/java/hudson/model/View.java
          core/src/main/java/hudson/model/queue/Executables.java
          core/src/main/java/hudson/model/queue/Tasks.java
          core/src/main/java/hudson/scm/SCM.java
          http://jenkins-ci.org/commit/jenkins/04880780d72bb6e03bd9b788d3019661ac462bfe
          Log:
          JENKINS-5756 Removing workarounds for HotSpot bug.
          https://bugs.openjdk.java.net/browse/JDK-6933067 claims to be fixed as of Java 6, our baseline.
          (cherry picked from commit 253943e13ef16a9e14b71ef07a30e51e6a66e38f)

          Conflicts:
          core/src/main/java/hudson/FilePath.java

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oliver Gondža Path: core/src/main/java/hudson/ClassicPluginStrategy.java core/src/main/java/hudson/ExtensionFinder.java core/src/main/java/hudson/model/AbstractItem.java core/src/main/java/hudson/model/AbstractProject.java core/src/main/java/hudson/model/View.java core/src/main/java/hudson/model/queue/Executables.java core/src/main/java/hudson/model/queue/Tasks.java core/src/main/java/hudson/scm/SCM.java http://jenkins-ci.org/commit/jenkins/04880780d72bb6e03bd9b788d3019661ac462bfe Log: JENKINS-5756 Removing workarounds for HotSpot bug. https://bugs.openjdk.java.net/browse/JDK-6933067 claims to be fixed as of Java 6, our baseline. (cherry picked from commit 253943e13ef16a9e14b71ef07a30e51e6a66e38f) Conflicts: core/src/main/java/hudson/FilePath.java

            kohsuke Kohsuke Kawaguchi
            jpabloae jpabloae
            Votes:
            6 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: