Repository navigation
Description
I noticed a job was stuck in pending with all checks passed like this:
All of the jobs inputs had recently been checked. I noticed one input hadn't been recently checked because it has a check_every interval of 6 hours. I had a hunch this was the resource the job was stuck waiting on to be checked more recently.
I looked in the database and found the resource had the following values set:
id |last_check_start_time |last_check_end_time |last_check_succeeded|next_check_time |
---------+-----------------------------+-----------------------------+--------------------+-----------------------------+
106439266|2026-06-24 13:08:18.368 -0400|2026-06-24 13:08:41.346 -0400|true |2026-06-24 13:09:41.346 -0400|
The next_check_time should be last_check_end_time + 6 hours, but it's instead last_check_end_time + 1 minute, the default check interval on the cluster. This is what's messing the job up, because it only starts if all inputs have a next_check_time set after the build's create time.
So next_check_time is being updated, but it somehow incorrectly set next_check_time by just 1 minute instead of 6 hours.
We update the value here:
concourse/atc/db/resource_config_scope.go
Lines 243 to 247 in 7a77cc0
| updated, err := checkIfRowsUpdated(tx, ` | |
| UPDATE resource_config_scopes | |
| SET last_check_end_time = now(), last_check_succeeded = $1, next_check_time = now() + make_interval(secs => $2) | |
| WHERE id = $3 | |
| `, succeeded, interval.Seconds(), r.id) |
So we must have gotten an interval of 1min passed in instead of 6hrs.
Going up the stack, the all to this function effectively happens here:
concourse/atc/exec/check_step.go
Line 202 in 7a77cc0
| if _, err := delegate.UpdateScopeLastCheckEndTime(scope, false, interval); err != nil { |
And interval is determined here:
concourse/atc/exec/check_step.go
Lines 164 to 171 in 7a77cc0
| interval := step.plan.Interval.Interval | |
| if interval == 0 { | |
| if step.plan.IsResourceCheck() { | |
| interval = atc.DefaultCheckInterval | |
| } else { | |
| interval = atc.DefaultResourceTypeInterval | |
| } | |
| } |
So did the planner not pass in the interval and therefore we defaulted back to the system default?
I manually checked the resource and saw next_check_time correctly updated to last_check_end_time + 6 hours.
Ah figured it out. You need global resources enabled. The check_every is stored per resource, so if you have two instances of the resource but they have different check_every's, they'll occasionally clobber each other. The resource with the longer check_every will eventually block any of the jobs it's an input to.
More exact steps:
- Global resources enabled
- Two pipelines with the same resource config.
- First pipeline/resource has
check_every: 1h - Second pipeline/resource has no
check_everyset so it defaults to system default of1m - For simplicity let's say both pipelines have one job with a second resource that triggers the job. The shared resource is non-triggering
- First pipeline/resource has
- Second pipeline runs, checking both resources. Our resource now has a
next_check_timeoflast_check_end_time + 1m - First pipeline now runs and is stuck in pending because it sees
next_check_timeis in the past, therefore it waits for the resource to be checked.- All calls to check the resource are ignored though because we check
last_check_end_time+ interval in-memory based on the resource's configuration. This returnslast_check_end_time + 1hrin this case, so the resource is not checked.
- All calls to check the resource are ignored though because we check
This will eventually get unstuck once interval is elapsed in the first pipeline.
Thinking to update the logic in TryCreateCheck() to check next_check_time to avoid this situation.
Global resources makes this whole situation confusing for end users trying to understand what's going on, but I think the most important thing is to make sure builds don't get stuck in a pending state.
Reproduction Steps
Set these two pipelines.
test.yml
resources:
- name: i1
type: mock
- name: i2
type: mock
check_every: 1h
source:
initial_version: v2
jobs:
- name: job
plan:
- get: i1
trigger: true
- get: i2test2.yml
resources:
- name: i2
type: mock
source:
initial_version: v2
jobs:
- name: job
plan:
- get: i2- Let
testtrigger and run the job - Once that job completes, manually trigger the job in
test2 - Wait 1min to elapse since
i2was checked

- From your terminal, create a new version for the triggering resource
i1:fly -t l cr -r test/i1 --from version:m1 - The
testpipeline should start a pending job that never starts

Activity
aliculPix4D commentedon Jun 25, 2026
Hi @taylorsilva I think we are suffering from this issue a lot. After the upgrade to v8.2.4, we have a huge number of pending jobs like that.
Our global configuration has:
In our pipelines, we have:
webhook_tokenconfigured (these are usually triggering resources, but not always)check_every: 24h(almost 100% non-triggering resource). This is the resource that in most cases is blocking; as soon as I manually click to check the jobs startcheck_everyvaluecheck_every: neverbut those should not be relevant since they are alway output and never the inputMost of the builds stuck in the pending state like this are blocked for hours, but on some builds, sometimes scheduling just seems slow.
At first, it seems that the build is stuck in a pending state for tens of minutes, but then it just starts... This might just be a coincidence; e.g. developer triggering the check manually, or the check for the blocking resource was scheduled exactly when we looked at the build.
aliculPix4D commentedon Jun 25, 2026
I went to inspect one of our stuck builds and the global resources can't be an explanation for this one. Here is the full report:
Environment
enable-global-resources)resource-with-webhook-checking-interval = 24hresource-checking-interval = 7mdevelopers / pipeline-mastersecurity(non-manually-triggered)#72(db id1183561560, created2026-06-25 07:23:09+02)Relevant job inputs
daily.timecheck_every: 57mrepo.gitwebhook_tokenset, nocheck_every→ 24h webhook fallbackgolang-pci.dockercheck_every: 24hrepo.gitpipeline snippet:Symptom
Build
#72stuck pending (butscheduled = true). UI shows input checks passed.Root cause (DB)
NonTriggeringResourcesChecked()is false becauserepo.githasnext_check_timeat the column default whilelast_check_end_timeshows a successful recent check:golang-pci.dockeranddaily.timeare not blocking (next_check_timecorrectly set).Difference from #9620 repro
Not interval clobbering from a sibling pipeline:
347064221(repo.git) has only one active resource —pipeline-master. No other pipeline shares this scope.golang-pci.dockerscope is shared across 11 pipelines;next_check_timeis correct there (1 day interval).This looks like a check that updated
last_check_end_timebut leftnext_check_timeat the migration default.UPDATE: This one is actually easily explained. We upgraded Concourse from v7.13.2 to v8.2.4. Database migration created new column
next_check_timein the table, but given that our resources have a large check_every interval (e.g webhooks with 24h fallback, or check_every: 24h), we need to wait for at least 24h so that at least 1 check is performed for this to function properly.taylorsilva commentedon Jun 26, 2026
I've got a PR that fixes the issue I initially reported. Looking over your comment now @aliculPix4D to see if I can sus out what's different in that case.
taylorsilva commentedon Jun 26, 2026
Just read your entire comment and sounds like you figured out why, as per your update, which makes sense to me. I'd be worried if the
next_check_timeWASN'T updated after 24hrs, but sounds like it's all good? Am I correct about that? Just want to be sure we don't need a second issue opened.aliculPix4D commentedon Jun 26, 2026
Hi,
Yes, you are correct. I don't think we need another issue. I think this is now resolved for us.
We were definitely hit by the bug you are describing here, but at the same time, we had many other stuck cases that just had to wait for 24h for the first check to be triggered (or be manually triggered), so the mix of both was a bit overwhelming. The symptoms were exactly as you were describing here, so I was originally 100% sure its the same issue. Sorry for the confussion.
As a workaround for the issue you are describing, we just disabled the global resources as a temporary workaround. So far, we haven't seen any additional stuck builds due to this.🤞
Thanks for the quick fix.