Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jenkins child jobs not stopped by interrupt signal #20396

Open
pshipton opened this issue Oct 22, 2024 · 6 comments
Open

Jenkins child jobs not stopped by interrupt signal #20396

pshipton opened this issue Oct 22, 2024 · 6 comments

Comments

@pshipton
Copy link
Member

Carry on the discussion from #20395 (comment)

@JasonFengJ9 commented:
So Click here to forcibly terminate running steps doesn't abort the child jobs.
Do we have to log in to the machine manually to kill the processes?

Copy link

Issue Number: 20396
Status: Open
Recommended Components: comp:build, comp:vm, comp:test
Recommended Assignees: adambrousseau, babsingh, jasonfengj9

@pshipton
Copy link
Member Author

pshipton commented Oct 22, 2024

It depends what the child job is doing. It's a known issue with setting ITERATIONS that an interrupt signal only stops the current iteration and the job continues with the next iteration.

When you interrupt the first time it signals all the child jobs and the parent waits for them to finish. By using Click here to forcibly terminate running steps it may send another interrupt to the child jobs and then it forcibly kills the parent so it's not waiting for them to finish any more.

@JasonFengJ9
Copy link
Member

Okay, what's the reliable way to ensure all child jobs are aborted, or is there such a link instead of logging in to the machine manually?

@pshipton
Copy link
Member Author

pshipton commented Oct 22, 2024

The only way I know to kill the child jobs is to keep stopping the parent job until all the child iterations are finished. Or open the child jobs individually and do the same. If each child isn't running the same iteration, continuous stopping may interrupt the cleanup steps at the end of job.

It's been a known behavior for some time, not sure if @llxia has any plans to change it.

@llxia
Copy link
Contributor

llxia commented Oct 24, 2024

I think we can try to check currentBuild.result inside the loop. If it is ABORTED, then break.

@annaibm can you try to add the check inside for https://github.com/adoptium/aqa-tests/blob/2c47e24c512b6419c8b2a01b75ae2d10c4dd9215/buildenv/jenkins/JenkinsfileBase#L766-L787?

@llxia
Copy link
Contributor

llxia commented Oct 25, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants