X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 846D8D1C4B7 for ; Wed, 30 Jul 2003 17:23:16 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 75628-01 for ; Wed, 30 Jul 2003 14:22:15 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 642D2D1C4D5 for ; Wed, 30 Jul 2003 14:23:15 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h6UHNBQ3015874; Wed, 30 Jul 2003 13:23:11 -0400 (EDT) To: award@dominionsciences.com Cc: pgsql-admin@postgresql.org Subject: Re: syslog enabled causes random hangs? 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> Comments: In-reply-to award@dominionsciences.com message dated "Wed, 30 Jul 2003 12:02:29 -0500" Date: Wed, 30 Jul 2003 13:23:11 -0400 Message-ID: <15873.1059585791@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/342 X-Sequence-Number: 9682 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