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

ProcessLiveness.workingLaunchers heuristic is flaky

      After running the docker-workflow demo recently, I saw numerous warnings:

      ... org.jenkinsci.plugins.durabletask.ProcessLiveness isAlive
      WARNING: hudson.Launcher$LocalLauncher@... on hudson.remoting.LocalChannel@... does not seem able to determine whether processes are alive or not
      

      I suspect that I had simply gotten to the point of having launched >10k processes in my current OS session, and so _isAlive(..., 9999, ...) correctly returned true.

      On the one hand this fake PID seems much too low; on the other I am not sure how high a valid pid_t might be. And turning off workingLaunchers entirely would mean either always trusting Liveness on nondecorated launchers—which could cause big problems if libc is not loadable properly—or never trusting it—which means a dead controller process (incl. reboot) will not be detected.

      Or we could always use the ps trick, even on supposedly local launchers. This means checking extra carefully that the command is POSIX-compliant.

          [JENKINS-42166] ProcessLiveness.workingLaunchers heuristic is flaky

          Jesse Glick created issue -
          Jesse Glick made changes -
          Link New: This issue relates to JENKINS-25053 [ JENKINS-25053 ]
          Carlos Sanchez made changes -
          Link New: This issue is related to JENKINS-43881 [ JENKINS-43881 ]
          Jesse Glick made changes -
          Link New: This issue relates to JENKINS-40101 [ JENKINS-40101 ]
          Kevin Phillips made changes -
          Link New: This issue relates to JENKINS-46969 [ JENKINS-46969 ]
          tony Proum made changes -
          Link New: This issue is related to JENKINS-46404 [ JENKINS-46404 ]
          Jesse Glick made changes -
          Link New: This issue duplicates JENKINS-47791 [ JENKINS-47791 ]
          Jesse Glick made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

            Unassigned Unassigned
            jglick Jesse Glick
            Votes:
            7 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: