ShellController.exitStatus if more than a minute has elapsed since doLaunch, and still _pid == 0, return -2

      Also consider uncommenting ps.stdout(listener) under some conditions.

          [JENKINS-28400] Not timing out when launch pid fails to appear

          Tom FENNELLY created issue -
          Tom FENNELLY made changes -
          Summary Original: Not timing when launch pid fails to appear New: Not timing out when launch pid fails to appear
          Jesse Glick made changes -
          Labels New: workflow

          Oleg Nenashev added a comment - - edited

          We got into such issue in JENKINS-28821. The build may hang infinitely, because durable-task's callback may be unable able to write pidfile and other metadata from the docker run. In such case the server side will never get a termination event.

          Sample code:

          // The temporary variable is to ensure JENKINS_SERVER_COOKIE=durable-… does not appear even in argv[], lest it be confused with the environment.
                  String cmd = String.format("echo $$ > '%s'; jsc=%s; %s=$jsc '%s' > '%s' 2>&1; echo $? > '%s'",
                          c.pidFile(ws),
                          cookieValue,
                          cookieVariable,
                          shf,
                          c.getLogFile(ws),
                          c.getResultFile(ws)
                          )./* escape against EnvVars jobEnv in LocalLauncher.launch */replace("$", "$$");
          

          The script is error-prone. If it is not being launched, Durable task thinks the task thinks the task is running => we need an additional flag as a workaround

          Oleg Nenashev added a comment - - edited We got into such issue in JENKINS-28821 . The build may hang infinitely, because durable-task's callback may be unable able to write pidfile and other metadata from the docker run. In such case the server side will never get a termination event. Sample code: // The temporary variable is to ensure JENKINS_SERVER_COOKIE=durable-… does not appear even in argv[], lest it be confused with the environment. String cmd = String.format("echo $$ > '%s'; jsc=%s; %s=$jsc '%s' > '%s' 2>&1; echo $? > '%s'", c.pidFile(ws), cookieValue, cookieVariable, shf, c.getLogFile(ws), c.getResultFile(ws) )./* escape against EnvVars jobEnv in LocalLauncher.launch */replace("$", "$$"); The script is error-prone. If it is not being launched, Durable task thinks the task thinks the task is running => we need an additional flag as a workaround
          Oleg Nenashev made changes -
          Link New: This issue is related to JENKINS-28821 [ JENKINS-28821 ]
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-31769 [ JENKINS-31769 ]
          Jesse Glick made changes -
          Labels Original: workflow New: diagnostics workflow
          Jesse Glick made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Jesse Glick made changes -
          Remote Link New: This issue links to "PR 17 (Web Link)" [ 13905 ]
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-26105 [ JENKINS-26105 ]

            jglick Jesse Glick
            tfennelly Tom FENNELLY
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: