Run Jenkins with -Dorg.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep.USE_WATCHING=true. Add an agent launched via SSH (the launch method may not be important; this is just what I've observed the issue with).
Add a pipeline job with this script:
Run the pipeline. When it starts printing numbers to the log, disconnect the master from the network. After 30 seconds, reconnect it.
What happens is that for a while (haven't measured, but it feels like a couple of minutes) nothing new appears in the log. After that, the job instantly completes, but:
- Some of the output is missing from the log.
- The "echo OK" step doesn't run.
- The pipeline fails with an EOFException.
I'm attaching a full example log.
By contrast, with USE_WATCHING=false the log resumes a few seconds after the reconnection, no output is skipped and the job succeeds.