Git polling triggers multiple (100s) builds of the same branch, which has already been deleted

118 views
Skip to first unread message

Barry Laffoy

unread,
Jun 23, 2016, 6:11:19 AM6/23/16
to Jenkins Users
Hi

I've seen this problem crop up several times in our Jenkins set up.

The Jenkins git polling will start triggering jobs non-stop for a branch of git that has already been deleted from origin. The only fix I can find is to go into the workspace used for polling on all Jenkins slaves/agents and nuke them. This will fix the problem temporarily, but eventually (about once a week) some other branch will become "it".

We use a pull-request/merge branching model, where feature branches are deleted after merging, so there are a lot of deleted branches to choose from.

One aspect of this that might help understand what's going on is that builds triggered on different build machines will try to build a different git sha for the same branch.

So, our build history will look like this

AgentBranchSHA1
Node1origin/deleted-branch-name74ee3f2d4812
Node2origin/deleted-branch-name11bce23a3cc2
Node1origin/deleted-branch-name74ee3f2d4812
Node2origin/deleted-branch-name11bce23a3cc2
Node1origin/deleted-branch-name74ee3f2d4812
Node2origin/deleted-branch-name11bce23a3cc2
Node1origin/deleted-branch-name74ee3f2d4812
Node2origin/deleted-branch-name11bce23a3cc2

Alternating like so, until someone manually fixes it.

What's going on here? Has anyone seen this bug before? Have we set our Jenkins Git polling up in a way that's unsupported?

Thanks
Barry

Barry Laffoy

unread,
Jun 23, 2016, 6:20:25 AM6/23/16
to jenkins...@googlegroups.com
Actually, I've discovered something else. I went into each of the workspaces used for polling on the build machines, and tried a `git fetch -p` in order to prune branches that have been deleted remotely. Doing so resulted in:

Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
error: The last gc run reported the following. Please correct the root cause
and remove .git/gc.log.
Automatic cleanup will not be performed until the file is removed.
error: pack-objects died of signal 15
error: failed to run repack

Signal 15 is SIGTERM, right? I can't see what has caused that though.

--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/v9o-8V7sLds/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/e8473149-6eed-439d-afb2-2ee96c180149%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages