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

NotSerializableException using Phing plugin with slaves

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Some folks here at Yahoo! have used the Phing plugin in the past and ran into trouble trying to use it in a master/slave configuration. Here is the exception they were getting (this stack trace is from over a year ago):

      java.io.IOException: Unable to serialize hudson.plugins.phing.PhingInstallation$1@1cb3087
      at hudson.remoting.UserRequest.serialize(UserRequest.java:126)
      at hudson.remoting.UserRequest.<init>(UserRequest.java:60)
      at hudson.remoting.Channel.call(Channel.java:475)
      at hudson.plugins.phing.PhingInstallation.getExecutable(PhingInstallation.java:72)
      at hudson.plugins.phing.PhingBuilder.perform(PhingBuilder.java:120)
      at hudson.model.Build$RunnerImpl.build(Build.java:193)
      at hudson.model.Build$RunnerImpl.doRun(Build.java:144)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:272)
      at hudson.model.Run.run(Run.java:865)
      at hudson.model.Build.run(Build.java:112)
      at hudson.model.ResourceController.execute(ResourceController.java:93)
      at hudson.model.Executor.run(Executor.java:113)
      Caused by: java.io.NotSerializableException: hudson.Launcher$RemoteLauncher
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
      at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
      at hudson.remoting.UserRequest.serialize(UserRequest.java:123)
      ... 11 more

      I've attached a patch that fixes this by determining the executable name on the master before starting the remote call and removing the launcher from the callable state.

        Attachments

          Activity

          mdillon mdillon created issue -
          mdillon mdillon made changes -
          Field Original Value New Value
          Description Some folks here at Yahoo! have used the Phing plugin in the past and ran into trouble trying to use it in a master/slave configuration. Here is the exception they were getting (this stack trace is from over a year ago):

          java.io.IOException: Unable to serialize hudson.plugins.phing.PhingInstallation$1@1cb3087
                  at hudson.remoting.UserRequest.serialize(UserRequest.java:126)
                  at hudson.remoting.UserRequest.<init>(UserRequest.java:60)
                  at hudson.remoting.Channel.call(Channel.java:475)
                  at hudson.plugins.phing.PhingInstallation.getExecutable(PhingInstallation.java:72)
                  at hudson.plugins.phing.PhingBuilder.perform(PhingBuilder.java:120)
                  at hudson.model.Build$RunnerImpl.build(Build.java:193)
                  at hudson.model.Build$RunnerImpl.doRun(Build.java:144)
                  at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:272)
                  at hudson.model.Run.run(Run.java:865)
                  at hudson.model.Build.run(Build.java:112)
                  at hudson.model.ResourceController.execute(ResourceController.java:93)
                  at hudson.model.Executor.run(Executor.java:113)
          Caused by: java.io.NotSerializableException: hudson.Launcher$RemoteLauncher
                  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
                  at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
                  at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
                  at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
                  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
                  at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
                  at hudson.remoting.UserRequest.serialize(UserRequest.java:123)
                  ... 11 more

          I've attached a patch that fixes this by determining the executable name on the master before starting the remote call and removing the launcher from the callable state.
          Some folks here at Yahoo! have used the Phing plugin in the past and ran into trouble trying to use it in a master/slave configuration. Here is the exception they were getting (this stack trace is from over a year ago):

          {quote}
          java.io.IOException: Unable to serialize hudson.plugins.phing.PhingInstallation$1@1cb3087
                  at hudson.remoting.UserRequest.serialize(UserRequest.java:126)
                  at hudson.remoting.UserRequest.<init>(UserRequest.java:60)
                  at hudson.remoting.Channel.call(Channel.java:475)
                  at hudson.plugins.phing.PhingInstallation.getExecutable(PhingInstallation.java:72)
                  at hudson.plugins.phing.PhingBuilder.perform(PhingBuilder.java:120)
                  at hudson.model.Build$RunnerImpl.build(Build.java:193)
                  at hudson.model.Build$RunnerImpl.doRun(Build.java:144)
                  at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:272)
                  at hudson.model.Run.run(Run.java:865)
                  at hudson.model.Build.run(Build.java:112)
                  at hudson.model.ResourceController.execute(ResourceController.java:93)
                  at hudson.model.Executor.run(Executor.java:113)
          Caused by: java.io.NotSerializableException: hudson.Launcher$RemoteLauncher
                  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
                  at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
                  at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
                  at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
                  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
                  at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
                  at hudson.remoting.UserRequest.serialize(UserRequest.java:123)
                  ... 11 more
          {quote}

          I've attached a patch that fixes this by determining the executable name on the master before starting the remote call and removing the launcher from the callable state.
          sogabe sogabe made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          sogabe sogabe made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          rtyler R. Tyler Croy made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          rtyler R. Tyler Croy made changes -
          Reporter mdillon [ mdillon ] Mike Dillon [ md5 ]
          rtyler R. Tyler Croy made changes -
          Status Reopened [ 4 ] Closed [ 6 ]
          Resolution Done [ 10000 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 136710 ] JNJira + In-Review [ 204182 ]

            People

            • Assignee:
              sogabe sogabe
              Reporter:
              md5 Mike Dillon
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: