From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1422 invoked by alias); 22 Jun 2004 21:51:00 -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 1406 invoked from network); 22 Jun 2004 21:50:59 -0000 Received: from unknown (HELO Cantor.suse.de) (195.135.220.2) by sourceware.org with SMTP; 22 Jun 2004 21:50:59 -0000 Received: from hermes.suse.de (hermes-ext.suse.de [195.135.221.8]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by Cantor.suse.de (Postfix) with ESMTP id 7B670784631 for ; Tue, 22 Jun 2004 23:50:59 +0200 (CEST) Date: Tue, 22 Jun 2004 21:51:00 -0000 From: Thorsten Kukuk To: libc-hacker@sources.redhat.com Subject: deadlock in signal handler with NPTL Message-ID: <20040622215059.GA1204@suse.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="vtzGhvizbBRQ85DL" Content-Disposition: inline Organization: SuSE Linux AG, Nuernberg, Germany User-Agent: Mutt/1.5.6i X-SW-Source: 2004-06/txt/msg00043.txt.bz2 --vtzGhvizbBRQ85DL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 612 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. The problem is: This program deadlocks very fast in a FUTEX_WAIT call. This does not happen with LinuxThreads. Any ideas what goes wrong? Thorsten -- Thorsten Kukuk http://www.suse.de/~kukuk/ kukuk@suse.de SuSE Linux AG Maxfeldstr. 5 D-90409 Nuernberg -------------------------------------------------------------------- Key fingerprint = A368 676B 5E1B 3E46 CFCE 2D97 F8FD 4E23 56C6 FB4B --vtzGhvizbBRQ85DL Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="s.c" Content-length: 574 #include #include #include #include #include void handler(int sig) { syslog(LOG_DEBUG, "sigtest"); printf("in handler\n"); fflush(stdout); } int main(int argc, char *argv[]) { pid_t pid; switch (pid = fork()) { case 0: break; case -1: perror("form"); exit(1); default: signaller(pid); exit(0); } signal(SIGCHLD, handler); while (1) { syslog(LOG_DEBUG, "test"); printf("in loop\n"); fflush(stdout); } } int signaller(pid_t pid) { while (1) { usleep(1); kill(pid, SIGCHLD); } } --vtzGhvizbBRQ85DL--