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

XStream2 unable to round-trip ASCII NUL in stdout/stderr in junitResult.xml

      It appears that the switch from KXml2Driver to StandardStaxDriver in JENKINS-69129 (included in 2.387.3-rc33338.349f385d65d2 as well as weeklies) broke the ability to round-trip ASCII NUL characters in text. Prior to the change, this character was written as � and (whether correct or not) read back successfully. After the change, it is still written the same way, but cannot be read.

      Seems unlikely to affect many users, though it may affect the Jenkins project itself: for example

      mvn -pl test surefire:test -Dtest=ExecutorTest#disconnectCause_WithoutTrace -Dmaven.test.redirectTestOutputToFile=true
      

      causes TEST-hudson.model.ExecutorTest.xml to include

      <===[JENKINS REMOTING CAPACITY]===>&amp#0;&amp#0;&amp#0;channel started
      

      which looks to be bogus output from Surefire but which does not trigger a problem, whereas hudson.model.ExecutorTest-output.txt contains

      <===[JENKINS REMOTING CAPACITY]===>^@^@^@channel started
      

      (with ^@ standing in for actual ASCII NUL for display). In case the NUL makes it into a stdout field in junitResult.xml, the symptom is that the junit step publishes test results normally (setting the build status, sending checks to GitHub, etc.) but if you visit the testReport/ display in the GUI, it claims there are no tests found (after printing a stack trace to the system log about a parse error). Other plugins looking up test results (such as parallel-test-executor) can also be affected.

          [JENKINS-71139] XStream2 unable to round-trip ASCII NUL in stdout/stderr in junitResult.xml

          Jesse Glick created issue -
          Jesse Glick made changes -
          Link New: This issue is caused by JENKINS-69129 [ JENKINS-69129 ]
          Jesse Glick made changes -
          Remote Link New: This issue links to "jenkins #7875 (Web Link)" [ 28614 ]
          Jesse Glick made changes -
          Remote Link New: This issue links to "junit-plugin #520 (Web Link)" [ 28615 ]
          Jesse Glick made changes -
          Description Original: It appears that the switch from {{KXml2Driver}} to {{StandardStaxDriver}} in JENKINS-69129 (included in {{2.387.3-rc33338.349f385d65d2}} as well as weeklies) broke the ability to round-trip ASCII NUL characters in text. Prior to the change, this character was written as {{&\#x0;}} and (whether correct or not) read back successfully. After the change, it is still written the same way, but cannot be read. New: It appears that the switch from {{KXml2Driver}} to {{StandardStaxDriver}} in JENKINS-69129 (included in {{2.387.3-rc33338.349f385d65d2}} as well as weeklies) broke the ability to round-trip ASCII NUL characters in text. Prior to the change, this character was written as {{&\#x0;}} and (whether correct or not) read back successfully. After the change, it is still written the same way, but cannot be read.

          Seems unlikely to affect many users, though it may affect the Jenkins project itself: for example

          {code:sh}
          mvn -pl test surefire:test -Dtest=ExecutorTest#disconnectCause_WithoutTrace -Dmaven.test.redirectTestOutputToFile=true
          {code}

          causes {{TEST-hudson.model.ExecutorTest.xml}} to include

          {code:xml}
          <===[JENKINS REMOTING CAPACITY]===>&amp#0;&amp#0;&amp#0;channel started
          {code}

          which looks to be bogus output from Surefire but which does not trigger a problem, whereas {{hudson.model.ExecutorTest-output.txt}} contains

          {code:none}
          <===[JENKINS REMOTING CAPACITY]===>^@^@^@channel started
          {code}

          (with {{^@}} standing in for actual ASCII NUL for display).
          Jesse Glick made changes -
          Description Original: It appears that the switch from {{KXml2Driver}} to {{StandardStaxDriver}} in JENKINS-69129 (included in {{2.387.3-rc33338.349f385d65d2}} as well as weeklies) broke the ability to round-trip ASCII NUL characters in text. Prior to the change, this character was written as {{&\#x0;}} and (whether correct or not) read back successfully. After the change, it is still written the same way, but cannot be read.

          Seems unlikely to affect many users, though it may affect the Jenkins project itself: for example

          {code:sh}
          mvn -pl test surefire:test -Dtest=ExecutorTest#disconnectCause_WithoutTrace -Dmaven.test.redirectTestOutputToFile=true
          {code}

          causes {{TEST-hudson.model.ExecutorTest.xml}} to include

          {code:xml}
          <===[JENKINS REMOTING CAPACITY]===>&amp#0;&amp#0;&amp#0;channel started
          {code}

          which looks to be bogus output from Surefire but which does not trigger a problem, whereas {{hudson.model.ExecutorTest-output.txt}} contains

          {code:none}
          <===[JENKINS REMOTING CAPACITY]===>^@^@^@channel started
          {code}

          (with {{^@}} standing in for actual ASCII NUL for display).
          New: It appears that the switch from {{KXml2Driver}} to {{StandardStaxDriver}} in JENKINS-69129 (included in {{2.387.3-rc33338.349f385d65d2}} as well as weeklies) broke the ability to round-trip ASCII NUL characters in text. Prior to the change, this character was written as {{&\#x0;}} and (whether correct or not) read back successfully. After the change, it is still written the same way, but cannot be read.

          Seems unlikely to affect many users, though it may affect the Jenkins project itself: for example

          {code:sh}
          mvn -pl test surefire:test -Dtest=ExecutorTest#disconnectCause_WithoutTrace -Dmaven.test.redirectTestOutputToFile=true
          {code}

          causes {{TEST-hudson.model.ExecutorTest.xml}} to include

          {code:xml}
          <===[JENKINS REMOTING CAPACITY]===>&amp#0;&amp#0;&amp#0;channel started
          {code}

          which looks to be bogus output from Surefire but which does not trigger a problem, whereas {{hudson.model.ExecutorTest-output.txt}} contains

          {code:none}
          <===[JENKINS REMOTING CAPACITY]===>^@^@^@channel started
          {code}

          (with {{^@}} standing in for actual ASCII NUL for display). In case the NUL makes it into a {{stdout}} field in {{junitResult.xml}}, the symptom is that the {{junit}} step publishes test results normally (setting the build status, sending checks to GitHub, etc.) but if you visit the {{testReport/}} display in the GUI, it claims there are no tests found (after printing a stack trace to the system log about a parse error). Other plugins looking up test results (such as {{parallel-test-executor}}) can also be affected.
          Jesse Glick made changes -
          Link New: This issue relates to JENKINS-48463 [ JENKINS-48463 ]
          Jesse Glick made changes -
          Remote Link New: This issue links to "junit-plugin #521 (Web Link)" [ 28616 ]
          Jesse Glick made changes -
          Summary Original: XStream2 unable to round-trip ASCII NUL New: XStream2 unable to round-trip ASCII NUL in stdout/stderr in junitResult.xml
          Jesse Glick made changes -
          Assignee New: Jesse Glick [ jglick ]

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: