jenkins java.lang.InterruptedException

Bug #1270309 reported by Joe Gordon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Core Infrastructure
Opinion
Undecided
Unassigned
OpenStack-Gate
Opinion
Undecided
Unassigned

Bug Description

Jenkins throws a java.lang.InterruptedException when we interrupt a running task (such as in a gate reset). which causes jobs to be marked as FAILED instead of incomplete. The bug here is these shouldn't be marked as a failure. Counting these as FAILED breaks graphite data, elasticSearch and elastic-recheck data.

According to the java docs:
"Thrown when a thread is waiting, sleeping, or otherwise occupied, and the thread is interrupted, either before or during the activity."

logstash query: message:"java.lang.InterruptedException" AND filename:"console.html"

Joe Gordon (jogo)
description: updated
Revision history for this message
James E. Blair (corvus) wrote :

Builds that are interrupted are not reported and therefore should not be seen by anyone looking at Gerrit (including the elastic-recheck daemon); similarly, Zuul ignores data from builds it has canceled and does not report them to statsd. So I think the only thing from your list that would be affected by this would be the elastic-recheck bug frequency stats because logs from aborted builds are in logstash.

I'm not sure that's actually a problem though. Even aborted builds can produce data for us (by generating a real error that matches a signature before it's aborted).

Changed in openstack-ci:
status: New → Opinion
Jeremy Stanley (fungi)
Changed in openstack-gate:
status: New → Opinion
Revision history for this message
Gene Pavlovsky (gene-pavlovsky) wrote :

You can handle this:

try {
  ... // Build steps
}
catch (java.lang.InterruptedException err) {
  currentBuild.result = 'ABORTED' // Mark the build as aborted
}
catch (err) {
  error err.message // Mark the build as failed
}
finally {
  ... // Clean up steps, build result reporting etc...
  cleanWs(notFailBuild: true)
}

The only thing, is your build steps include nested try/catch blocks, you have to also catch the InterruptedException there and propagate it to this outer catch...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.