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

FilePath.read() triggers remote issues if the file is not read until EOF (Pipe is already closed)

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • core
    • None

      If a stream is open remotely using FilePath.read() and the file is not read to the very end, the log will be spammed with exceptions like:

      Jan 10, 2011 1:36:51 PM hudson.remoting.ProxyOutputStream$Chunk$1 run
        WARNING: Failed to write to stream
         java.io.IOException: Pipe is already closed
         at hudson.remoting.FastPipedOutputStream.write(FastPipedOutputStream.java:147)
         at hudson.remoting.FastPipedOutputStream.write(FastPipedOutputStream.java:131)
         at hudson.remoting.ProxyOutputStream$Chunk$1.run(ProxyOutputStream.java:185) 
      

      ...and finally disconnect the slave. Several plug-ins are affected by this bug, for instance the Emma-plug-in. Marked as critical since it yet another remote issue and keeps us from upgrade. It is also easy to reproduce.

      To reproduce, just create a publisher plug-in with a perform() that looks like this:

        @Override
        public boolean perform(AbstractBuild build, Launcher launcher, BuildListener listener) throws IOException {
            InputStream in = build.getWorkspace().child("large_file_in_workspace").read();
            // Just read one byte
            System.out.println(in.read());
            // Close it and watch the hudson log grow and slave (most often) disconnect.
            in.close();
            return true;
        } 
      

      Test the plug-in with Hudson 1.390+. Make sure the new publisher plug-in is used in a project running on a slave (and also make sure that the "large_file_in_workspace"-file exists in the remote workspace).

          [JENKINS-8592] FilePath.read() triggers remote issues if the file is not read until EOF (Pipe is already closed)

          GLundh created issue -
          glundh made changes -
          Description Original: If a stream is open remotely using FilePath.read() and the file is not read to the very end, the log will be spammed with exceptions like:

          Jan 10, 2011 1:36:51 PM hudson.remoting.ProxyOutputStream$Chunk$1 run
            WARNING: Failed to write to stream
             java.io.IOException: Pipe is already closed
             at hudson.remoting.FastPipedOutputStream.write(FastPipedOutputStream.java:147)
             at hudson.remoting.FastPipedOutputStream.write(FastPipedOutputStream.java:131)
             at hudson.remoting.ProxyOutputStream$Chunk$1.run(ProxyOutputStream.java:185)

          ...and finally disconnect the slave. Several plug-ins are affected by this bug, for instance the Emma-plug-in. Marked as critical since it yet another remote issue and keeps us from upgrade. It is also easy to reproduce.

          To reproduce, just create a publisher plug-in with a perform() that looks like this:

          @Override
          public boolean perform(AbstractBuild build, Launcher launcher, BuildListener listener) throws IOException {
              InputStream in = build.getWorkspace().child("large_file_in_workspace").read();
              // Just read one byte
              System.out.println(in.read());
              // Close it and watch the hudson log grow and slave (most often) disconnect.
              in.close();
              return true;
          }

          Test the plug-in with Hudson 1.390+. Make sure the new publisher plug-in is used in a project running on a slave (and also make sure that the "large_file_in_workspace"-file exists in the remote workspace).
          New: If a stream is open remotely using FilePath.read() and the file is not read to the very end, the log will be spammed with exceptions like:

          Jan 10, 2011 1:36:51 PM hudson.remoting.ProxyOutputStream$Chunk$1 run
            WARNING: Failed to write to stream
             java.io.IOException: Pipe is already closed
             at hudson.remoting.FastPipedOutputStream.write(FastPipedOutputStream.java:147)
             at hudson.remoting.FastPipedOutputStream.write(FastPipedOutputStream.java:131)
             at hudson.remoting.ProxyOutputStream$Chunk$1.run(ProxyOutputStream.java:185)

          ...and finally disconnect the slave. Several plug-ins are affected by this bug, for instance the Emma-plug-in. Marked as critical since it yet another remote issue and keeps us from upgrade. It is also easy to reproduce.

          To reproduce, just create a publisher plug-in with a perform() that looks like this:

            @Override
            public boolean perform(AbstractBuild build, Launcher launcher, BuildListener listener) throws IOException {
                InputStream in = build.getWorkspace().child("large_file_in_workspace").read();
                // Just read one byte
                System.out.println(in.read());
                // Close it and watch the hudson log grow and slave (most often) disconnect.
                in.close();
                return true;
            }

          Test the plug-in with Hudson 1.390+. Make sure the new publisher plug-in is used in a project running on a slave (and also make sure that the "large_file_in_workspace"-file exists in the remote workspace).
          glundh made changes -
          Description Original: If a stream is open remotely using FilePath.read() and the file is not read to the very end, the log will be spammed with exceptions like:

          Jan 10, 2011 1:36:51 PM hudson.remoting.ProxyOutputStream$Chunk$1 run
            WARNING: Failed to write to stream
             java.io.IOException: Pipe is already closed
             at hudson.remoting.FastPipedOutputStream.write(FastPipedOutputStream.java:147)
             at hudson.remoting.FastPipedOutputStream.write(FastPipedOutputStream.java:131)
             at hudson.remoting.ProxyOutputStream$Chunk$1.run(ProxyOutputStream.java:185)

          ...and finally disconnect the slave. Several plug-ins are affected by this bug, for instance the Emma-plug-in. Marked as critical since it yet another remote issue and keeps us from upgrade. It is also easy to reproduce.

          To reproduce, just create a publisher plug-in with a perform() that looks like this:

            @Override
            public boolean perform(AbstractBuild build, Launcher launcher, BuildListener listener) throws IOException {
                InputStream in = build.getWorkspace().child("large_file_in_workspace").read();
                // Just read one byte
                System.out.println(in.read());
                // Close it and watch the hudson log grow and slave (most often) disconnect.
                in.close();
                return true;
            }

          Test the plug-in with Hudson 1.390+. Make sure the new publisher plug-in is used in a project running on a slave (and also make sure that the "large_file_in_workspace"-file exists in the remote workspace).
          New: If a stream is open remotely using FilePath.read() and the file is not read to the very end, the log will be spammed with exceptions like:

          {{
            Jan 10, 2011 1:36:51 PM hudson.remoting.ProxyOutputStream$Chunk$1 run
            WARNING: Failed to write to stream
             java.io.IOException: Pipe is already closed
             at hudson.remoting.FastPipedOutputStream.write(FastPipedOutputStream.java:147)
             at hudson.remoting.FastPipedOutputStream.write(FastPipedOutputStream.java:131)
             at hudson.remoting.ProxyOutputStream$Chunk$1.run(ProxyOutputStream.java:185)
          }}
          ...and finally disconnect the slave. Several plug-ins are affected by this bug, for instance the Emma-plug-in. Marked as critical since it yet another remote issue and keeps us from upgrade. It is also easy to reproduce.

          To reproduce, just create a publisher plug-in with a perform() that looks like this:
          {{
            @Override
            public boolean perform(AbstractBuild build, Launcher launcher, BuildListener listener) throws IOException {
                InputStream in = build.getWorkspace().child("large_file_in_workspace").read();
                // Just read one byte
                System.out.println(in.read());
                // Close it and watch the hudson log grow and slave (most often) disconnect.
                in.close();
                return true;
            }
          }}
          Test the plug-in with Hudson 1.390+. Make sure the new publisher plug-in is used in a project running on a slave (and also make sure that the "large_file_in_workspace"-file exists in the remote workspace).
          glundh made changes -
          Description Original: If a stream is open remotely using FilePath.read() and the file is not read to the very end, the log will be spammed with exceptions like:

          {{
            Jan 10, 2011 1:36:51 PM hudson.remoting.ProxyOutputStream$Chunk$1 run
            WARNING: Failed to write to stream
             java.io.IOException: Pipe is already closed
             at hudson.remoting.FastPipedOutputStream.write(FastPipedOutputStream.java:147)
             at hudson.remoting.FastPipedOutputStream.write(FastPipedOutputStream.java:131)
             at hudson.remoting.ProxyOutputStream$Chunk$1.run(ProxyOutputStream.java:185)
          }}
          ...and finally disconnect the slave. Several plug-ins are affected by this bug, for instance the Emma-plug-in. Marked as critical since it yet another remote issue and keeps us from upgrade. It is also easy to reproduce.

          To reproduce, just create a publisher plug-in with a perform() that looks like this:
          {{
            @Override
            public boolean perform(AbstractBuild build, Launcher launcher, BuildListener listener) throws IOException {
                InputStream in = build.getWorkspace().child("large_file_in_workspace").read();
                // Just read one byte
                System.out.println(in.read());
                // Close it and watch the hudson log grow and slave (most often) disconnect.
                in.close();
                return true;
            }
          }}
          Test the plug-in with Hudson 1.390+. Make sure the new publisher plug-in is used in a project running on a slave (and also make sure that the "large_file_in_workspace"-file exists in the remote workspace).
          New: If a stream is open remotely using FilePath.read() and the file is not read to the very end, the log will be spammed with exceptions like:

          {noformat}Jan 10, 2011 1:36:51 PM hudson.remoting.ProxyOutputStream$Chunk$1 run
            WARNING: Failed to write to stream
             java.io.IOException: Pipe is already closed
             at hudson.remoting.FastPipedOutputStream.write(FastPipedOutputStream.java:147)
             at hudson.remoting.FastPipedOutputStream.write(FastPipedOutputStream.java:131)
             at hudson.remoting.ProxyOutputStream$Chunk$1.run(ProxyOutputStream.java:185)
          {noformat}

          ...and finally disconnect the slave. Several plug-ins are affected by this bug, for instance the Emma-plug-in. Marked as critical since it yet another remote issue and keeps us from upgrade. It is also easy to reproduce.

          To reproduce, just create a publisher plug-in with a perform() that looks like this:
          {noformat} @Override
            public boolean perform(AbstractBuild build, Launcher launcher, BuildListener listener) throws IOException {
                InputStream in = build.getWorkspace().child("large_file_in_workspace").read();
                // Just read one byte
                System.out.println(in.read());
                // Close it and watch the hudson log grow and slave (most often) disconnect.
                in.close();
                return true;
            }
          {noformat}
          Test the plug-in with Hudson 1.390+. Make sure the new publisher plug-in is used in a project running on a slave (and also make sure that the "large_file_in_workspace"-file exists in the remote workspace).
          nairb774 made changes -
          Assignee New: nairb774 [ nairb774 ]
          nairb774 made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          glundh made changes -
          Resolution Original: Fixed [ 1 ]
          Status Original: Resolved [ 5 ] New: Reopened [ 4 ]
          kutzi made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Reopened [ 4 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 138703 ] New: JNJira + In-Review [ 188116 ]

            nairb774 nairb774
            GLundh GLundh
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: