From owner-freebsd-bugs@FreeBSD.ORG Thu Dec 24 16:20:03 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AA911065679 for ; Thu, 24 Dec 2009 16:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C55738FC12 for ; Thu, 24 Dec 2009 16:20:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id nBOGK2bK063295 for ; Thu, 24 Dec 2009 16:20:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id nBOGK23t063294; Thu, 24 Dec 2009 16:20:02 GMT (envelope-from gnats) Resent-Date: Thu, 24 Dec 2009 16:20:02 GMT Resent-Message-Id: <200912241620.nBOGK23t063294@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, BERTRAND Joël Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2B4E1065694 for ; Thu, 24 Dec 2009 16:15:53 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 9272B8FC13 for ; Thu, 24 Dec 2009 16:15:53 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id nBOGFqZD085257 for ; Thu, 24 Dec 2009 16:15:52 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id nBOGFqgx085256; Thu, 24 Dec 2009 16:15:52 GMT (envelope-from nobody) Message-Id: <200912241615.nBOGFqgx085256@www.freebsd.org> Date: Thu, 24 Dec 2009 16:15:52 GMT From: BERTRAND Joël To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/141956: siginfo->si_pid null in signal handler X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Dec 2009 16:20:03 -0000 >Number: 141956 >Category: misc >Synopsis: siginfo->si_pid null in signal handler >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Dec 24 16:20:02 UTC 2009 >Closed-Date: >Last-Modified: >Originator: BERTRAND Joël >Release: 8.0-STABLE >Organization: >Environment: FreeBSD gauss.systella.fr 8.0-STABLE FreeBSD 8.0-STABLE #1: Mon Dec 7 15:46:01 CET 2009 root@gauss.systella.fr:/usr/obj/usr/src/sys/CUSTOM i386 >Description: RPL/2 (http://www.rpl2.net) enters in deadlock when I try to quit application with ABORT intrinsic. I have written some test code and I find that the following code void interruption5(int signal, siginfo_t *siginfo, void *context) { pthread_t thread; struct_processus *s_etat_processus; verrouillage_gestionnaire_signaux(); uprintf("<1> %d %d\n", (*siginfo).si_pid, getpid()); // uprintf is a macro defined by fprintf(stderr, ...) exit(0); ... } // from src/interruptions.c prints : gauss:[~/rpl/build/src] > ./rpl -is +++RPL/2 (R) version 4.0.8 (Thursday 12/24/09, 16:54:22 CET) +++Copyright (C) 1989 à 2008, 2009 BERTRAND Joël +++Ce logiciel est un logiciel libre sans aucune garantie de fonctionnement. +++Pour plus de détails, utilisez la commande 'warranty'. RPL/2> abort <1> 0 32877 gauss:[~/rpl/build/src] > In this case, I have to see : <1> 32877 32877 because calling process is in my case 32877 and cannot be null. RPL/2 uses this value to send a signal to a specified thread. As this value is always null, signal cannot be processed. Of course, signal handler specification is : action.sa_sigaction = interruption5; action.sa_flags = SA_NODEFER | SA_ONSTACK | SA_SIGINFO; // from src/rpl.c thus siginfo->si_pid has to be filled. >How-To-Repeat: Build RPL/2 and try to quit application with ABORT. The same program worked fine with FreeBSD 7.x (and with NetBSD, Linux, Solaris...). >Fix: >Release-Note: >Audit-Trail: >Unformatted: