It turns out my question were way too specific to be useful for anyone in the future. Therefore the question is rephrased as:
Debugging what happens when a Jenkins build unexpectedly pauses or hangs.
An answer will also be added.
The original question and description follows:
Debugging what happens between the Build and Post-Build Action sections
In the last week or so, we have experienced delays in our build-jobs. Debugging indicated that the delay (between 10 and 15 minutes) is introduced in the space between the Build and Post-Build Action of a freestyle project.
In an attempt to debug, I've set up a job with one Windows batch action, to echo a line in the Build section, and a groovy postbuild in the Post-Build section.
The batch is simply: echo Last entry in the Build Actions.
The groovy similar simple: manager.listener.logger.println("First entry in Post-build Actions");
The log (with timestamps) generates this:
15:12:05 Last entry in the Build Actions.
15:26:08 First entry in Post-build Actions
I've been traversing the Jenkins logs, but my search for a smoking gun has come up empty.
How can I monitor what happens between the two states?