From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26751 invoked by alias); 23 Jun 2004 04:41:51 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 26733 invoked from network); 23 Jun 2004 04:41:51 -0000 Received: from unknown (HELO e4.ny.us.ibm.com) (32.97.182.104) by sourceware.org with SMTP; 23 Jun 2004 04:41:51 -0000 Received: from northrelay02.pok.ibm.com (northrelay02.pok.ibm.com [9.56.224.150]) by e4.ny.us.ibm.com (8.12.10/8.12.2) with ESMTP id i5N4fdgA880968; Wed, 23 Jun 2004 00:41:40 -0400 Received: from d27mc103.rchland.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by northrelay02.pok.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i5N4glMT065900; Wed, 23 Jun 2004 00:42:48 -0400 In-Reply-To: <20040623042256.GA6177@suse.de> Subject: Re: deadlock in signal handler with NPTL To: Thorsten Kukuk Cc: Jakub Jelinek , libc-hacker@sources.redhat.com Message-ID: From: Steve Munroe Date: Wed, 23 Jun 2004 04:41:00 -0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII X-SW-Source: 2004-06/txt/msg00046.txt.bz2 Thorsten Kukuk wrote on 06/22/2004 11:22:56 PM: > On Tue, Jun 22, Jakub Jelinek wrote: > > > On Tue, Jun 22, 2004 at 11:50:59PM +0200, Thorsten Kukuk wrote: > > > > > > Hi, > > > > > > I got the following test program. I know, it is very ugly and there > > > are a lot of things somebody should not do, but this is something > > > what programs like sshd are doing. > > > > Then they should be fixed. Neither syslog, nor printf, nor fflush > > are supposed to be async-signal safe, nor they actually are in glibc. > > Yes, but the problem is: Nearly every daemon on a Linux system is > calling syslog() in a signal handler and it seems to be very easy > to deadlock them on every Linux system running glibc/NPTL. While > there seems to be no other system with the same problem. > Then what has change from glibc-2.3.3 (RHEL 3) until now? Because I have not seen this problem before. I have reviewed all the changes to lowlevellock.h since and I do not see any change that would effect this. In fact your test case should show that same hang there. Have the daemon's changed recently to add the syslog() call to the signal handler? Steven J. Munroe Linux on Power Toolchain Architect IBM Corporation, Linux Technology Center