• Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • warnings-plugin
    • None
    • Warning Plugin 4.35

      Hi everyone,

      I spent few hours on that issue yesterday afternoon and this morning, without any solutions .

      I have a freestyle job that will generate a JSLint XML report thanks to the ESLint Quality tool. (pwd and ls are just debugging )

      npm install
      ./node_modules/bower/bin/bower install
      node ./node_modules/eslint/bin/eslint --config config/eslint.json --rulesdir config/rules --format jslint-xml -o lint.xml --quiet app/javascript || true 
      pwd
      ls
      

      I have configured the Warning Plugin to parse the lint.xml file with the JSLint parser. When I run my Job, here is the output :

      [testworkflowgrunt-ci-1] $ /bin/bash -xe /tmp/hudson3519419950863763056.sh
      + npm install
      npm WARN package.json tutoGruntWorkflow@1.0.0 No repository field.
      + ./node_modules/bower/bin/bower install
      + node ./node_modules/eslint/bin/eslint --config config/eslint.json --rulesdir config/rules --format jslint-xml -o lint.xml --quiet app/javascript
      + true
      + pwd
      /DATA/jenkins/workspace/testworkflowgrunt-ci-1
      + ls
      app
      bower.json
      checkstyle.xml
      config
      grunt
      Gruntfile.js
      jslint.xml
      lint.xml
      node_modules
      package.json
      README.md
      [WARNINGS] Parsing warnings in files 'lint.xml' with parser JSLint
      [WARNINGS] Finding all files that match the pattern lint.xml
      [WARNINGS] Parsing 1 files in /DATA/jenkins/workspace/testworkflowgrunt-ci-1
      [WARNINGS] Parsing of file /DATA/jenkins/workspace/testworkflowgrunt-ci-1/lint.xml failed due to an exception:
      
      java.io.IOException: Underlying input stream returned zero bytes
      	at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:287)
      	at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:325)
      	at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177)
      	at java.io.InputStreamReader.read(InputStreamReader.java:184)
      	at java.io.Reader.read(Reader.java:140)
      	at org.apache.tools.ant.util.ReaderInputStream.read(ReaderInputStream.java:117)
      	at org.apache.xerces.impl.XMLEntityManager$RewindableInputStream.read(Unknown Source)
      	at org.apache.xerces.impl.io.UTF8Reader.read(Unknown Source)
      	at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
      	at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source)
      	at org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown Source)
      	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
      	at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
      	at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
      	at hudson.plugins.warnings.parser.LintParser.parse(LintParser.java:49)
      	at hudson.plugins.warnings.parser.ParserRegistry.parse(ParserRegistry.java:315)
      	at hudson.plugins.warnings.parser.ParserRegistry.parse(ParserRegistry.java:294)
      	at hudson.plugins.warnings.parser.FileWarningsParser.parse(FileWarningsParser.java:53)
      	at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:306)
      	at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:264)
      	at hudson.plugins.analysis.core.FilesParser.parserCollectionOfFiles(FilesParser.java:215)
      	at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:184)
      	at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:31)
      	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2394)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      	at hudson.remoting.Request$2.run(Request.java:326)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:745)
      
      Finished: SUCCESS
      

      Have you already ssen this stacktrace ? I have checked the content of the XML file, and it looks OK :

      <?xml version="1.0" encoding="utf-8"?><jslint><file name="app/javascript/test.js"><issue line="2" char="8" evidence="angular" reason="&apos;angular&apos; is not defined. (no-undef)" /></file></jslint>
      

      Thanks a lot by advance.

      Manu

          [JENKINS-26682] Can't parse jslint-formatted XML file

          I have tested the generated jslint report with the unit test of the plugin, it looks everything is OK. :s

          DEMEY Emmanuel added a comment - I have tested the generated jslint report with the unit test of the plugin, it looks everything is OK. :s

          It looks like we have some problem with our Jenkins. Because I have created a job, fetching your github repository. And I have configure the Warning plugin, in order to parse the single.xml file you have in your src/test package and I have the same error. :s

          I tried another solution, with my own parser, configured in the Admin part of Jenkins. Here is the structure of the error message :
          app/javascript/test.js: line 2, col 8, Error - 'angular' is not defined. (no-undef)

          You will find in the attached file the configuration of new parser.

          When I execute my job, I have a similar issue :

          Commencing build of Revision d1de912ac99d897ca5c4ce97331f431cbe6a9c95 (origin/HEAD, origin/master)
          Checking out Revision d1de912ac99d897ca5c4ce97331f431cbe6a9c95 (origin/HEAD, origin/master)
          Warning : There are multiple branch changesets here
          [testworkflowgrunt-ci-1] $ /bin/bash -xe /tmp/hudson1893862861617495453.sh
          + npm install
          npm WARN package.json tutoGruntWorkflow@1.0.0 No repository field.
          + ./node_modules/grunt-cli/bin/grunt eslint:app
          Running "eslint:app" (eslint) task
          app/javascript/test.js: line 2, col 8, Error - 'angular' is not defined. (no-undef)
          
          1 problem
          Warning: Task "eslint:app" failed. Use --force to continue.
          
          Aborted due to warnings.
          + true
          [WARNINGS] Parsing warnings in console log with parser ESLint
          ERROR: Publisher hudson.plugins.warnings.WarningsPublisher aborted due to exception
          java.lang.IllegalStateException: java.io.IOException: Underlying input stream returned zero bytes
          	at org.apache.commons.io.LineIterator.hasNext(LineIterator.java:107)
          	at hudson.plugins.warnings.parser.RegexpLineParser.parse(RegexpLineParser.java:93)
          	at hudson.plugins.warnings.parser.ParserRegistry.parse(ParserRegistry.java:315)
          	at hudson.plugins.warnings.parser.ParserRegistry.parse(ParserRegistry.java:294)
          	at hudson.plugins.warnings.WarningsPublisher.parseConsoleLog(WarningsPublisher.java:398)
          	at hudson.plugins.warnings.WarningsPublisher.perform(WarningsPublisher.java:320)
          	at hudson.plugins.analysis.core.HealthAwareRecorder.perform(HealthAwareRecorder.java:333)
          	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:780)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:752)
          	at hudson.model.Build$BuildExecution.post2(Build.java:183)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:705)
          	at hudson.model.Run.execute(Run.java:1617)
          	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
          	at hudson.model.ResourceController.execute(ResourceController.java:88)
          	at hudson.model.Executor.run(Executor.java:237)
          Finished: FAILURE
          

          any ideas ?

          DEMEY Emmanuel added a comment - It looks like we have some problem with our Jenkins. Because I have created a job, fetching your github repository. And I have configure the Warning plugin, in order to parse the single.xml file you have in your src/test package and I have the same error. :s I tried another solution, with my own parser, configured in the Admin part of Jenkins. Here is the structure of the error message : app/javascript/test.js: line 2, col 8, Error - 'angular' is not defined. (no-undef) You will find in the attached file the configuration of new parser. When I execute my job, I have a similar issue : Commencing build of Revision d1de912ac99d897ca5c4ce97331f431cbe6a9c95 (origin/HEAD, origin/master) Checking out Revision d1de912ac99d897ca5c4ce97331f431cbe6a9c95 (origin/HEAD, origin/master) Warning : There are multiple branch changesets here [testworkflowgrunt-ci-1] $ /bin/bash -xe /tmp/hudson1893862861617495453.sh + npm install npm WARN package .json tutoGruntWorkflow@1.0.0 No repository field. + ./node_modules/grunt-cli/bin/grunt eslint:app Running "eslint:app" (eslint) task app/javascript/test.js: line 2, col 8, Error - 'angular' is not defined. (no-undef) 1 problem Warning: Task "eslint:app" failed. Use --force to continue . Aborted due to warnings. + true [WARNINGS] Parsing warnings in console log with parser ESLint ERROR: Publisher hudson.plugins.warnings.WarningsPublisher aborted due to exception java.lang.IllegalStateException: java.io.IOException: Underlying input stream returned zero bytes at org.apache.commons.io.LineIterator.hasNext(LineIterator.java:107) at hudson.plugins.warnings.parser.RegexpLineParser.parse(RegexpLineParser.java:93) at hudson.plugins.warnings.parser.ParserRegistry.parse(ParserRegistry.java:315) at hudson.plugins.warnings.parser.ParserRegistry.parse(ParserRegistry.java:294) at hudson.plugins.warnings.WarningsPublisher.parseConsoleLog(WarningsPublisher.java:398) at hudson.plugins.warnings.WarningsPublisher.perform(WarningsPublisher.java:320) at hudson.plugins.analysis.core.HealthAwareRecorder.perform(HealthAwareRecorder.java:333) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:780) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:752) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:705) at hudson.model.Run.execute(Run.java:1617) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:237) Finished: FAILURE any ideas ?

          Ulli Hafner added a comment -

          Hmm, seems that the file is deleted while the plug-in is running. Is the build on a slave? Is the workspace mounted on a special device? Is another plugin active that accesses the file? Is the xml file still present after the Exception occured?

          Ulli Hafner added a comment - Hmm, seems that the file is deleted while the plug-in is running. Is the build on a slave? Is the workspace mounted on a special device? Is another plugin active that accesses the file? Is the xml file still present after the Exception occured?

          Hi Ulli,

          Thanks for your answer. Yes the job are executed on a slave. this file is only used by this plugin and is still present inside the workspace at the end of the build.

          I have tested with a simple example. A freeStyle Job, and the Warning plugin will scan the console log with the javac parser.

          And I have still this error

          Started by user manu
          [EnvInject] - Loading node environment variables.
          Building remotely on slave1 (slave2 default selenium xvfb java github) in workspace /DATA/jenkins/workspace/testworkflowgrunt-ci-1
          [WARNINGS] Parsing warnings in console log with parser Java Compiler (javac)
          ERROR: Publisher hudson.plugins.warnings.WarningsPublisher aborted due to exception
          java.lang.IllegalStateException: java.io.IOException: Underlying input stream returned zero bytes
          	at org.apache.commons.io.LineIterator.hasNext(LineIterator.java:107)
          	at hudson.plugins.warnings.parser.RegexpLineParser.parse(RegexpLineParser.java:84)
          	at hudson.plugins.warnings.parser.ParserRegistry.parse(ParserRegistry.java:280)
          	at hudson.plugins.warnings.parser.ParserRegistry.parse(ParserRegistry.java:259)
          	at hudson.plugins.warnings.WarningsPublisher.parseConsoleLog(WarningsPublisher.java:382)
          	at hudson.plugins.warnings.WarningsPublisher.perform(WarningsPublisher.java:324)
          	at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:152)
          	at hudson.plugins.analysis.core.HealthAwareRecorder.perform(HealthAwareRecorder.java:347)
          	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734)
          	at hudson.model.Build$BuildExecution.post2(Build.java:183)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:683)
          	at hudson.model.Run.execute(Run.java:1770)
          	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          	at hudson.model.ResourceController.execute(ResourceController.java:89)
          	at hudson.model.Executor.run(Executor.java:240)
          Caused by: java.io.IOException: Underlying input stream returned zero bytes
          	at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:287)
          	at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:325)
          	at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177)
          	at java.io.InputStreamReader.read(InputStreamReader.java:184)
          	at java.io.BufferedReader.fill(BufferedReader.java:154)
          	at java.io.BufferedReader.readLine(BufferedReader.java:317)
          	at java.io.BufferedReader.readLine(BufferedReader.java:382)
          	at org.apache.commons.io.LineIterator.hasNext(LineIterator.java:96)
          	... 16 more
          [BFA] Scanning build for known causes...
          
          [BFA] Done. 0s
          Started calculate disk usage of build
          Finished Calculation of disk usage of build in 0 seconds
          Started calculate disk usage of workspace
          Finished Calculation of disk usage of workspace in 0 seconds
          Notifying upstream projects of job completion
          Finished: FAILURE
          

          In which directory/slave should be located the log file ?

          Thanks Ulli

          Manu

          DEMEY Emmanuel added a comment - Hi Ulli, Thanks for your answer. Yes the job are executed on a slave. this file is only used by this plugin and is still present inside the workspace at the end of the build. I have tested with a simple example. A freeStyle Job, and the Warning plugin will scan the console log with the javac parser. And I have still this error Started by user manu [EnvInject] - Loading node environment variables. Building remotely on slave1 (slave2 default selenium xvfb java github) in workspace /DATA/jenkins/workspace/testworkflowgrunt-ci-1 [WARNINGS] Parsing warnings in console log with parser Java Compiler (javac) ERROR: Publisher hudson.plugins.warnings.WarningsPublisher aborted due to exception java.lang.IllegalStateException: java.io.IOException: Underlying input stream returned zero bytes at org.apache.commons.io.LineIterator.hasNext(LineIterator.java:107) at hudson.plugins.warnings.parser.RegexpLineParser.parse(RegexpLineParser.java:84) at hudson.plugins.warnings.parser.ParserRegistry.parse(ParserRegistry.java:280) at hudson.plugins.warnings.parser.ParserRegistry.parse(ParserRegistry.java:259) at hudson.plugins.warnings.WarningsPublisher.parseConsoleLog(WarningsPublisher.java:382) at hudson.plugins.warnings.WarningsPublisher.perform(WarningsPublisher.java:324) at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:152) at hudson.plugins.analysis.core.HealthAwareRecorder.perform(HealthAwareRecorder.java:347) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:683) at hudson.model.Run.execute(Run.java:1770) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240) Caused by: java.io.IOException: Underlying input stream returned zero bytes at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:287) at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:325) at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177) at java.io.InputStreamReader.read(InputStreamReader.java:184) at java.io.BufferedReader.fill(BufferedReader.java:154) at java.io.BufferedReader.readLine(BufferedReader.java:317) at java.io.BufferedReader.readLine(BufferedReader.java:382) at org.apache.commons.io.LineIterator.hasNext(LineIterator.java:96) ... 16 more [BFA] Scanning build for known causes... [BFA] Done. 0s Started calculate disk usage of build Finished Calculation of disk usage of build in 0 seconds Started calculate disk usage of workspace Finished Calculation of disk usage of workspace in 0 seconds Notifying upstream projects of job completion Finished: FAILURE In which directory/slave should be located the log file ? Thanks Ulli Manu

          Ulli Hafner added a comment -

          That is interesting, now the error is not that a file from the workspace could not be read it is that the log file itself could not be read... That is totally strange: the logfile is parsed on the master, the other files are parsed on the slave.

          Are there other IO problems in your Jenkins instance? Is your disk full?

          Which Jenkins version, OS and Java are you using?

          Ulli Hafner added a comment - That is interesting, now the error is not that a file from the workspace could not be read it is that the log file itself could not be read... That is totally strange: the logfile is parsed on the master, the other files are parsed on the slave. Are there other IO problems in your Jenkins instance? Is your disk full? Which Jenkins version, OS and Java are you using?

          I use Jenkins 1.580.3. java 1.7.0_65
          My OS :

          cat /etc/issue.net
          CentOS release 6.2 (Final)
          Kernel \r on an \m
          

          It looks like I still have a lot of space on my hard disks. So no full disk.

          Is it normal that the logfile is parsed on the master ? normally the log file is pushed to the master at the end of the build ? After the execution of the Warning plugin.

          Manu

          DEMEY Emmanuel added a comment - I use Jenkins 1.580.3. java 1.7.0_65 My OS : cat /etc/issue.net CentOS release 6.2 (Final) Kernel \r on an \m It looks like I still have a lot of space on my hard disks. So no full disk. Is it normal that the logfile is parsed on the master ? normally the log file is pushed to the master at the end of the build ? After the execution of the Warning plugin. Manu

          Ulli Hafner added a comment -

          As far as I understand the architecture the file is parsed on the master.

          I have no clue what is broken in your setup.

          Ulli Hafner added a comment - As far as I understand the architecture the file is parsed on the master. I have no clue what is broken in your setup.

          Ulli Hafner added a comment -

          Is this still a problem, then please reopen. I can't reproduce it.

          Ulli Hafner added a comment - Is this still a problem, then please reopen. I can't reproduce it.

            drulli Ulli Hafner
            emmanueldemey DEMEY Emmanuel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: