From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10433 invoked by alias); 11 Jul 2014 10:56:54 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 10407 invoked by uid 89); 11 Jul 2014 10:56:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mailhost.allinea.com Received: from mailhost.allinea.com (HELO mailhost.allinea.com) (94.125.131.203) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 11 Jul 2014 10:56:48 +0000 Received: from [192.168.0.193] (cpc10-sotn11-2-0-cust104.15-1.cable.virginm.net [82.19.61.105]) (Authenticated sender: cjanuary) by mailhost.allinea.com (Postfix) with ESMTPSA id 7AD95206EF0 for ; Fri, 11 Jul 2014 11:56:00 +0100 (BST) Message-ID: <1405076204.3524.8.camel@chris-xps13> Subject: catch signal does not appear multi-inferior safe From: Chris January To: gdb@sourceware.org Date: Fri, 11 Jul 2014 10:56:00 -0000 Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-07/txt/msg00012.txt.bz2 Hello, It appears to me that the 'catch signal' support in GDB is not multi-inferior safe. Combining the 'catch signal' command with the 'checkpoint' command, for example, results in an internal error: break-catch-sig.c:152: internal-error: signal_catchpoint_remove_location: Assertion `signal_catch_counts[iter] > 0' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) see the end of this e-mail for reproducer. When checkpointing / catching a fork signal_catchpoint_remove_location may be called twice in a row - once for the parent and once for the child. This causes signal_catch_counts to go below 0. I would like some advice on how to fix this problem as I am not sure what the correct fix is. Regards, Chris January - VP Engineering - Allinea Software Ltd. The problem can be reproduced using the following GDB commands - run GDB from gdb/testsuite/gdb.base: file checkpoint break main run catch signal SIGSEGV break 48 continue checkpoint