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

SCM Polling leads to zombie-like processes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: git-plugin
    • Labels:
      None
    • Environment:
      MACHTYPE x86_64-suse-linux
      os.version 2.6.37.6-0.11-default
      java.version 1.6.0_24
    • Similar Issues:

      Description

      Jenkins starts subprocesses which are not handled correctly, as some file handles are left open.

      in htop you can see in the tree view that there are subprocess running even if no job is running and no scm polling is active.
      these subprocesses consume memory and do not terminate by themselves

      after picking the processID and getting the start time of the process, i could see, that the open file handle stated by the plugin 'Open File Handles' belonged to the scm polling.

      ps -f 16734
      UID PID PPID C STIME TTY STAT TIME CMD
      tester 16734 399 0 16:55 ? S 0:00 /usr/lib64/jvm/java/bin/java -Djava.io.tmpdir=/archive/jenkins/tmp -Djava.awt.headless=true -Dhudson.model.Run.ArtifactList.listCutoff=40 -DJENKINS_HOME=/var/lib/jenkins -jar /usr/lib/jenkins/jenkins.war --javaHome=/usr/

      output Open File Handles:
      2 descriptors are open
      #1 /var/lib/jenkins/...
      #2 /var/lib/jenkins/jobs/.../scm-polling.log by thread:SCM polling for hudson.matrix.MatrixProject@1e88579c[...] on Tue Jun 19 16:55:02 CEST 2012
      at java.io.FileOutputStream.<init>(FileOutputStream.java:211)
      at java.io.FileOutputStream.<init>(FileOutputStream.java:160)
      at hudson.util.StreamTaskListener.<init>(StreamTaskListener.java:97)
      at hudson.util.StreamTaskListener.<init>(StreamTaskListener.java:90)
      at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:414)
      at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:449)
      at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:679)


        Attachments

          Activity

          Hide
          vladdrussian VladDRussian added a comment -

          This could also be related to the below issue opened a few days before this one. *.pack file still in use and fails clean. We've also hit the issue while on Jenkins 1.467 looking at changing to GIT plugin 1.1.19 - 1.1.22

          https://issues.jenkins-ci.org/browse/JENKINS-14046

          Show
          vladdrussian VladDRussian added a comment - This could also be related to the below issue opened a few days before this one. *.pack file still in use and fails clean. We've also hit the issue while on Jenkins 1.467 looking at changing to GIT plugin 1.1.19 - 1.1.22 https://issues.jenkins-ci.org/browse/JENKINS-14046
          Hide
          ndeloof Nicolas De Loof added a comment -

          added a timeout to git command execution to avoid hung process

          Show
          ndeloof Nicolas De Loof added a comment - added a timeout to git command execution to avoid hung process

            People

            Assignee:
            ndeloof Nicolas De Loof
            Reporter:
            stefan_rohleder Stefan Rohleder
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: