macOS Ventura won't generate core dumps

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: macOS Ventura won't generate core dumps
Date: 2024-04-09 17:35:51
Message-ID: CA+TgmobW9bEuvSrQR1D1K6_8=DmY2tzkuepAjCWF=j4B1w0rWw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At least not for me. According to various things I found on the
Internet, it's now required that you codesign your binaries and give
them an entitlement in order to generate core dumps:

https://nasa.github.io/trick/howto_guides/How-to-dump-core-file-on-MacOS.html

But according to previous on-list discussion, code-signing a binary
means that DYLD_* will be ignored:

http://postgr.es/m/920451.1634265967@sss.pgh.pa.us

Now, if DYLD_* is ignored, then our regression tests won't work
properly. But if core dumps are not enabled, then how am I supposed to
debug things that can only be debugged with a core dump?

Unless I'm missing something, this is positively rage-inducing. It's
reasonable, on Apple's part, to want to install more secure defaults,
but having no practical way of overriding the defaults is not
reasonable. And by "practical," I mean ideally (a) doesn't require a
macOS-specific patch to the PostgreSQL source repository but at least
(b) can be done somehow without breaking other important things that
also need to work.

Anyone have any ideas?

--
Robert Haas
EDB: http://www.enterprisedb.com

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2024-04-09 17:48:34 Re: macOS Ventura won't generate core dumps
Previous Message Alvaro Herrera 2024-04-09 17:29:03 Re: Can't find not null constraint, but \d+ shows that