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

Charset not respected in parallel sync

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • p4-plugin
    • None
    • Jenkins 2.89.1
      P4 Plugin 1.9.4

      We have noticed that when syncing a unicode file from a utf8 server, the sync will fail when parallel sync is enabled. With identical other settings but parallel disabled, the sync will succeed.

       

      Repro steps:

      Create freestyle job with p4 scm step. Configure to sync from a utf8 server with at least one file with unicode characters in the clientspec. Enable parallel sync. Run job.

       

      Sample error log:

      P4 Task: attempt: 1
      ERROR: P4: Task Exception: com.perforce.p4java.exception.P4JavaException: com.perforce.p4java.exception.P4JavaException: hudson.AbortException: P4JAVA: Error(s):
      C:\Program Files (x86)\Jenkins\workspace\test\main\Tools\perl\strawberry-perl-5.26.0.2-64bit-portable\perl\vendor\lib\Unicode\LineBreak.pod - encoding error.

       

      Additional Info:

      If the charset is specified in the environment, the sync will succeed. This suggests that the configured charset and the environment charset are read in at different points, and only the latter is implemented correctly for parallel sync. As a note, since p4 java will run as part of the slave JVM, this environment needs to be applied to the slave process itself (as opposed to in-jenkins configured environments which only apply to subprocesses).

       

      We noticed that the same bug with the command line p4 client as well. Running a parallel sync with p4 -C utf8 will fail but setting it externally (any of environment, p4 set, or p4 config file) will succeed. As an aside, how would I go about filing a bug to Perforce for the p4 client?

            msmeeth Matthew Smeeth
            sean_sutherland Sean Sutherland
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: