Re: Need help debugging SIGBUS crashes - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: Need help debugging SIGBUS crashes
Date
Msg-id 33d99d2f-4020-4615-9314-2f1a19927fa6@vondra.me
Whole thread Raw
In response to Need help debugging SIGBUS crashes  ("Peter 'PMc' Much" <pmc@citylink.dinoex.sub.org>)
Responses Re: Need help debugging SIGBUS crashes
Re: Need help debugging SIGBUS crashes
Re: Need help debugging SIGBUS crashes
List pgsql-hackers
On 3/17/26 13:17, Peter 'PMc' Much wrote:
> ...
> 
> The backtrace is disgusting - all interesting things are optimized
> away. :( 
> 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 could probably rebuild the OS with -O0 - but is
> this the best way to proceed?
> (Filing a bug report against FreeBSD without specific reproduction
> info would most likely just mean that it stays on my desk anyway.)
> 

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.

I'm not a FreeBSD expert, but this seems a bit suspicious:

    frame #23: 0x0000000822ae79b6
libthr.so.3`handle_signal(actp=0x0000000820c5c600, sig=30,
info=0x0000000820c5c9f0, ucp=0x0000000820c5c680) at thr_sig.c:318:3
    frame #24: 0x0000000822ae6eba libthr.so.3`thr_sighandler(sig=30,
info=0x0000000820c5c9f0, _ucp=0x0000000820c5c680) at thr_sig.c:261:2

I mean, libthr seems to be a 1:1 with pthreads. Are you using threads in
some way? Perhaps an extension using threads? That could cause weird
failures, including weird SIGBUS ones.


regards

-- 
Tomas Vondra




pgsql-hackers by date:

Previous
From: torikoshia
Date:
Subject: Re: RFC: Allow EXPLAIN to Output Page Fault Information
Next
From: Robert Haas
Date:
Subject: Re: pg_plan_advice