Re: BUG #9464: PANIC with 'failed to re-find shared lock object' - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #9464: PANIC with 'failed to re-find shared lock object'
Date
Msg-id 31620.1394163148@sss.pgh.pa.us
Whole thread Raw
In response to BUG #9464: PANIC with 'failed to re-find shared lock object'  (petela@gocougs.wsu.edu)
Responses Re: BUG #9464: PANIC with 'failed to re-find shared lock object'  (Peter LaDow <petela@gocougs.wsu.edu>)
List pgsql-bugs
petela@gocougs.wsu.edu writes:
> We are upgrading from Postgresql 8.3.7 to 9.3.3, and we are getting a
> database crash due to a failure in a C extension.  In this extension we are
> trying to spawn an external program to run in the background.  We do this
> with double fork(), with the first child exiting cleanly, and the second
> child execing the program.

on_exit_reset() in the first-level child would likely be a good idea.
See atexit_callback in src/backend/storage/ipc/ipc.c: your first-level
child is killing all the parent backend's shared-memory state when it
does exit().  This is a safety feature we added at some point in the
past few years, but in your usage I guess its an anti-safety feature...

            regards, tom lane

pgsql-bugs by date:

Previous
From: Peter LaDow
Date:
Subject: Re: BUG #9464: PANIC with 'failed to re-find shared lock object'
Next
From: Peter LaDow
Date:
Subject: Re: BUG #9464: PANIC with 'failed to re-find shared lock object'