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

Remote Launcher randomly returns no data.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Hudson 1.378-1.383
    • Similar Issues:

      Description

      Since 1.378, the remoting functions of hudson have become unstable. When using a Launcher to execute commands remotely on a slave, sometimes it fails to return any data. The following stack trace is found in the hudson log when this occurs.

      Oct 15, 2010 10:12:17 AM hudson.remoting.ProxyOutputStream$Chunk$1 run
      WARNING: Failed to write to stream
      java.io.IOException: Pipe closed
              at java.io.PipedInputStream.checkStateForReceive(PipedInputStream.java:244)
              at java.io.PipedInputStream.receive(PipedInputStream.java:210)
              at java.io.PipedOutputStream.write(PipedOutputStream.java:132)
              at java.io.OutputStream.write(OutputStream.java:58)
              at hudson.util.DelegatingOutputStream.write(DelegatingOutputStream.java:51)
              at hudson.remoting.ProxyOutputStream$Chunk$1.run(ProxyOutputStream.java:185)
              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)
      

      This is currently causing issues with the perforce plugin (JENKINS-7664), and I've been able to reproduce it using the hudson_main_trunk#331 build on ci.hudson-labs.org as well.

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Kohsuke Kawaguchi
            Path:
            changelog.html
            core/src/main/java/hudson/Launcher.java
            core/src/main/java/hudson/Proc.java
            remoting/src/main/java/hudson/remoting/Channel.java
            test/src/test/java/hudson/ProcTest.java
            http://jenkins-ci.org/commit/core/3a3690b28135287ed78d6a966a5632a16277f05b
            Log:
            [FIXED JENKINS-7809] fixed a race condition in obtaining the tail of the output from remote process.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/src/main/java/hudson/Launcher.java core/src/main/java/hudson/Proc.java remoting/src/main/java/hudson/remoting/Channel.java test/src/test/java/hudson/ProcTest.java http://jenkins-ci.org/commit/core/3a3690b28135287ed78d6a966a5632a16277f05b Log: [FIXED JENKINS-7809] fixed a race condition in obtaining the tail of the output from remote process.
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #514
            [FIXED JENKINS-7809] fixed a race condition in obtaining the tail of the output from remote process.

            Kohsuke Kawaguchi :
            Files :

            • test/src/test/java/hudson/ProcTest.java
            • core/src/main/java/hudson/Proc.java
            • changelog.html
            • core/src/main/java/hudson/Launcher.java
            • remoting/src/main/java/hudson/remoting/Channel.java
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #514 [FIXED JENKINS-7809] fixed a race condition in obtaining the tail of the output from remote process. Kohsuke Kawaguchi : Files : test/src/test/java/hudson/ProcTest.java core/src/main/java/hudson/Proc.java changelog.html core/src/main/java/hudson/Launcher.java remoting/src/main/java/hudson/remoting/Channel.java
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Kohsuke Kawaguchi
            Path:
            changelog.html
            core/src/main/java/hudson/Launcher.java
            core/src/main/java/hudson/Proc.java
            core/src/main/java/hudson/os/windows/WindowsRemoteLauncher.java
            core/src/test/java/hudson/LauncherTest.java
            remoting/src/main/java/hudson/remoting/RemoteInputStream.java
            test/src/main/java/org/jvnet/hudson/test/FakeLauncher.java
            test/src/test/java/hudson/ProcTest.java
            http://jenkins-ci.org/commit/core/96dd84b5d0d37e1765c3615bcba048eb62e38ad6
            Log:
            [FIXED JENKINS-7809] expose child process stdout as InputStream.

            I added a mode where one can launch a child process without the built-in pumping support, making it trivial to read until EOF in the distributed environments.

            This concludes the fix.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/src/main/java/hudson/Launcher.java core/src/main/java/hudson/Proc.java core/src/main/java/hudson/os/windows/WindowsRemoteLauncher.java core/src/test/java/hudson/LauncherTest.java remoting/src/main/java/hudson/remoting/RemoteInputStream.java test/src/main/java/org/jvnet/hudson/test/FakeLauncher.java test/src/test/java/hudson/ProcTest.java http://jenkins-ci.org/commit/core/96dd84b5d0d37e1765c3615bcba048eb62e38ad6 Log: [FIXED JENKINS-7809] expose child process stdout as InputStream. I added a mode where one can launch a child process without the built-in pumping support, making it trivial to read until EOF in the distributed environments. This concludes the fix.
            Hide
            dogfood dogfood added a comment -
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #517
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Kohsuke Kawaguchi
            Path:
            test/src/main/java/org/jvnet/hudson/test/FakeLauncher.java
            http://jenkins-ci.org/commit/jenkins-test-harness/d4fe2dcee80c02264fa5b687f72e2ea0e8af3aeb
            Log:
            [FIXED JENKINS-7809] expose child process stdout as InputStream.

            I added a mode where one can launch a child process without the built-in pumping support, making it trivial to read until EOF in the distributed environments.

            This concludes the fix.

            Originally-Committed-As: 96dd84b5d0d37e1765c3615bcba048eb62e38ad6

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: test/src/main/java/org/jvnet/hudson/test/FakeLauncher.java http://jenkins-ci.org/commit/jenkins-test-harness/d4fe2dcee80c02264fa5b687f72e2ea0e8af3aeb Log: [FIXED JENKINS-7809] expose child process stdout as InputStream. I added a mode where one can launch a child process without the built-in pumping support, making it trivial to read until EOF in the distributed environments. This concludes the fix. Originally-Committed-As: 96dd84b5d0d37e1765c3615bcba048eb62e38ad6

              People

              • Assignee:
                kohsuke Kohsuke Kawaguchi
                Reporter:
                rpetti Rob Petti
              • Votes:
                37 Vote for this issue
                Watchers:
                39 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: