I have a matrix project that completely builds on a slave node ("Build on multiple nodes", "Tie parent build to a node" vie matrixtieparent plugin). As a "Post-build Action", "Invoke batch tasks" is configured to run a batch task of the same project. Usually, this works fine and the batch task is execured after the matrix configurations are build. However, when the salve node becomes idle, the bach task is still in the build queue and stays there forever with "pending - Waiting for next available executor on MySlaveNode").
When a new job is added to the build queue, the pending job is finally executed.
This usually happen when may builds are in the queue. However, we also see it when hudson is idle and we start one project build manually.