-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
version 1.620
I am using a system groovy script to launch jenkins jobs as follows:
def job = hudson.model.Hudson.instance.getJob(jobData['JobName']) def params = jobData['Parameters'].collect { key, val -> new hudson.model.StringParameterValue(key, val) } def paramsAction = new hudson.model.ParametersAction(params) def cause = new hudson.model.Cause.UpstreamCause(build) def causeAction = new hudson.model.CauseAction(cause) hudson.model.Hudson.instance.queue.schedule(job, 0, causeAction, paramsAction)
This works fine, except if the system groovy script crashes or gets aborted. Then suddenly Jenkins appears to go into a death spiral, with the UI slowing down to a crawl and eventually crashing.
I guess the issue is that if the script launching these jobs is aborted, the threads running those scripts suddenly become orphaned. It might be nice if the groovy excutor could reap those threads in some manner.