jenkinsci / jenkinsci/durable-task-plugin

[JENKINS-55308] intermittent "terminated" messages using sh in Pipelines

Open
#451 26 comments 0 reactions 0 assignees View on GitHub
component:durable-task-plugin component:workflow-job-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
30
Forks
101
PR merge metrics
No merged PRs in 30d

Description

Testing Jenkins 2.138.2 LTS, Jenkins pipelines that use sh intermittently throw the following message in the console log …

 

sh: line 1:  4449 Terminated              sleep 3

 

 … and sometimes this … 

 

sh: line 1: 13136 Terminated              { while [ ( -d /proc/$pid -o ! -d /proc/$$ ) -a -d '/home/ec2-user/workspace/admin-smoke-test@​tmp/durable-523481b0' -a ! -f '/home/ec2-user/workspace/admin-smoke-test@​tmp/durable-523481b0/jenkins-result.txt' ]; do    touch '/home/ec2-user/workspace/admin-smoke-test@​tmp/durable-523481b0/jenkins-log.txt'; sleep 3;{{done; }}}

 

Jenkins master runs from a Docker image based on jenkins/jenkins:2.138.2-alpine with specific plugins baked into the image by /usr/local/bin/install-plugins.sh

The message originates in durable-task-plugin, which must be a dependency of one of the plugins.txt plugins.  

Two important observations:

1) The issue does not occur when starting with the base jenkins/jenkins:2.138.2-alpine image and manually installing plugins via UI. That might suggest the issue is around how install-plugins.sh installs plugins and/or dependencies. 

2) The issue does not occur on our production image, which is also 2.138.2-alpine + plugins built 2018-10-11. Rebuilding the the same image from the same Dockerfile results in different installed plugins. Makes me think results using install-plugins.sh are not deterministic.

---
Originally reported by gc875, imported from: intermittent "terminated" messages using sh in Pipelines


  • assignee: carroll
  • status: In Progress
  • priority: Minor
  • component(s): durable-task-plugin, workflow-job-plugin
  • resolution: Unresolved
  • votes: 24
  • watchers: 44
  • imported: 2025-12-09

Raw content of original issue

Testing Jenkins 2.138.2 LTS, Jenkins pipelines that use sh intermittently throw the following message in the console log …

 

sh: line 1:  4449 Terminated              sleep 3

 

 … and sometimes this … 

 

sh: line 1: 13136 Terminated              { while [ ( -d /proc/$pid -o ! -d /proc/$$ ) -a -d '/home/ec2-user/workspace/admin-smoke-test@tmp/durable-523481b0' -a ! -f '/home/ec2-user/workspace/admin-smoke-test@tmp/durable-523481b0/jenkins-result.txt' ]; do    touch '/home/ec2-user/workspace/admin-smoke-test@tmp/durable-523481b0/jenkins-log.txt'; sleep 3;{{done; }}}

 

Jenkins master runs from a Docker image based on jenkins/jenkins:2.138.2-alpine with specific plugins baked into the image by /usr/local/bin/install-plugins.sh

The message originates in durable-task-plugin, which must be a dependency of one of the plugins.txt plugins.  

Two important observations:

1) The issue does not occur when starting with the base jenkins/jenkins:2.138.2-alpine image and manually installing plugins via UI. That might suggest the issue is around how install-plugins.sh installs plugins and/or dependencies. 

2) The issue does not occur on our production image, which is also 2.138.2-alpine + plugins built 2018-10-11. Rebuilding the the same image from the same Dockerfile results in different installed plugins. Makes me think results using install-plugins.sh are not deterministic.

environment

```
Test env:

* Jenkins 2.138.2 LTS

* Jenkins master is a docker image based on jenkins/jenkins:2.138.2-alpine

* Specific plugins are baked into the image using /usr/local/bin/install-plugins.sh and plugins.txt shown below

* Master runs on AWS ECS.

* Slaves are AWS EC2 instances

plugins.txt:

active-directory:2.8

ansicolor:0.5.2

aws-cloudwatch-logs-publisher:1.2.0

build-timeout:1.19

cloudbees-folder:6.6

credentials-binding:1.16

command-launcher:1.2

docker-workflow:1.17

ec2:1.40.1

git-client:2.7.3

git:3.9.1

gitlab-plugin:1.5.10

htmlpublisher:1.17

jdk-tool:1.1

pipeline-utility-steps:2.1.0

role-strategy:2.9.0

ssh-agent:1.17

ssh-slaves:1.28.1

timestamper:1.8.10

workflow-aggregator:2.6

ws-cleanup:0.35
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.