Re: Trouble with plpgsql on 7.4.6 - Mailing list pgsql-hackers

From D'Arcy J.M. Cain
Subject Re: Trouble with plpgsql on 7.4.6
Date
Msg-id 20041123072517.2f809079.darcy@druid.net
Whole thread Raw
In response to Re: Trouble with plpgsql on 7.4.6  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Trouble with plpgsql on 7.4.6  (Patrick Welche <prlw1@newn.cam.ac.uk>)
Re: Trouble with plpgsql on 7.4.6  ("D'Arcy J.M. Cain" <darcy@druid.net>)
List pgsql-hackers
On Sat, 20 Nov 2004 11:17:48 -0500
Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "D'Arcy J.M. Cain" <darcy@druid.net> writes:
> > I thought that this would have sent everything to both the log and
> > the screen but I found that the syslog has much more detail.  I have
> > attached that output.
> 
> We still need to look at the stderr output.  All this says is that
> you're getting repeated abort()s.  It's unlikely that anything would
> be coded to abort() without emitting any gripe at all --- but the
> gripe is not appearing in syslog output, so stderr is the next place
> to look.

The stderr was in the previous message.  No gripes there either other
than in the startup after the failure.

> Also see about getting a stack trace from one of the core dumps.

I did look at the core file and here is what I saw:

#0  0x483cafeb in kill () from /usr/lib/libc.so.12
#1  0x483cd0af in __libc_mutex_catchall_stub (m=1212478892)   at /usr/src/lib/libc/thread-stub/thread-stub.c:112
#2  0x4843f0f7 in free (ptr=<incomplete type>)   at /usr/src/lib/libc/stdlib/malloc.c:1149
#3  0x081b3efc in AllocSetDelete (context=<error type>) at aset.c:464
#4  0x081b468a in MemoryContextDelete (context=<error type>) at
#mcxt.c:192

In fact it is calling the thread stubs but the applicatino is threaded. 
At least, that's what I see from this code in NetBSD.

#define CHECK_NOT_THREADED_ALWAYS() \
do {                    \   if (__isthreaded)       \       DIE();          \
} while (/*CONSTCOND*/0)

#if 1
#define CHECK_NOT_THREADED()    CHECK_NOT_THREADED_ALWAYS()
#else
#define CHECK_NOT_THREADED()    /* nothing */
#endif 

I am going to follow up with the NetBSD team but I pass this on in case
it suggests anything.  Note that this still only causes problems on
7.4.6 and not under 7.4.3.

-- 
D'Arcy J.M. Cain <darcy@druid.net>         |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.


pgsql-hackers by date:

Previous
From: Bernd Helmle
Date:
Subject: Open thoughts about updateable views
Next
From: Mike Rylander
Date:
Subject: Re: patch: plpgsql - access records with rec.(expr)