jenkinsci / jenkinsci/workflow-durable-task-step-plugin

[JENKINS-45340] step hangs when agent is deconnected

Open
#533 1 comment 0 reactions 0 assignees View on GitHub
component:workflow-durable-task-step-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
46
Forks
110
PR merge metrics
No merged PRs in 30d

Description

I use pipeline and my steps are composed by sh step.

during step execution if agent is disconnected the build hangs for ever.

In logs I can see :

Cannot contact slave008: java.lang.InterruptedException

So I try to catch InterruptedException to stop the step but It does not work.

I also try to use timeout but no way  build never fails !

with jenkins 2.60.1 and all plugins up to date, behavior is the same.

I check many others issues quite close but did not  find a workaround.

 

is there a timeout somewhere to fail build in case of agent disconnection ?

 

 

BR,

Theo

---
Originally reported by tpaimpar, imported from: step hangs when agent is deconnected


  • status: Open
  • priority: Minor
  • component(s): workflow-durable-task-step-plugin
  • resolution: Unresolved
  • votes: 1
  • watchers: 4
  • imported: 20251212-090250

Raw content of original issue

I use pipeline and my steps are composed by sh step.

during step execution if agent is disconnected the build hangs for ever.

In logs I can see :
Cannot contact slave008: java.lang.InterruptedException
So I try to catch InterruptedException to stop the step but It does not work.

I also try to use timeout but no way  build never fails !

with jenkins 2.60.1 and all plugins up to date, behavior is the same.

I check many others issues quite close but did not  find a workaround.

 

is there a timeout somewhere to fail build in case of agent disconnection ?

 

 

BR,

Theo

environment

```
System Properties

Name ↓

Value

awt.toolkit sun.awt.X11.XToolkit

executable-war /usr/share/jenkins/jenkins.war

file.encoding UTF-8

file.encoding.pkg sun.io

file.separator /

hudson.model.DirectoryBrowserSupport.CSP default-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:;script-src 'self' 'unsafe-inline' -DsessionTimeout=240 -Djava.io.tmpdir=/var/log/jenkins_prod_log

java.awt.graphicsenv sun.awt.X11GraphicsEnvironment

java.awt.headless true

java.awt.printerjob sun.print.PSPrinterJob

java.class.path /usr/share/jenkins/jenkins.war

java.class.version 52.0

java.endorsed.dirs /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/endorsed

java.ext.dirs /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext:/usr/java/packages/lib/ext

java.home /usr/lib/jvm/java-8-openjdk-amd64/jre

java.io.tmpdir /tmp

java.library.path /usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib

java.runtime.name OpenJDK Runtime Environment

java.runtime.version 1.8.0_121-8u121-b13-1~bpo8+1-b13

java.specification.name Java Platform API Specification

java.specification.vendor Oracle Corporation

java.specification.version 1.8

java.vendor Oracle Corporation

java.vendor.url http://java.oracle.com/

java.vendor.url.bug http://bugreport.sun.com/bugreport/

java.version 1.8.0_121

java.vm.info mixed mode

java.vm.name OpenJDK 64-Bit Server VM

java.vm.specification.name Java Virtual Machine Specification

java.vm.specification.vendor Oracle Corporation

java.vm.specification.version 1.8

java.vm.vendor Oracle Corporation

java.vm.version 25.121-b13

jna.loaded true

jna.platform.library.path /usr/lib/x86_64-linux-gnu:/lib/x86_64-linux-gnu:/lib64:/usr/lib:/lib

jnidispatch.path /tmp/jna--1712433994/jna863504087575590606.tmp

line.separator

mail.smtp.sendpartial true

mail.smtps.sendpartial true

os.arch amd64

os.name Linux

os.version 3.10.0-514.2.2.el7.x86_64

path.separator :

sun.arch.data.model 64

sun.boot.class.path /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/resources.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jsse.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jce.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/charsets.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jfr.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/classes

sun.boot.library.path /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64

sun.cpu.endian little

sun.cpu.isalist

sun.font.fontmanager sun.awt.X11FontManager

sun.io.unicode.encoding UnicodeLittle

sun.java.command /usr/share/jenkins/jenkins.war --logfile=/var/jenkins_home/logs/jenkins.log

sun.java.launcher SUN_STANDARD

sun.jnu.encoding UTF-8

sun.management.compiler HotSpot 64-Bit Tiered Compilers

sun.os.patch.level unknown

svnkit.http.methods Digest,Basic,NTLM,Negotiate

svnkit.ssh2.persistent false

user.dir /

user.home /var/jenkins_home

user.language en

user.name jenkins

user.timezone Etc/UTC

Environment Variables

Name ↓

Value

CA_CERTIFICATES_JAVA_VERSION 20161107~bpo8+1

COPY_REFERENCE_FILE_LOG /var/jenkins_home/copy_reference_file.log

HOME /var/jenkins_home

HOSTNAME 14b24945db5a

JAVA_DEBIAN_VERSION 8u121-b13-1~bpo8+1

JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64

JAVA_OPTS "-Dhudson.model.DirectoryBrowserSupport.CSP=default-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:;script-src 'self' 'unsafe-inline' -DsessionTimeout=240 -Djava.io.tmpdir=/var/log/jenkins_prod_log"

JAVA_VERSION 8u121

JENKINS_HOME /var/jenkins_home

JENKINS_OPTS "--logfile=/var/jenkins_home/logs/jenkins.log"

JENKINS_SLAVE_AGENT_PORT 50000

JENKINS_UC https://updates.jenkins.io

JENKINS_VERSION 2.32.2

LANG C.UTF-8

PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

PWD /

SHLVL 0

TINI_SHA afbf8de8a63ce8e4f18cb3f34dfdbbd354af68a1

TINI_VERSION 0.13.2

Plugins

Name ↓

Version

Enabled

Pinned

ace-editor 1.1 true false

ant 1.4 true false

antisamy-markup-formatter 1.5 true false

authentication-tokens 1.3 true false

bouncycastle-api 2.16.0 true false

branch-api 2.0.8 true false

build-timeout 1.18 true false

cloudbees-folder 6.0.3 true false

credentials 2.1.13 true false

credentials-binding 1.11 true false

display-url-api 1.1.1 true false

docker-commons 1.6 true false

docker-workflow 1.10 true false

durable-task 1.13 true false

email-ext 2.57.1 true false

emailext-template 1.0 true false

external-monitor-job 1.7 true false

git 3.2.0 true false

git-client 2.4.1 true false

git-server 1.7 true false

github 1.26.2 true false

github-api 1.85 true false

github-branch-source 2.0.4 true false

github-organization-folder 1.6 true false

gradle 1.26 true false

greenballs 1.15 true false

handlebars 1.1.1 true false

icon-shim 2.0.3 true false

jackson2-api 2.7.3 true false

javadoc 1.4 true false

jquery 1.11.2-0 true false

jquery-detached 1.2.1 true false

junit 1.20 true false

ldap 1.14 true false

mailer 1.20 true false

mapdb-api 1.0.9.0 true false

matrix-auth 1.4 true false

matrix-project 1.9 true false

metrics 3.1.2.9 true false

momentjs 1.1.1 true false

nodelabelparameter 1.7.2 true false

pam-auth 1.3 true false

pipeline-build-step 2.5 true false

pipeline-github-lib 1.0 true false

pipeline-graph-analysis 1.4 true false

pipeline-input-step 2.7 true false

pipeline-milestone-step 1.3.1 true false

pipeline-model-api 1.1.6 true false

pipeline-model-declarative-agent 1.1.1 true false

pipeline-model-definition 1.1.6 true false

pipeline-model-extensions 1.1.6 true false

pipeline-rest-api 2.8 true false

pipeline-stage-step 2.2 true false

pipeline-stage-tags-metadata 1.1.6 true false

pipeline-stage-view 2.8 true false

plain-credentials 1.4 true false

postbuild-task 1.8 true false

rebuild 1.25 true false

resource-disposer 0.6 true false

scm-api 2.1.1 true false

script-security 1.27 true false

ssh-credentials 1.13 true false

ssh-slaves 1.16 true false

structs 1.7 true false

subversion 2.7.2 true false

timestamper 1.8.8 true false

token-macro 2.0 true false

windows-slaves 1.3.1 true false

workflow-aggregator 2.5 true false

workflow-api 2.17 true false

workflow-basic-steps 2.5 true false

workflow-cps 2.35 true false

workflow-cps-global-lib 2.8 true false

workflow-durable-task-step 2.11 true false

workflow-job 2.11 true false

workflow-multibranch 2.15 true false

workflow-scm-step 2.4 true false

workflow-step-api 2.11 true false

workflow-support 2.14 true false

ws-cleanup 0.32 true false
```

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.