`supabase/postgres:17.6.1.105` (amd64) — backend SIGSEGV during a heavy pgTAP file, CI-CPU-specific
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 30/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Attiva
- Stack tecnologico
- docker, github-actions, postgresql
- Ambito
- ci-cd, databases, testing-qa
Direzione di ricerca
Inizia eseguendo il file pgTAP completo e autonomo su public.ecr.aws/supabase/postgres:17.6.1.105, su un runner amd64 di GitHub Actions con supporto AVX-512 e con le impostazioni PGOPTIONS indicate. Raccogli i dati lscpu del runner e un backend core o backtrace, quindi determina se il problema è legato alla build dell’immagine o al percorso di dispatch. Il lavoro è completo quando viene confermato un errore oppure viene ottenuto un caso ridotto riproducibile con una mitigazione documentata.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
The amd64 public.ecr.aws/supabase/postgres:17.6.1.105 image deterministically SIGSEGVs a backend process (signal 11) while running one large single-transaction pgTAP test file — but only on GitHub Actions ubuntu-latest runners. The byte-identical image on a local amd64 workstation (Intel i7-8850H, AVX2) runs the same file cleanly every time, and our aarch64 production build is unaffected. This points to a CPU-microarchitecture-dependent code path in the amd64 17.6.1.105 build (the runner CPU is AVX-512-capable; our local CPU is not — AVX-512 is our leading hypothesis but is not core-dump-confirmed).
Environment
| Image / build | CPU | Result | |
|---|---|---|---|
GitHub Actions ubuntu-latest |
public.ecr.aws/supabase/postgres:17.6.1.105 (amd64) |
AVX-512-capable x86_64 (Xeon/EPYC-class) | SIGSEGV, 6/6 runs |
| Local workstation | same image (amd64) | Intel i7-8850H (AVX2, no AVX-512) | clean, every run |
| Supabase production | aarch64 build — PostgreSQL 17.6 on aarch64-unknown-linux-gnu |
ARM64 | clean |
- Local
version():PostgreSQL 17.6 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 15.2.0, 64-bit - Invocation:
docker exec -i supabase_db_<project> psql -U postgres -d postgres -v ON_ERROR_STOP=1 < <file>.sql(Supabase CLI local stack; the file runs inside oneBEGIN … ROLLBACK).
Observed behavior
A single pgTAP file (plan(363), ~4300 lines, one long transaction in one backend) crashes the backend mid-run:
LOG: server process (PID …) was terminated by signal 11: Segmentation fault
LOG: terminating any other active server connections
… database system is in recovery mode
The cluster then enters recovery and takes down the sibling test files running after it.
What it is NOT (ruled out with evidence)
- Not OOM — signal 11 (not 9);
dmesgis empty; adding swap did not help. - Not JIT —
jit=offset per-connection viaPGOPTIONS(verified active viaSHOW jit); still crashed. - Not the outer plan shape — forcing plans with GUCs (
enable_bitmapscan/hashagg/hashjoin=off,max_parallel_workers_per_gather=0) did not change the crash. - Not the SQL of the crashing statement — the crash lands on a statement (
SELECT * FROM a SECURITY DEFINER SETOF-uuid helper) invoked by a role whoseEXECUTEon that function is revoked, so it errors42501at the ACL check before the function body runs. The identical call by a privileged role earlier in the same file (and the same query shape ~17× before) runs clean. So the fault is not inside that function's execution — it is a delayed manifestation of state accumulated earlier in the backend.
The accumulation that appears to trigger it
The file, in one long-lived backend, builds up an unusually heavy load before the crash: hundreds of set_eq / EXCEPT-based pgTAP assertions (each materializing temp result sets), a BYPASSRLS role, and repeated trigger DDL / RLS-policy evaluation, all in one transaction. The corruption seems laid down by that accumulation and surfaces one statement later. On a fresh backend (e.g. splitting the file so the tail runs in its own psql/backend) the crash locus changes — consistent with private-backend-memory corruption rather than a specific query.
Reproduction
The full test file is self-contained pgTAP and reproduces 6/6 on an AVX-512-capable amd64 runner. We do not yet have a reduced repro (bisecting requires iterating on the AVX-512 hardware, which we only have via CI). We can share the full file privately, or work with you on a minimal case. To attempt repro:
supabase start(or runpublic.ecr.aws/supabase/postgres:17.6.1.105directly) on an AVX-512-capable amd64 host.- Apply a schema with RLS + a
SECURITY DEFINERset-returning helper, then run a long single-transaction pgTAP file that accumulates several hundredset_eq/EXCEPTassertions + aBYPASSRLSrole + trigger DDL. - Observe the backend SIGSEGV partway through.
A build compiled -O2 with CPU-dispatched SIMD (or a gcc 15.2.0 codegen issue on AVX-512) is the working hypothesis; a backtrace/core from the crashing backend on the runner would confirm the faulting routine.
Impact & current workaround
- We have quarantined the one file from CI and gated it locally on AVX2; all other tests pass. No production impact — production is aarch64 (a different build with no x86 SIMD path), and the helper executes correctly there.
- Asking here because it is your image build: a fix in the amd64 17.6.1.x build would let everyone re-enable such tests on standard CI runners.
Questions
- Is a SIGSEGV in the
17.6.1.105amd64 build on AVX-512 hardware a known issue? - Any recommended mitigation short of pinning an older/newer 17.x image (a build flag, a disabled dispatch path)?
- Would a full repro file + a runner
lscpube useful, or do you want a reduced case first?
- Lingua principale
- Nix
- Stelle
- 1.8k
- Fork
- 267
- Merge medio
- 1g 20h
- PR unite (30g)
- 32
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di supabase/postgres
-
CREATE EXTENSION pgmq fails in Postgres 17.6.1.016+ due to function overload handling bug in after-create scriptForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
supabase/postgres#1867 · 14 commenti · 2 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
supabase/postgres#1586 · 1 commento · 2 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
supabase_auth_admin can CREATE rolesForse già presa @jaysomani l’ha presa 44 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
supabase/postgres#1518 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di supabase/postgres
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
influxdata/helm-charts#856 ·
I maintainer di solito rispondono entro 5 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 69/100
postmanlabs/newman#3388 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
coollabsio/coolify#12094 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[quality] e2e coverage failure reports say 'run null; status unknown' for every error raised after the manifest is readForse già presa @hivecommons-hive l’ha presa oggi. Apertaagent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5n31 quality testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
cncf/endusers#1069 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[aw] Upgrade availableApertaagentic-workflows untriaged
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno