jenkinsci / jenkinsci/durable-task-plugin

[JENKINS-68680] jenkins build failing when capturing build time duration.

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

Description

Hi,

I am trying to capture the build time for my jobs 

env.BUILD_DURATION="${currentBuild.durationString.replace(' and counting', '')}" to post in slack notification. Often I am getting following error message.

hudson.AbortException: script returned exit code 22

at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.handleExit(DurableTaskStep.java:664)

at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.check(DurableTaskStep.java:610)

at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.run(DurableTaskStep.java:554)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

at java.lang.Thread.run(Thread.java:750)

 

---
Originally reported by harasai, imported from: jenkins build failing when capturing build time duration.


  • status: Open
  • priority: Minor
  • component(s): durable-task-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 2025-12-09

Raw content of original issue

Hi,

I am trying to capture the build time for my jobs 

env.BUILD_DURATION="${currentBuild.durationString.replace(' and counting', '')}" to post in slack notification. Often I am getting following error message.
hudson.AbortException: script returned exit code 22
at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.handleExit(DurableTaskStep.java:664)
at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.check(DurableTaskStep.java:610)
at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.run(DurableTaskStep.java:554)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
 

environment

```
Jenkins: Jenkins 2.319.3

Durable Task Plugin: 496.va67c6f9eefa7
```

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.