#1443·immich-go

upload from-google-photos: CreateStack hangs indefinitely on resumed runs (related to #1426, not fixed by #1423)

Author: fishhead1982Created Sep 18, 2026Updated Sep 18, 2026

Summary

upload from-google-photos hangs indefinitely (not an error — a genuine, permanent stall) when re-running against a library that already has most of the same Takeout content uploaded. All --concurrent-tasks workers eventually block forever inside CreateStack's HTTP call and never return, so Uploaded stays at 0 with zero errors logged, for as long as the process is left running (observed 20-45+ minutes before I force-killed it each time, across several separate occurrences over multiple days).

This looks like the same underlying trigger as #1426 (stale/replaced asset ID ending up in a POST /api/stacks call, from re-processing a Takeout duplicate like photo(1).jpg against a library that already has the file it duplicates), but manifests as an indefinite hang rather than the 400 Bad Request documented there. Filing separately since the fix in #1423 does not resolve this (see below) — happy for a maintainer to merge/close as related if that's preferred.

Environment

  • immich-go v0.32.0 (official release binary)
  • Immich server v3.1.0, self-hosted (Docker), ARM64, 8 vCPU / 7.5GB RAM
  • Source: Google Takeout, 43 zip parts, ~186,700 assets total
  • Command: immich-go upload from-google-photos --api-key=*** --admin-api-key=*** --log-file=... --no-ui=true --on-errors=continue --concurrent-tasks=4 --server=http://localhost:2283 *.zip
  • This was a resumed run — an earlier successful pass had already uploaded ~164,000 of the ~186,700 assets from the same zip set before this started

Symptom

After the initial scan/dedupe pass completes (Assets found: 186708), the run sits at Uploaded 0 indefinitely. SIGQUIT (Go's default goroutine-dump-then-exit) reliably shows one or more worker goroutines permanently parked in net/http, waiting on a response to a stack-creation request that never comes back — not a slow response, no server-side error, just never returns:

goroutine 101 gp=0x4000261c00 m=nil [select]:
runtime.gopark(0x400aebb4b8?, 0x5?, 0xf8?, 0xb1?, 0x400aebb33e?)
	runtime/proc.go:460 +0xc0
runtime.selectgo(0x400aebb4b8, 0x400aebb334, 0x4f0a39?, 0x0, 0x400aebb338?, 0x1)
	runtime/select.go:351 +0x6bc
net/http.(*persistConn).roundTrip(0x400013e360, 0x400a77aa50)
	net/http/transport.go:2836 +0x604
net/http.(*Transport).roundTrip(0x40001441a0, 0x40000008c0)
	net/http/transport.go:696 +0x7c0
net/http.(*Transport).RoundTrip(0x40000008c0?, 0x611920?)
	net/http/roundtrip.go:33 +0x20
net/http.send(0x4000000780, {0x611920, 0x40001441a0}, {0x29a298?, 0x8?, 0x9aa920?})
	net/http/client.go:259 +0x478
net/http.(*Client).send(0x40001fa120, 0x4000000780, {0x4018f65920?, 0x26098?, 0x9aa920?})
	net/http/client.go:180 +0x88
net/http.(*Client).do(0x40001fa120, 0x4000000780)
	net/http/client.go:729 +0x710
net/http.(*Client).Do(...)
	net/http/client.go:587
github.com/simulot/immich-go/immich.(*serverCall).do(0x401fcad580, 0x2?, {0x400aebbd48, 0x1, 0x4ea177?})
	github.com/simulot/immich-go/immich/call.go:204 +0x84
github.com/simulot/immich-go/immich.(*ImmichClient).CreateStack(0x400029c000, {0x615d70, 0x400f26cd70}, {0x401d0acdc0?, 0x42e2c0?, 0x401d0acda0?})
	github.com/simulot/immich-go/immich/stacks.go:38 +0x29c
github.com/simulot/immich-go/app/upload.(*UpCmd).handleGroup(0x4000248dc8, {0x615d70, 0x400f26cd70}, 0x400aebbf64?)
	github.com/simulot/immich-go/app/upload/run.go:333 +0x478

Once enough workers land in this state to exhaust --concurrent-tasks, no further groups get processed at all — not just the stuck one. Repeated across multiple fresh invocations (same zips, same server), each time reliably stalling at Uploaded 0 after the scan completes.

What I ruled out

  • Not a slow-but-completing request: re-ran with --client-timeout=90s (down from the 20m default) — made no difference. Workers still hang past the configured timeout, so either the timeout isn't reaching this call path, or the underlying connection genuinely never resolves (times out, errors, anything) on its own.
  • Not client resource contention: reproduced immediately after a clean restart of the Immich server container, with Redis/job-queue backlogs confirmed empty and the server otherwise idle.
  • Not a Postgres lock: checked pg_stat_activity during an active stall — no long-running or blocked queries at the time.

Testing against #1423

Also built and tested a local binary from the fix/edited-sibling-not-server-duplicate branch (#1423), since its description matches this trigger scenario closely. The same CreateStack hang still occurred on that branch. Additionally — with lower confidence, mentioning as a data point rather than a claim — I also saw other worker goroutines parked inside assetIndex.ShouldUpload (an in-memory call, not network I/O) in that build's goroutine dump, which I didn't see on stock v0.32.0. I haven't dug into whether that's a separate issue introduced by the branch's index-locking changes or just a knock-on effect of the same CreateStack hang starving the pool — flagging it in case it's useful, not asserting it's a new bug.

Data shape, if relevant

The library is a large personal photo/video Takeout (Google Motion Photos are common in it — paired .jpg+.mp4 files with matching timestamps, grouped and stacked by immich-go's series grouper), re-uploaded after Google's own Takeout export produced some duplicate-named retry files across parts (name(1).jpg-style), similar in shape to the reproduction in #1426.

Happy to pull more detail from the full goroutine dumps (I have two, ~550KB each) or test a patch if one comes together — just didn't want to paste the whole thing here unprompted.