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

Deprecated calls to Run.getLogFile

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      workflow-job 2.29 groovy-postbuild-2.5

      Description

      Timestamper causes lots of WARNING messages in the log:

      Oct 17, 2018 8:19:32 AM org.jenkinsci.plugins.workflow.job.WorkflowRun getLogFile
      WARNING: Avoid calling getLogFile on **** #3
      java.lang.UnsupportedOperationException
      at org.jenkinsci.plugins.workflow.job.WorkflowRun.getLogFile(WorkflowRun.java:1064)
      at hudson.plugins.timestamper.io.LogFileReader.nextLine(LogFileReader.java:157)
      at hudson.plugins.timestamper.action.TimestampsActionOutput$1.readNextLine(TimestampsActionOutput.java:173)
      at hudson.plugins.timestamper.action.TimestampsActionOutput$1.read(TimestampsActionOutput.java:132)
      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 hudson.plugins.timestamper.action.TimestampsAction.doIndex(TimestampsAction.java:102)
      at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
      at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)
      at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:184)
      at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:117)
      at org.kohsuke.stapler.IndexDispatcher.dispatch(IndexDispatcher.java:27)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:739)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:870)
      at org.kohsuke.stapler.MetaClass$10.dispatch(MetaClass.java:384)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:739)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:870)
      at org.kohsuke.stapler.MetaClass$3.doDispatch(MetaClass.java:212)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:739)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:870)
      at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:253)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:739)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:870)
      at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:253)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:739)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:870)
      at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:253)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:739)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:870)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:668)
      at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1655)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
      at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:59)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      at hudson.plugins.locale.LocaleFilter.doFilter(LocaleFilter.java:42)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      at jenkins.telemetry.impl.UserLanguages$AcceptLanguageFilter.doFilter(UserLanguages.java:124)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
      at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:105)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
      at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
      at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
      at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
      at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
      at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
      at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
      at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1340)
      at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
      at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1242)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
      at org.eclipse.jetty.server.Server.handle(Server.java:503)
      at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:364)
      at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)
      at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
      at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
      at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)
      at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
      at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
      at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
      at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
      at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765)
      at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683)
      at java.lang.Thread.run(Thread.java:748)
      zebra-cd-preprod-jenkins-587d4f6d59-k7cv4 zebra-cd-preprod-jenkins

      Installed plugins:

      scm-api:2.2.8
      docker-workflow:1.17
      bouncycastle-api:2.17
      parameter-separator:1.0
      script-security:1.46
      ssh-agent:1.17
      htmlpublisher:1.17
      kubernetes:1.12.7
      workflow-aggregator:2.6
      jquery:1.12.4-0
      plain-credentials:1.4
      jackson2-api:2.8.11.3
      greenballs:1.15
      pipeline-utility-steps:2.1.0
      pipeline-stage-tags-metadata:1.3.2
      jquery-detached:1.2.1
      timestamper:1.8.10
      kubernetes-credentials:0.4.0
      pipeline-milestone-step:1.3.1
      workflow-api:2.30
      ansicolor:0.5.2
      authentication-tokens:1.3
      pipeline-graph-analysis:1.7
      branch-api:2.0.20
      variant:1.1
      workflow-step-api:2.16
      matrix-auth:2.3
      mattermost:2.5.2
      workflow-cps-global-lib:2.12
      ldap:1.20
      pipeline-build-step:2.7
      apache-httpcomponents-client-4-api:4.5.5-3.0
      structs:1.17
      git:3.9.1
      pipeline-stage-step:2.3
      workflow-support:2.21
      antisamy-markup-formatter:1.5
      workflow-basic-steps:2.11
      workflow-cps:2.58
      pipeline-model-extensions:1.3.2
      pipeline-rest-api:2.10
      gitlab-plugin:1.5.10
      docker-commons:1.13
      workflow-multibranch:2.20
      uno-choice:2.1
      ssh-credentials:1.14
      pipeline-input-step:2.8
      credentials:2.1.18
      workflow-durable-task-step:2.22
      pipeline-model-declarative-agent:1.1.1
      token-macro:2.5
      momentjs:1.1.1
      pipeline-model-definition:1.3.2
      git-client:2.7.3
      git-server:1.7
      durable-task:1.26
      ace-editor:1.1
      ssh-slaves:1.28.1
      jsch:0.1.54.2
      performance:3.12
      pipeline-model-api:1.3.2
      workflow-job:2.26
      command-launcher:1.2
      cloudbees-folder:6.6
      display-url-api:2.2.0
      rebuild:1.29
      locale:1.3
      credentials-binding:1.16
      mailer:1.21
      matrix-project:1.13
      workflow-scm-step:2.7
      collapsing-console-sections:1.7.0
      job-dsl:1.70
      handlebars:1.1.1
      junit:1.26.1
      pipeline-stage-view:2.10
      configuration-as-code:1.1

      Jenkins version: 2.147

        Attachments

          Issue Links

            Activity

            Hide
            vmassol Vincent Massol added a comment -

            All of these methods ought to be marked @NonCPS.

            Jesse Glick hmm, are you saying that the performance issues I see are actually caused by the fact that I didn't mark them @NonCPS? Indeed, didn't think of this. I'm surprised it would make such a difference but maybe that's the case.

            Show
            vmassol Vincent Massol added a comment - All of these methods ought to be marked @NonCPS. Jesse Glick hmm, are you saying that the performance issues I see are actually caused by the fact that I didn't mark them @NonCPS ? Indeed, didn't think of this. I'm surprised it would make such a difference but maybe that's the case.
            Hide
            jglick Jesse Glick added a comment -

            I'm surprised it would make such a difference

            Orders of magnitude. CPS-transformed code is intended for “glue”: a handful of if-statements and the like. Not actual programming.

            Show
            jglick Jesse Glick added a comment - I'm surprised it would make such a difference Orders of magnitude. CPS-transformed code is intended for “glue”: a handful of if -statements and the like. Not actual programming.
            Hide
            ikedam ikedam added a comment -

            The issue in groovy-postbuild is fixed in groovy-postbuild-2.5.
            (Removed groovy-postbuild from component/s)
            It will be available in the update center in a day.
            Please try that.

            Show
            ikedam ikedam added a comment - The issue in groovy-postbuild is fixed in groovy-postbuild-2.5. (Removed groovy-postbuild from component/s) It will be available in the update center in a day. Please try that.
            Hide
            vmassol Vincent Massol added a comment -

            Awesome, thanks for both of you Jesse Glick and ikedam!

            Show
            vmassol Vincent Massol added a comment - Awesome, thanks for both of you Jesse Glick and ikedam !
            Hide
            markewaite Mark Waite added a comment -

            Thanks very much ikedam and Jesse Glick. I'm now using the groovy-postbuild plugin 2.5 and am not seeing any log messages for my use of the groovy post build plugin to assert that specific strings are detected in the log file of the current build.

            Show
            markewaite Mark Waite added a comment - Thanks very much ikedam and Jesse Glick . I'm now using the groovy-postbuild plugin 2.5 and am not seeing any log messages for my use of the groovy post build plugin to assert that specific strings are detected in the log file of the current build.

              People

              • Assignee:
                Unassigned
                Reporter:
                aroq Alexander Tolstikov
              • Votes:
                2 Vote for this issue
                Watchers:
                20 Start watching this issue

                Dates

                • Created:
                  Updated: