• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • warnings-ng-plugin
    • None
    • Jenkins ver. 2.138.3 (Docker Hub)
      Wanings NG 1.0.0-beta5

      The log is attached, this is a freestyle job and 2 warnings parsers are configured (Make + GCC and a custom Groovy parser).

      After the build, the plugin fails with the following output, while also marking the build as failure.

      Archiving artifacts
      Skipping issues blame since Git is the only supported SCM up to now.
      [GNU Make + GNU C Compiler (gcc)] Searching for all files in '/home/build/jenkins/jenkins/workspace/poe-baseline.binaries.tfs' that match the pattern 'build.log'
      [GNU Make + GNU C Compiler (gcc)] -> found 1 file
      [GNU Make + GNU C Compiler (gcc)] Successfully parsed file /home/build/jenkins/jenkins/workspace/poe-baseline.binaries.tfs/build.log
      [GNU Make + GNU C Compiler (gcc)] -> found 3 issues (skipped 2022 duplicates)
      ERROR: Build step failed with exception
      java.nio.charset.MalformedInputException: Input length = 1
      	at java.nio.charset.CoderResult.throwException(CoderResult.java:281)
      	at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:339)
      	at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
      	at java.io.InputStreamReader.read(InputStreamReader.java:184)
      	at java.io.BufferedReader.fill(BufferedReader.java:161)
      	at java.io.BufferedReader.readLine(BufferedReader.java:324)
      	at java.io.BufferedReader.readLine(BufferedReader.java:389)
      	at java.io.BufferedReader$1.hasNext(BufferedReader.java:571)
      Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to des_build
      		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1741)
      		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
      		at hudson.remoting.Channel.call(Channel.java:955)
      		at hudson.FilePath.act(FilePath.java:1071)
      		at hudson.FilePath.act(FilePath.java:1060)
      		at io.jenkins.plugins.analysis.core.steps.IssuesScanner.postProcess(IssuesScanner.java:154)
      		at io.jenkins.plugins.analysis.core.steps.IssuesScanner.scanInWorkspace(IssuesScanner.java:99)
      		at io.jenkins.plugins.analysis.core.steps.IssuesScanner.scan(IssuesScanner.java:78)
      		at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.scanWithTool(IssuesRecorder.java:590)
      		at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.record(IssuesRecorder.java:555)
      		at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.perform(IssuesRecorder.java:529)
      		at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81)
      		at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
      		at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
      		at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
      		at hudson.model.Build$BuildExecution.post2(Build.java:186)
      		at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
      		at hudson.model.Run.execute(Run.java:1844)
      		at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      		at hudson.model.ResourceController.execute(ResourceController.java:97)
      		at hudson.model.Executor.run(Executor.java:429)
      Caused: java.io.UncheckedIOException
      	at java.io.BufferedReader$1.hasNext(BufferedReader.java:574)
      	at java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1811)
      	at java.util.Spliterators$1Adapter.hasNext(Spliterators.java:681)
      	at edu.hm.hafner.analysis.FullTextFingerprint.extractContext(FullTextFingerprint.java:111)
      	at edu.hm.hafner.analysis.FullTextFingerprint.createFingerprint(FullTextFingerprint.java:84)
      	at edu.hm.hafner.analysis.FullTextFingerprint.compute(FullTextFingerprint.java:73)
      	at edu.hm.hafner.analysis.FingerprintGenerator.run(FingerprintGenerator.java:35)
      	at io.jenkins.plugins.analysis.core.steps.IssuesScanner$ReportPostProcessor.createFingerprints(IssuesScanner.java:269)
      	at io.jenkins.plugins.analysis.core.steps.IssuesScanner$ReportPostProcessor.invoke(IssuesScanner.java:208)
      	at io.jenkins.plugins.analysis.core.steps.IssuesScanner$ReportPostProcessor.invoke(IssuesScanner.java:177)
      	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3085)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:212)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
      	at hudson.remoting.Request$2.run(Request.java:369)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      Build step 'Record compiler warnings and static analysis results' marked build as failure
      

          [JENKINS-54833] Warnings Parser fails parsing log

          Norbert Lange created issue -

          Ulli Hafner added a comment -

          What encoding did you specify for your source files?

          Ulli Hafner added a comment - What encoding did you specify for your source files?
          Ulli Hafner made changes -
          Link New: This issue is related to JENKINS-54398 [ JENKINS-54398 ]
          Ulli Hafner made changes -
          Link New: This issue is duplicated by JENKINS-54398 [ JENKINS-54398 ]
          Ulli Hafner made changes -
          Link Original: This issue is related to JENKINS-54398 [ JENKINS-54398 ]
          Ulli Hafner made changes -
          Link Original: This issue is duplicated by JENKINS-54398 [ JENKINS-54398 ]
          Ulli Hafner made changes -
          Link New: This issue duplicates JENKINS-54398 [ JENKINS-54398 ]

          Norbert Lange added a comment -

          I specified nothing, and the log consists entirely of ASCII Characters. Specifying UTF-8 did not make a difference either.

          I run the Jenkins server on musl (jenkins/jenkins:2.138.3-alpine from docker hub), while the builder is based on glibc (debian 8) and has locale/encoding "en_US.UTF-8". musl has some differences to glibc when it comes to locale handling (and no "locale" tool), maybe that's relevant.

           

           

          Norbert Lange added a comment - I specified nothing, and the log consists entirely of ASCII Characters. Specifying UTF-8 did not make a difference either. I run the Jenkins server on musl (jenkins/jenkins:2.138.3-alpine from docker hub), while the builder is based on glibc (debian 8) and has locale/encoding "en_US.UTF-8". musl has some differences to glibc when it comes to locale handling (and no "locale" tool), maybe that's relevant.    

          Norbert Lange added a comment -

          Hmm, just to add: do you try to parse the source-code files? What happens if filename relates not to a text-file but an executable/DSO (like with linker-warnings/errors).

          I tried setting up a "fake-build" which just outputs the log I attached, no source-code involved at all. The issue stays the same, so atleast my problem is not related to the source-code encodings.

          Norbert Lange added a comment - Hmm, just to add: do you try to parse the source-code files? What happens if filename relates not to a text-file but an executable/DSO (like with linker-warnings/errors). I tried setting up a "fake-build" which just outputs the log I attached, no source-code involved at all. The issue stays the same, so atleast my problem is not related to the source-code encodings.

          Ulli Hafner added a comment -

          Yes, the exception occurs while reading your source files. That is the reason for two different encoding settings. One for the report and one for your sources.

          Ulli Hafner added a comment - Yes, the exception occurs while reading your source files. That is the reason for two different encoding settings. One for the report and one for your sources.

            drulli Ulli Hafner
            nolange79 Norbert Lange
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: