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

Perforce plugin hangs executor if username does not match email address


    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • p4-plugin
    • None
    • Hudson 1.328
      Perforce plugin 1.0.16
      Extended Email (email-ext) plugin 2.2.1
      Perforce server 2007.2

      The new Perforce plugin can cause jobs to hang when trying to get the email address of a user whose Perforce username does not match the part of the email address before the @-sign. Given this user:

      $ p4 user -o bobby
      # A Perforce User Specification.
      #  User:        The user's user name.
      #  Email:       The user's email address; for email review.
      #  Update:      The date this specification was last modified.
      #  Access:      The date this user was last active.  Read only.
      #  FullName:    The user's real name.
      #  JobView:     Selects jobs for inclusion during changelist creation.
      #  Password:    If set, user must have matching $P4PASSWD on client.
      #  Reviews:     Listing of depot files to be reviewed by user.
      User:   bobby
      Email:  bobsmith@example.com
      Update: 2009/10/27 13:23:04
      Access: 2010/01/27 09:36:35
      FullName:       Bobby Smith
      Password:       ******

      the following log entries and exception appear in the Tomcat logfiles:

      [install-server-main-L8-cluster-SPLUS-manager-2] $ p4 user -o bobby
      58973079 [Executor #1 for master : executing validate-server-main-L8-cluster-SPLUS #11] WARN perforce - Perforce process terminated suddenly
      58973080 [Executor #1 for master : executing validate-server-main-L8-cluster-SPLUS #11] WARN perforce - java.io.InterruptedIOException
              at java.io.PipedInputStream.read(Unknown Source)
              at java.io.PipedInputStream.read(Unknown Source)
              at sun.nio.cs.StreamDecoder.readBytes(Unknown Source)
              at sun.nio.cs.StreamDecoder.implRead(Unknown Source)
              at sun.nio.cs.StreamDecoder.read(Unknown Source)
              at java.io.InputStreamReader.read(Unknown Source)
              at java.io.BufferedReader.fill(Unknown Source)
              at java.io.BufferedReader.readLine(Unknown Source)
              at java.io.BufferedReader.readLine(Unknown Source)
              at com.tek42.perforce.parse.AbstractPerforceTemplate.getPerforceResponse(AbstractPerforceTemplate.java:278)
              at com.tek42.perforce.parse.Users.getUser(Users.java:52)
              at hudson.plugins.perforce.PerforceMailResolver.findMailAddressFor(PerforceMailResolver.java:32)
              at hudson.tasks.MailAddressResolver.resolve(MailAddressResolver.java:86)
              at hudson.tasks.Mailer$UserProperty.getAddress(Mailer.java:476)
              at hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:303)
              at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:249)
              at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:241)
              at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:199)
              at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
              at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:501)
              at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:487)
              at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:475)
              at hudson.model.Build$RunnerImpl.cleanUp(Build.java:187)
              at hudson.model.Run.run(Run.java:1162)
              at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
              at hudson.model.ResourceController.execute(ResourceController.java:88)
              at hudson.model.Executor.run(Executor.java:123)
      Could not get email address from Perforce: No output for: p4 user -o bobby

      Meanwhile, the console log is stuck at:

      Started by upstream project "install-server-main-L8-cluster-SPLUS-worker-1" build number 13
      Building on master
      Using master perforce client: validate-server
      [workspace] $ p4 workspace -o validate-server
      Changing P4 Client Root to: /opt/hudson/hudson/jobs/validate-server-main-L8-cluster-SPLUS/workspace/
      Saving modified client validate-server
      [workspace] $ p4 -s client -i
      Last sync'd change: 306721
      [workspace] $ p4 counter change
      [workspace] $ p4 -s changes //validate-server/...@306722,@306741
      Sync'ing workspace to changelist 306741.
      [workspace] $ p4 sync //validate-server/...@306741
      Sync complete, took 99 ms
      [deploy] $ /opt/hudson/hudson/tools/ant/bin/ant -file validate.xml -Dservice.url=http://searil6406v:8080/SplusServer test-spserver-available
      Buildfile: validate.xml
      Build timed out. Aborting
      Email was triggered for: Failure
      There are 1 triggered emails.
      Sending email for trigger: Failure

            rpetti Rob Petti
            bbassett Brian Bassett
            1 Vote for this issue
            3 Start watching this issue