pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: award@dominionsciences.com
Cc: pgsql-admin@postgresql.org
Subject: Re: syslog enabled causes random hangs?
Date: Wed, 30 Jul 2003 13:23:11 -0400
Message-ID: <15873.1059585791@sss.pgh.pa.us> (raw)
In-Reply-To: <12218.68.62.129.152.1059584549.squirrel@www.dominionsciences.com>
References: <65332.68.62.130.132.1059516822.squirrel@www.dominionsciences.com>
	<5212.1059519400@sss.pgh.pa.us>
	<65117.68.62.130.132.1059521610.squirrel@www.dominionsciences.com>
	<9132.1059572489@sss.pgh.pa.us>
	<12218.68.62.129.152.1059584549.squirrel@www.dominionsciences.com>

award@dominionsciences.com writes:
> Neither of those make a whole lot of sense to me, though:
> 1. The Postgresql backend shouldn't be getting any signals (at least none
> external to Postgresql).

Hm.  Postgres does sometimes issue elog messages from inside a signal
handler.  I doubt that it would do so while interrupting a non-interrupt
elog issuance, but wouldn't swear to it.

> 2. Postgresql doesn't use threads, right? That occurred to me this
> morning, and I'm a little disturbed by the appearance of libpthread in the
> backtrace.

Postgres doesn't, but that doesn't mean that your glibc wouldn't
internally assume that it might be in a threaded app.  See the recent
flamewar about threaded vs unthreaded libc in pgsql-hackers.

It's really too bad that your gdb backtrace didn't show anything past
the write_syslog level (which is an elog subroutine).  If we could see
whether the elog had been issued from a signal handler, and if so what
it had interrupted, we'd have an idea whether this is a known syslog
deficiency or not.  Do you want to rebuild with debug symbols and try
the backtrace again?

> The disgusting thing is that all the mail threads I've followed either
> dead-end, or mention creating a signal-safe and/or thread-safe wrapper
> around syslog inside to the calling application. Yuck!

Agreed, but we might be looking at needing to do that in Postgres, if
this turns out to be something that the glibc boys know about and won't
fix.

			regards, tom lane



view thread (14+ messages)  latest in thread

Message-ID: <15873.1059585791@sss.pgh.pa.us>
Permalink:  ../15873.1059585791@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/15873.1059585791@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, award@dominionsciences.com
  Subject: Re: syslog enabled causes random hangs?
  In-Reply-To: <15873.1059585791@sss.pgh.pa.us>
  References: <65332.68.62.130.132.1059516822.squirrel@www.dominionsciences.com> <5212.1059519400@sss.pgh.pa.us> <65117.68.62.130.132.1059521610.squirrel@www.dominionsciences.com> <9132.1059572489@sss.pgh.pa.us> <12218.68.62.129.152.1059584549.squirrel@www.dominionsciences.com> <15873.1059585791@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox