Build abort on shell action not working in pipeline

56 views
Skip to first unread message

Arvind Jayaprakash

unread,
Dec 12, 2016, 6:55:38 AM12/12/16
to Jenkins Users
I guess this is not the first report on the build abort action not working in a pipeline (based on past mails I see this group). I write to demonstrate a full example where this doesn't work. Here is my pipeline in it's entiry

node('mvn-3.3-jdk-8') {
  stage('stoopid grep') {
    sh 'grep aa -R /'
  }
}

Notice that this pipeline does nothing but kick off a single long running shell command. grep is known to respect SIGINT on pretty much every *nix out there. So the expectation on trying to abort this build would be for the step to stop executing on reception of SIGINT. However, the grep continues to run and issuing multiple abort requests throws up the familiar Click here to forcibly terminate running steps message. Clicking on it issues a different signal, presumably SIGKILL and this seems to get reliably delivered to the process. The question of course is why is SIGINT not getting delivered to the shell command whereas SIGKILL does seem to get delivered.

The slave is/was launched using the mesos cloud i.e. it connects over JNLP and not ssh

Daniel Beck

unread,
Dec 12, 2016, 11:03:31 AM12/12/16
to jenkins...@googlegroups.com

> On 12.12.2016, at 12:55, Arvind Jayaprakash <wo...@anomalizer.net> wrote:
>
> I guess this is not the first report on the build abort action not working in a pipeline

Are you on the newest versions of all Pipeline-related plugins?

Arvind Jayaprakash

unread,
Dec 12, 2016, 11:08:37 AM12/12/16
to Jenkins Users, m...@beckweb.net
Yes. I've attached the versions of all plugins as a reference
plugin-version.txt

Arvind Jayaprakash

unread,
Dec 20, 2016, 7:41:29 AM12/20/16
to Jenkins Users
Should I be raising this as a bug instead?

Daniel Beck

unread,
Dec 20, 2016, 10:23:46 AM12/20/16
to jenkins...@googlegroups.com

> On 20.12.2016, at 13:41, Arvind Jayaprakash <wo...@anomalizer.net> wrote:
>
> Should I be raising this as a bug instead?

If it's reproducible and you're on the newest plugin versions (and newest weekly or LTS release of Jenkins), then that seems reasonable.

Reply all
Reply to author
Forward
0 new messages