[JIRA] (JENKINS-52969) java.lang.InterruptedException: sleep interrupted

99 views
Skip to first unread message

ben@mathews2000.com (JIRA)

unread,
Aug 9, 2018, 5:53:04 PM8/9/18
to jenkinsc...@googlegroups.com
Ben Mathews created an issue
 
Jenkins / Bug JENKINS-52969
java.lang.InterruptedException: sleep interrupted
Issue Type: Bug Bug
Assignee: Daniel Nurmi
Components: anchore-container-scanner-plugin
Created: 2018-08-09 21:52
Environment: Jenkins ver. 2.125
Anchore plugin v1.0.17
Anchore engine

anchore-cli --u admin --p foobar --url http://xxx/ system status
Service policy_engine (anchore_core_service, http://anchore-engine-anchore-engine:8087): down (orphaned)
Service apiext (anchore_core_service, http://anchore-engine-anchore-engine:8228): down (orphaned)
Service simplequeue (anchore_core_service, http://anchore-engine-anchore-engine:8083): down (orphaned)
Service catalog (anchore_core_service, http://anchore-engine-anchore-engine:8082): down (orphaned)
Service analyzer (6b3d5638-291c-4bd3-be15-1a606e9929fc, N/A): down (orphaned)
Service analyzer (d5170d07-2e57-4125-8ea2-a90aaf2952b7, N/A): down (orphaned)
Service analyzer (99f92515-3ca7-478c-a345-33debdf8d9db, N/A): down (orphaned)
Service kubernetes_webhook (anchore_core_service, http://anchore-engine-anchore-engine:8338): down (orphaned)
Service analyzer (anchore-engine-anchore-engine-worker-849459c746-b4lt2, http://10.16.10.26:8084): up
Service analyzer (anchore-engine-anchore-engine-worker-849459c746-wzb5w, http://10.16.115.20:8084): up
Service simplequeue (anchore-engine-anchore-engine-core-58cbb84477-6llxh, http://anchore-engine-anchore-engine:8083): up
Service kubernetes_webhook (anchore-engine-anchore-engine-core-58cbb84477-6llxh, http://anchore-engine-anchore-engine:8338): up
Service catalog (anchore-engine-anchore-engine-core-58cbb84477-6llxh, http://anchore-engine-anchore-engine:8082): up
Service apiext (anchore-engine-anchore-engine-core-58cbb84477-6llxh, http://anchore-engine-anchore-engine:8228): up
Service policy_engine (anchore-engine-anchore-engine-core-58cbb84477-6llxh, http://anchore-engine-anchore-engine:8087): up

Engine DB Version: 0.0.7
Engine Code Version: 0.2.3
Priority: Minor Minor
Reporter: Ben Mathews

I sometimes get the below error from the anchore plugin. The anchore server doesn't report any errors and says the image is analyzed. 

15:13:42 2018-08-09T15:13:42.918 INFO AnchoreWorker Jenkins version: 2.125*15:13:42* 2018-08-09T15:13:42.918 INFO AnchoreWorker Anchore Container Image Scanner Plugin version: 1.0.17*15:13:42* 2018-08-09T15:13:42.918 INFO AnchoreWorker [global] debug: false*15:13:42* 2018-08-09T15:13:42.918 INFO AnchoreWorker [global] enginemode: anchoreengine*15:13:42* 2018-08-09T15:13:42.918 INFO AnchoreWorker [build] engineurl:
http://anchore.platform.vivint.com/v1
15:13:42 2018-08-09T15:13:42.918 INFO AnchoreWorker [build] engineuser: admin*15:13:42* 2018-08-09T15:13:42.918 INFO AnchoreWorker [build] enginepass: ****15:13:42 2018-08-09T15:13:42.919 INFO AnchoreWorker [build] engineverify: false*15:13:42* 2018-08-09T15:13:42.919 INFO AnchoreWorker [build] name: anchore_images*15:13:42* 2018-08-09T15:13:42.919 INFO AnchoreWorker [build] engineRetries: 1000*15:13:42* 2018-08-09T15:13:42.919 INFO AnchoreWorker [build] policyBundleId: 15:13:42 2018-08-09T15:13:42.919 INFO AnchoreWorker [build] bailOnFail: true*15:13:42* 2018-08-09T15:13:42.919 INFO AnchoreWorker [build] bailOnPluginFail: true*15:13:42* 2018-08-09T15:13:42.926 INFO AnchoreWorker Submitting tp-registry.vivint.com:5005/test/vivint-base-prod:2.feature-pl-6145-xconfig-65bd876 for analysis*15:13:43* 2018-08-09T15:13:43.696 INFO AnchoreWorker Analysis request accepted, received image digest sha256:9a1ee582d150bbd9f1b0338e04f9f439e671d1c8fbe10039e2e2d7b35734a17b*15:13:43* 2018-08-09T15:13:43.697 INFO AnchoreWorker Waiting for analysis of tp-registry.vivint.com:5005/test/vivint-base-prod:2.feature-pl-6145-xconfig-65bd876, polling status periodically*15:14:45* 2018-08-09T15:14:45.465 ERROR AnchoreWorker Failed to execute anchore-engine policy evaluation due to an unexpected error*15:14:45* java.lang.InterruptedException: sleep interrupted*15:14:45* at java.lang.Thread.sleep(Native Method)15:14:45 at com.anchore.jenkins.plugins.anchore.BuildWorker.runGatesEngine(BuildWorker.java:395)15:14:45 at com.anchore.jenkins.plugins.anchore.BuildWorker.runGates(BuildWorker.java:343)15:14:45 at com.anchore.jenkins.plugins.anchore.AnchoreBuilder.perform(AnchoreBuilder.java:338)15:14:45 at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)15:14:45 at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)15:14:45 at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:50)15:14:45 at hudson.security.ACL.impersonate(ACL.java:290)15:14:45 at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:47)15:14:45 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)15:14:45 at java.util.concurrent.FutureTask.run(FutureTask.java:266)15:14:45 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)15:14:45 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)15:14:45 at java.lang.Thread.run(Thread.java:745)15:14:45 2018-08-09T15:14:45.465 ERROR AnchorePlugin Failing Anchore Container Image Scanner Plugin step due to errors in plugin execution*15:14:45* hudson.AbortException: Failed to execute anchore-engine policy evaluation due to an unexpected error. Please refer to above logs for more information*15:14:45* at com.anchore.jenkins.plugins.anchore.BuildWorker.runGatesEngine(BuildWorker.java:508)15:14:45 at com.anchore.jenkins.plugins.anchore.BuildWorker.runGates(BuildWorker.java:343)15:14:45 at com.anchore.jenkins.plugins.anchore.AnchoreBuilder.perform(AnchoreBuilder.java:338)15:14:45 at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)15:14:45 at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)15:14:45 at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:50)15:14:45 at hudson.security.ACL.impersonate(ACL.java:290)15:14:45 at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:47)15:14:45 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)15:14:45 at java.util.concurrent.FutureTask.run(FutureTask.java:266)15:14:45 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)15:14:45 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)15:14:45 at java.lang.Thread.run(Thread.java:745)15:14:45 2018-08-09T15:14:45.467 INFO AnchorePlugin Completed Anchore Container Image Scanner step

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)

ben@mathews2000.com (JIRA)

unread,
Aug 9, 2018, 5:54:02 PM8/9/18
to jenkinsc...@googlegroups.com
Ben Mathews updated an issue
Change By: Ben Mathews
I sometimes get the below error from the anchore plugin. The anchore server doesn't report any errors and says the image is analyzed. 



*
{{ 15:13:42 * 2018-08-09T15:13:42.918 INFO   AnchoreWorker   Jenkins version: 2.125 *
15:13:42 * 2018-08-09T15:13:42.918 INFO   AnchoreWorker   Anchore Container Image Scanner Plugin version: 1.0.17 *
15:13:42 * 2018-08-09T15:13:42.918 INFO   AnchoreWorker   [global] debug: false *
15:13:42 * 2018-08-09T15:13:42.918 INFO   AnchoreWorker   [global] enginemode: anchoreengine *
15:13:42 * 2018-08-09T15:13:42.918 INFO   AnchoreWorker   [build] engineurl:
[
http://anchore.platform.vivint.com/v1 ]
* 15:13:42 * 2018-08-09T15:13:42.918 INFO   AnchoreWorker   [build] engineuser: admin *
15:13:42 * 2018-08-09T15:13:42.918 INFO   AnchoreWorker   [build] enginepass: **** *
15:13:42 * 2018-08-09T15:13:42.919 INFO   AnchoreWorker   [build] engineverify: false *
15:13:42 * 2018-08-09T15:13:42.919 INFO   AnchoreWorker   [build] name: anchore_images *
15:13:42 * 2018-08-09T15:13:42.919 INFO   AnchoreWorker   [build] engineRetries: 1000 *
15:13:42 * 2018-08-09T15:13:42.919 INFO   AnchoreWorker   [build] policyBundleId: *
15:13:42 * 2018-08-09T15:13:42.919 INFO   AnchoreWorker   [build] bailOnFail: true *
15:13:42 * 2018-08-09T15:13:42.919 INFO   AnchoreWorker   [build] bailOnPluginFail: true *
15:13:42 * 2018-08-09T15:13:42.926 INFO   AnchoreWorker   Submitting tp-registry.vivint.com:5005/test/vivint-base-prod:2.feature-pl-6145-xconfig-65bd876 for analysis *
15:13:43 * 2018-08-09T15:13:43.696 INFO   AnchoreWorker   Analysis request accepted, received image digest sha256:9a1ee582d150bbd9f1b0338e04f9f439e671d1c8fbe10039e2e2d7b35734a17b *
15:13:43 * 2018-08-09T15:13:43.697 INFO   AnchoreWorker   Waiting for analysis of tp-registry.vivint.com:5005/test/vivint-base-prod:2.feature-pl-6145-xconfig-65bd876, polling status periodically *
15:14:45 * 2018-08-09T15:14:45.465 ERROR  AnchoreWorker   Failed to execute anchore-engine policy evaluation due to an unexpected error *
15:14:45 * java.lang.InterruptedException: sleep interrupted *
15:14:45 *   at java.lang.Thread.sleep(Native Method) *
15:14:45 *   at com.anchore.jenkins.plugins.anchore.BuildWorker.runGatesEngine(BuildWorker.java:395) *
15:14:45 *   at com.anchore.jenkins.plugins.anchore.BuildWorker.runGates(BuildWorker.java:343) *
15:14:45 *   at com.anchore.jenkins.plugins.anchore.AnchoreBuilder.perform(AnchoreBuilder.java:338) *
15:14:45 *   at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80) *
15:14:45 *   at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67) *
15:14:45 *   at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:50) *
15:14:45 *   at hudson.security.ACL.impersonate(ACL.java:290) *
15:14:45 *   at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:47) *
15:14:45 *   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) *
15:14:45 *   at java.util.concurrent.FutureTask.run(FutureTask.java:266) *
15:14:45 *   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) *
15:14:45 *   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) *
15:14:45 *   at java.lang.Thread.run(Thread.java:745) *
15:14:45 * 2018-08-09T15:14:45.465 ERROR  AnchorePlugin   Failing Anchore Container Image Scanner Plugin step due to errors in plugin execution *
15:14:45 * hudson.AbortException: Failed to execute anchore-engine policy evaluation due to an unexpected error. Please refer to above logs for more information *
15:14:45 *   at com.anchore.jenkins.plugins.anchore.BuildWorker.runGatesEngine(BuildWorker.java:508) *
15:14:45 *   at com.anchore.jenkins.plugins.anchore.BuildWorker.runGates(BuildWorker.java:343) *
15:14:45 *   at com.anchore.jenkins.plugins.anchore.AnchoreBuilder.perform(AnchoreBuilder.java:338) *
15:14:45 *   at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80) *
15:14:45 *   at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67) *
15:14:45 *   at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:50) *
15:14:45 *   at hudson.security.ACL.impersonate(ACL.java:290) *
15:14:45 *   at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:47) *
15:14:45 *   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) *
15:14:45 *   at java.util.concurrent.FutureTask.run(FutureTask.java:266) *
15:14:45 *   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) *
15:14:45 *   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) *
15:14:45 *   at java.lang.Thread.run(Thread.java:745) *
15:14:45 * 2018-08-09T15:14:45.467 INFO   AnchorePlugin   Completed Anchore Container Image Scanner step }}

swathi@anchore.com (JIRA)

unread,
Aug 9, 2018, 10:09:02 PM8/9/18
to jenkinsc...@googlegroups.com
Swathi Gangisetty commented on Bug JENKINS-52969
 
Re: java.lang.InterruptedException: sleep interrupted

Ben Mathews, how is the anchore plugin invoked? And how often do you notice this failure? From the stack trace it looks like the thread executing the plugin was interrupted. I'm not sure by what at this point but some context around how the plugin was invoked might help dig into it. 

ben@mathews2000.com (JIRA)

unread,
Aug 10, 2018, 11:59:02 AM8/10/18
to jenkinsc...@googlegroups.com
Ben Mathews commented on Bug JENKINS-52969
 
Re: java.lang.InterruptedException: sleep interrupted

Most of the time the scan works. I'd hesitate to give a percentage, but say 90-95% of the time it works. The plugin is called from a Jenkinsfile that looks like this. Lots of stuff cut out, but hopefully this is the pertinant parts. 

#!groovy

timestamps {
stage('build images')

Unknown macro: { //build stuff }

stage('unit tests, rpm building, check for upgrades') {
builders = [:]
builders['unit-tests'] =

Unknown macro: { node(vivdocker.build_node()) Unknown macro}

}

builders['rpms'] =

Unknown macro: { node(vivdocker.build_node()) Unknown macro}

}

builders['upgrades'] =

Unknown macro: { node(vivdocker.build_node()) Unknown macro}

}

builders['anchore-verification'] = {
node(vivdocker.build_node())

Unknown macro: { try Unknown macro}

catch (e)
Unknown macro: { notifyBuildFailure() throw e }
}
}

builders['failFast'] = true

parallel builders
}
}

swathi@anchore.com (JIRA)

unread,
Aug 10, 2018, 3:58:01 PM8/10/18
to jenkinsc...@googlegroups.com
Swathi Gangisetty commented on Bug JENKINS-52969
 
Re: java.lang.InterruptedException: sleep interrupted

I think failFast aborts all parallel stages when one of them reports a failure. Is there any chance a different stage has failed for some reason and caused the in-progress anchore-verification stage to abort? Console log for the pipeline build (not the anchore plugin) will probably contain more information about stage interrupts and the extraneous cause if any. Look for something like "Sending interrupt signal to process" and the logs around that. 

ben@mathews2000.com (JIRA)

unread,
Aug 10, 2018, 4:33:02 PM8/10/18
to jenkinsc...@googlegroups.com
Ben Mathews commented on Bug JENKINS-52969
 
Re: java.lang.InterruptedException: sleep interrupted

No, it is definitely anchore that is failing. The other parallel sections will have a message like this.


Sending interrupt signal to process

sh: line 1: 25850 Terminated
 

swathi@anchore.com (JIRA)

unread,
Aug 10, 2018, 6:43:01 PM8/10/18
to jenkinsc...@googlegroups.com
Swathi Gangisetty commented on Bug JENKINS-52969
 
Re: java.lang.InterruptedException: sleep interrupted

You are right about the anchore stage failing. Anchore plugin logs indicate that the plugin received an interrupt signal and bailed. I'm trying to figure out what/who triggered this interrupt signal in the first place. It sounds like you've ruled out another stage failing and triggering the interrupt. Another potential for termination would be a timeout if its enforced on the anchore plugin stage. I would need to look through the build console logs to investigate this further

swathi@anchore.com (JIRA)

unread,
Oct 24, 2018, 12:06:01 PM10/24/18
to jenkinsc...@googlegroups.com
Swathi Gangisetty started work on Bug JENKINS-52969
 
Change By: Swathi Gangisetty
Status: Open In Progress
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

swathi@anchore.com (JIRA)

unread,
Oct 24, 2018, 12:06:02 PM10/24/18
to jenkinsc...@googlegroups.com
Swathi Gangisetty assigned an issue to Swathi Gangisetty
Change By: Swathi Gangisetty
Assignee: Daniel Nurmi Swathi Gangisetty

swathi@anchore.com (JIRA)

unread,
Oct 24, 2018, 12:09:02 PM10/24/18
to jenkinsc...@googlegroups.com
Swathi Gangisetty closed an issue as Not A Defect
 

Closing issue due to inactivity. Can be reopened if the user responds back to the last comment

Change By: Swathi Gangisetty
Status: In Progress Closed
Resolution: Not A Defect
Reply all
Reply to author
Forward
0 new messages