OS X loader failure (was Re: Beta2 - A Late Announcement)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Adam Witney <awitney(at)sghms(dot)ac(dot)uk>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: OS X loader failure (was Re: Beta2 - A Late Announcement)
Date: 2002-10-01 05:15:10
Message-ID: 18795.1033449310@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-announce pgsql-general

Adam Witney <awitney(at)sghms(dot)ac(dot)uk> writes:
> [ bad shared library causes backend coredump on OS X ]

This patch seems to suppress the coredump:

http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/port/dynloader/darwin.c.diff?r1=1.5&r2=1.6

However, instead of a somewhat-useful error message on postmaster
stderr, you now get only "no message available". This sucks :-(.
Apparently, asking not to crash overrides the default error handler
that prints the useful error message before crashing.

I applied the patch anyway, since a backend crash is considerably more
Not Acceptable than not telling you why the shlib can't be loaded.
But getting the error message too would be much better. Apparently,
if we want the message too, we have to create a 'linkEdit' hook to print
it --- see
http://developer.apple.com/techpubs/macosx/DeveloperTools/MachORuntime/5rt_api_reference/_Object_Fil_e_Functions.html
for some pointers.

Any OSX users care to code up the error-printing routine?

regards, tom lane

In response to

Browse pgsql-announce by date

  From Date Subject
Next Message Justin Clift 2002-10-02 00:34:49 New PostgreSQL Website : advocacy.postgresql.org
Previous Message Adam Witney 2002-09-30 15:08:29 Re: Beta2 - A Late Announcement

Browse pgsql-general by date

  From Date Subject
Next Message Yury Bokhoncovich 2002-10-01 07:27:27 Re: 7.0 -> 7.2 Migration (oops)
Previous Message Jeff Davis 2002-10-01 00:53:43 Re: composite types in 7.3