Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc> writes:
> FWIW - I removed --with-tcl from quagga's configuration about two weeks
> ago and it has not failed(for that reason) again. So the issue most
> definitly looks like plptcl related ...
I poked around a bit in the Tcl sources, and as far as I can tell it
will never call atexit() on a Linux platform. So that theory isn't
right. However, what I found out via strace'ing is that on my own
Linux machine, Tcl launches a second thread as soon as it's loaded.
This thread just does a select() and sits there. I am not certain
but I think it must be the "notifier" facility seen in the Tcl sources.
What seems likely to me is that the "child process" we see in your ps
output is actually this notifier thread (can you confirm that it's a
thread via additional ps arguments?), and that for some reason the
shutdown of the notifier isn't working right, or maybe the notifier
is dying for some reason and then the main thread can't exit because
it expects the notifier to respond.
Can you "strace -f" the Tcl test and see what happens? The
way I did it was
createlang pltcl pl_regression
-- in another window, identify PID of connected backend, then
strace -f -p PID 2>strace.out
psql> \i .../pltcl_setup.sql
psql> \i .../pltcl_queries.sql
One possibility for fixing it is that maybe we should be making an
effort to execute Tcl_Finalize() before exiting the backend. If so,
having pltcl set up an on_proc_exit callback to do it would be the
appropriate thing. This is all speculation though.
regards, tom lane
In response to
pgsql-hackers by date
|Next:||From: Peter Eisentraut||Date: 2007-01-28 21:22:12|
|Subject: Re: docbook question: how to center cell in tables ?|
|Previous:||From: Richard Troy||Date: 2007-01-28 20:44:46|
|Subject: Re: DROP FUNCTION failure: cache lookup failed for relation|