Re: Need help debugging SIGBUS crashes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tomas Vondra <tomas(at)vondra(dot)me>
Cc: "Peter 'PMc' Much" <pmc(at)citylink(dot)dinoex(dot)sub(dot)org>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Need help debugging SIGBUS crashes
Date: 2026-03-17 14:12:07
Message-ID: 392255.1773756727@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tomas Vondra <tomas(at)vondra(dot)me> writes:
> On 3/17/26 13:17, Peter 'PMc' Much wrote:
>> So I am now quite clueless on how to proceed further, and could
>> really use some educated inspiration. I can not even say if this is
>> a postgres issue or a FreeBSD issue (but it doesn't happen to any
>> other program).

> I agree it's hard to deduce anything from the backtraces with the
> interesting bits optimized out. Rebuilding the OS with -O0 might be an
> overkill, I'd probably start by building just Postgres. That'd at least
> give us some idea what happens there, you could inspect the memory
> context etc.

What I'm seeing is that malloc's internal data structures are already
corrupt during startup of an autovacuum worker. I think the most
likely theory is that this somehow traces to our old habit of
launching postmaster child processes from a signal handler, something
that violates the spirit and probably the letter of POSIX, and which
we can clearly see was being done here. But we got rid of that in PG
v16, so if I were Peter my first move would be to upgrade to something
later than 15.x.

Why it was okay in older FreeBSD and not so much in v14, who knows?
But the FreeBSD guys will almost certainly wash their hands of the
matter the moment they see this stack trace. I don't think there's
a lot of point in digging deeper unless it still reproduces with
a newer Postgres.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2026-03-17 14:17:02 Re: pg_stat_io_histogram
Previous Message Bruce Momjian 2026-03-17 14:11:20 Re: Read-only connection mode for AI workflows.