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

waitForQualityGate java.util.NoSuchElementException caused by "cannot find current thread"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • sonar-plugin
    • None
    • Jenkins 2.399
      SonarQube Scanner for Jenkins Version 2.15

      Randomly the 'waitForQualityGate' step would through a exception 'java.util.NoSuchElementException' wich was caused by 'java.io.IOException: cannot find current thread'. I haven't yet found a way to reliably reproduce it.

      12:03:19  [JENKINS-PIPELINE-LIB][ERROR] - java.util.NoSuchElementException
      12:03:19  	at okhttp3.internal.connection.RouteSelector.next(RouteSelector.java:77)
      12:03:19  	at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:171)
      12:03:19  	at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:121)
      12:03:19  	at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:100)
      12:03:19  	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)
      12:03:19  	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
      12:03:19  	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
      12:03:19  	at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
      12:03:19  	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
      12:03:19  	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
      12:03:19  	at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
      12:03:19  	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
      12:03:19  	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120)
      12:03:19  	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
      12:03:19  	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
      12:03:19  	at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:185)
      12:03:19  	at okhttp3.RealCall.execute(RealCall.java:69)
      12:03:19  	at hudson.plugins.sonar.client.HttpClient.httpCall(HttpClient.java:70)
      12:03:19  	at hudson.plugins.sonar.client.HttpClient.getHttp(HttpClient.java:42)
      12:03:19  	at hudson.plugins.sonar.client.WsClient.getCETask(WsClient.java:51)
      12:03:19  	at org.sonarsource.scanner.jenkins.pipeline.WaitForQualityGateStep$Execution.checkTaskCompleted(WaitForQualityGateStep.java:240)
      12:03:19  	at org.sonarsource.scanner.jenkins.pipeline.WaitForQualityGateStep$Execution.start(WaitForQualityGateStep.java:176)
      12:03:19  	at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:322)
      12:03:19  	at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:196)
      12:03:19  	at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:124)
      12:03:19  	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:47)
      12:03:19  	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
      12:03:19  	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
      12:03:19  	at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.methodCall(DefaultInvoker.java:20)
      12:03:19  	at at.tmobile.jenkinslib.stages.SonarMavenAnalysisStage.waitForAnalysis(SonarMavenAnalysisStage.groovy:240)
      12:03:19  	at at.tmobile.jenkinslib.stages.SonarMavenAnalysisStage.analyzeCurrentBranch(SonarMavenAnalysisStage.groovy:161)
      12:03:19  	at at.tmobile.jenkinslib.stages.SonarMavenAnalysisStage.executeSteps(SonarMavenAnalysisStage.groovy:91)
      12:03:19  	at at.tmobile.jenkinslib.AbstractStage.execute(AbstractStage.groovy:27)
      12:03:19  	at ___cps.transform___(Native Method)
      12:03:19  	at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:90)
      12:03:19  	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:116)
      12:03:19  	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixName(FunctionCallBlock.java:80)
      12:03:19  	at jdk.internal.reflect.GeneratedMethodAccessor546.invoke(Unknown Source)
      12:03:19  	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      12:03:19  	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      12:03:19  	at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
      12:03:19  	at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
      12:03:19  	at com.cloudbees.groovy.cps.Next.step(Next.java:83)
      12:03:19  	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:152)
      12:03:19  	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:146)
      12:03:19  	at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:136)
      12:03:19  	at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:275)
      12:03:19  	at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:146)
      12:03:19  	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
      12:03:19  	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:51)
      12:03:19  	at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:187)
      12:03:19  	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:420)
      12:03:19  	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:330)
      12:03:19  	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:294)
      12:03:19  	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67)
      12:03:19  	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      12:03:19  	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139)
      12:03:19  	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      12:03:19  	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
      12:03:19  	at jenkins.util.ErrorLoggingExecutorService.lambda$wrap$0(ErrorLoggingExecutorService.java:51)
      12:03:19  	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
      12:03:19  	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      12:03:19  	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      12:03:19  	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      12:03:19  	at java.base/java.lang.Thread.run(Thread.java:829)
      12:03:19  	Suppressed: java.io.IOException: cannot find current thread
      12:03:19  		at org.jenkinsci.plugins.workflow.cps.CpsStepContext.doGet(CpsStepContext.java:295)
      12:03:19  		at org.jenkinsci.plugins.workflow.support.DefaultStepContext.get(DefaultStepContext.java:75)
      12:03:19  		at org.sonarsource.scanner.jenkins.pipeline.WaitForQualityGateStep$Execution.getContextClass(WaitForQualityGateStep.java:351)
      12:03:19  		at org.sonarsource.scanner.jenkins.pipeline.WaitForQualityGateStep$Execution.accept(WaitForQualityGateStep.java:273)
      12:03:19  		at org.sonarsource.scanner.jenkins.pipeline.WaitForQualityGateStep$Execution.accept(WaitForQualityGateStep.java:159)
      12:03:19  		at org.sonarsource.scanner.jenkins.pipeline.SonarQubeWebHook.doIndex(SonarQubeWebHook.java:84)
      12:03:19  		at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:710)
      12:03:19  		at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:397)
      12:03:19  		at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:409)
      12:03:19  		at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:78)
      12:03:19  		at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26)
      12:03:19  		at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:207)
      12:03:19  		at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:140)
      12:03:19  		at org.kohsuke.stapler.IndexDispatcher.dispatch(IndexDispatcher.java:28)
      12:03:19  		at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:770)
      12:03:19  		at org.kohsuke.stapler.Stapler.invoke(Stapler.java:900)
      12:03:19  		at org.kohsuke.stapler.MetaClass$9.dispatch(MetaClass.java:475)
      12:03:19  		at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:770)
      12:03:19  		at org.kohsuke.stapler.Stapler.invoke(Stapler.java:900)
      12:03:19  		at org.kohsuke.stapler.Stapler.invoke(Stapler.java:698)
      12:03:19  		at org.kohsuke.stapler.Stapler.service(Stapler.java:248)
      12:03:19  		at javax.servlet.http.HttpServlet.service(HttpServlet.java:590)
      12:03:19  		at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:764)
      12:03:19  		at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1665)
      12:03:19  		at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:157)
      12:03:19  		at org.jenkinsci.plugins.corsfilter.AccessControlsFilter.doFilter(AccessControlsFilter.java:79)
      12:03:19  		at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
      12:03:19  		at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:248)
      12:03:19  		at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
      12:03:19  		at jenkins.security.ResourceDomainFilter.doFilter(ResourceDomainFilter.java:81)
      12:03:19  		at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
      12:03:19  		at jenkins.telemetry.impl.UserLanguages$AcceptLanguageFilter.doFilter(UserLanguages.java:129)
      12:03:19  		at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
      12:03:19  		at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)
      12:03:19  		at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
      12:03:19  		at io.jenkins.blueocean.auth.jwt.impl.JwtAuthenticationFilter.doFilter(JwtAuthenticationFilter.java:60)
      12:03:19  		at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
      12:03:19  		at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:64)
      12:03:19  		at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
      12:03:19  		at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:239)
      12:03:19  		at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:215)
      12:03:19  		at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:88)
      12:03:19  		at org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:121)
      12:03:19  		at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
      12:03:19  		at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125)
      12:03:19  		at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
      12:03:19  		at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:160)
      12:03:19  		at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      12:03:19  		at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
      12:03:19  		at org.sonarsource.scanner.jenkins.pipeline.SonarQubeWebHookCrumbExclusion.process(SonarQubeWebHookCrumbExclusion.java:45)
      12:03:19  		at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:128)
      12:03:19  		at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      12:03:19  		at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
      12:03:19  		at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:94)
      12:03:19  		at jenkins.security.AcegiSecurityExceptionFilter.doFilter(AcegiSecurityExceptionFilter.java:52)
      12:03:19  		at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99)
      12:03:19  		at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:54)
      12:03:19  		at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99)
      12:03:19  		at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:126)
      12:03:19  		at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:120)
      12:03:19  		at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99)
      12:03:19  		at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:100)
      12:03:19  		at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99)
      12:03:19  		at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:145)
      12:03:19  		at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:101)
      12:03:19  		at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99)
      12:03:19  		at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:227)
      12:03:19  		at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:221)
      12:03:19  		at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99)
      12:03:19  		at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:97)
      12:03:19  		at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99)
      12:03:19  		at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:117)
      12:03:19  		at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
      12:03:19  		at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:63)
      12:03:19  		at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99)
      12:03:19  		at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:111)
      12:03:19  		at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:172)
      12:03:19  		at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      12:03:19  		at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
      12:03:19  		at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:53)
      12:03:19  		at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      12:03:19  		at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
      12:03:19  		at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:86)
      12:03:19  		at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      12:03:19  		at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
      12:03:19  		at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
      12:03:19  		at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      12:03:19  		at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
      12:03:19  		at jenkins.security.SuspiciousRequestFilter.doFilter(SuspiciousRequestFilter.java:38)
      12:03:19  		at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      12:03:19  		at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
      12:03:19  		at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:527)
      12:03:19  		at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:131)
      12:03:19  		at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:549)
      12:03:19  		at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
      12:03:19  		at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:223)
      12:03:19  		at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1570)
      12:03:19  		at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221)
      12:03:19  		at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1383)
      12:03:19  		at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:176)
      12:03:19  		at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:484)
      12:03:19  		at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1543)
      12:03:19  		at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:174)
      12:03:19  		at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1305)
      12:03:19  		at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129)
      12:03:19  		at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
      12:03:19  		at org.eclipse.jetty.server.Server.handle(Server.java:563)
      12:03:19  		at org.eclipse.jetty.server.HttpChannel.lambda$handle$0(HttpChannel.java:505)
      12:03:19  		at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:762)
      12:03:19  		at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:497)
      12:03:19  		at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:282)
      12:03:19  		at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:314)
      12:03:19  		at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100)
      12:03:19  		at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53)
      12:03:19  		at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:416)
      12:03:19  		at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:385)
      12:03:19  		at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:272)
      12:03:19  		at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.lambda$new$0(AdaptiveExecutionStrategy.java:140)
      12:03:19  		at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:411)
      12:03:19  		at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:934)
      12:03:19  		at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1078)
      12:03:19  		... 1 more
      

            sonarteam Sonar Team
            jenkinsjenkins Andreas Nusser
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: