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

Anchore RunGates seems stuck

XMLWordPrintable

      After running for a few months, we noticed we have a few stuck threads with the Anchore scanning client.

      "org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution [#109135]" - Thread t@118736579
         java.lang.Thread.State: RUNNABLE
              at java.base@11.0.13/java.net.SocketInputStream.socketRead0(Native Method)
              at java.base@11.0.13/java.net.SocketInputStream.socketRead(Unknown Source)
              at java.base@11.0.13/java.net.SocketInputStream.read(Unknown Source)
              at java.base@11.0.13/java.net.SocketInputStream.read(Unknown Source)
              at java.base@11.0.13/sun.security.ssl.SSLSocketInputRecord.read(Unknown Source)
              at java.base@11.0.13/sun.security.ssl.SSLSocketInputRecord.readHeader(Unknown Source)
              at java.base@11.0.13/sun.security.ssl.SSLSocketInputRecord.bytesInCompletePacket(Unknown Source)
              at java.base@11.0.13/sun.security.ssl.SSLSocketImpl.readApplicationRecord(Unknown Source)
              at java.base@11.0.13/sun.security.ssl.SSLSocketImpl$AppInputStream.read(Unknown Source)
              at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:137)
              at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:153)
              at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:282)
              at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:138)
              at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:56)
              at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:259)
              at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:163)
              at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:165)
              at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273)
              at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125)
              at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:272)
              at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
              at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
              at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111)
              at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
              at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
              at com.anchore.jenkins.plugins.anchore.BuildWorker.runGatesEngine(BuildWorker.java:353)
              at com.anchore.jenkins.plugins.anchore.BuildWorker.runGates(BuildWorker.java:295)
              at com.anchore.jenkins.plugins.anchore.AnchoreBuilder.perform(AnchoreBuilder.java:245)
              at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123)
              at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:100)
              at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:70)
              at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
              at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$$Lambda$1427/0x0000000801ca7840.run(Unknown Source)
              at java.base@11.0.13/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
              at java.base@11.0.13/java.util.concurrent.FutureTask.run(Unknown Source)
              at java.base@11.0.13/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
              at java.base@11.0.13/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
              at java.base@11.0.13/java.lang.Thread.run(Unknown Source) 

      The HTTPClient should have a timeout mechanism BUT since we are not using SSL Verify, it builds a custom client on the fly - I do not know if this client includes timeouts on sockets or not.

            nurmi Daniel Nurmi
            seakip18 Matthew Ludlum
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: