From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id czhuFlR9V2VojggAWB0awg (envelope-from ) for ; Fri, 17 Nov 2023 09:48:52 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.a=rsa-sha256 header.s=corp-2023-03-30 header.b=P0I7uBl1; dkim=pass (1024-bit key; unprotected) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-oracle-onmicrosoft-com header.b=WxJUETLQ; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 503D91E0D2; Fri, 17 Nov 2023 09:48:52 -0500 (EST) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id B71D61E091 for ; Fri, 17 Nov 2023 09:48:49 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 65EA63857BA7 for ; Fri, 17 Nov 2023 14:48:49 +0000 (GMT) Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by sourceware.org (Postfix) with ESMTPS id 37FCD3858D20 for ; Fri, 17 Nov 2023 14:48:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 37FCD3858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=oracle.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=oracle.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 37FCD3858D20 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=205.220.165.32 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1700232517; cv=pass; b=bO+jSEZlEZt/MNSserJb8RBjLzIUnxE5/YOxGO9DBhlVznyJmhDsXRS8CZAE4Q1FmANlMOi5G/i4Z/ZzT4Y2KP2cy6gOaGFFGqk/q8QWvsYSPWXtFfm/j+smbWOEJtsktBARv2UgUDrSoX5FJXF5sCH4hRZTCSbxV5QSbR7qLaQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1700232517; c=relaxed/simple; bh=rbBHj9bnQf6TfUeNG2AS/4Yobi0YNrQJDkVUp+w8A1I=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:Subject:To:From: MIME-Version; b=mJt6hGDnFhgldRTIVW4xjLP3F85B+XllTzmEDsqJel3cG88bnLqcadTJA2Z5CG3q4CLkCobpqN/X4Pgr2HOnVqdpNptVbme8bRKonxgEm7UvEB4Jzev14D6C0HqI56wDifa40sGA7ojh80IUJLJKII8n0fghR9wociwPxLfqNwI= ARC-Authentication-Results: i=2; server2.sourceware.org Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AHEDXdE012725; Fri, 17 Nov 2023 14:48:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : subject : to : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2023-03-30; bh=Wo/gLBmid/lYJ8zGlLGwan0mFyQDslxu2PaK+hh5Em8=; b=P0I7uBl1CqGcE46rTW+kt2Gwct5D3qZ4CKy+JZplaePSUdmDnRuxOZtDPiTT37hfnxl+ 2tR2wXWmGuEuLdrGuhKj9U2Wzzc7c+Uy1OHxfBqhN1pANVv8yhSnoSrp8LqWzSpjIvzw h+c9qkK+dPB2LGrBfZKBMxbdLVn2/fMdglrLnUQ8rb+WN6HIkwPcPVRt2DyPPYGzSXUq bcVt1T7YS0Urq/gqE3gRqpmGGJO0YD/qZmSHnDiWh9aknmtrNwMBMoj7J70nuqhPYTD8 8in/TaCfDKv1OORSxH0qkej4cjtcPGyWjVP2DXF73+Baiz1R3fiLSEezjOzDxQQijXlf 7Q== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ua2m2nh6p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 17 Nov 2023 14:48:30 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3AHDnGaU038533; Fri, 17 Nov 2023 14:48:28 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2101.outbound.protection.outlook.com [104.47.55.101]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3uaxj7d38x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 17 Nov 2023 14:48:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bV6BG0zb9mrKuyuta0ADRpuic59ZlOE6z3cNDIAtdtusR9O9QNHbQ/FcELKN86WHUuIzxibNBPmeDTaL97lWR488eVdpyqioDNWF2GrNSOHKWNs0wBibTWT6QBtDSP3jo5COGUprWOBzhnsoLNIhXTE47E42t/sBI9EdHPIiWhdp8OFJFJV4wHDR0XOUydzJ7ThT1hdyAbohhdREn78ClFM8QgRXUnxHx2GbhtlpKW2zT3JKYWmwEr+I7tgeG8CpRJPpywnq5+u7EEQqHci6yqch+fkQllcTO0GXpAfy9OUMbSHO6l1/eMfPaERF1cLYc8ORKb6qxQEXvWONHXyAsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Wo/gLBmid/lYJ8zGlLGwan0mFyQDslxu2PaK+hh5Em8=; b=fv9IfSHNB6J9LWrB6f6p/gJfIbO7YYMpofaCiBkrmzVBYiX7x9BPJr0uO6M4dPBg68aohR3bhHLziQIYZ1oRnZ7LOMPvAnl4bQchuouG0kLHwdTJSMvLIze1sSSAzzpHXYvgn6Ofsri8ggnU6ilQwx64P8AuiUhEKpPGqTAty9IzkodjK9yEmiJ8Z62qG92PSIwb/bVntN9Ll4w1aGW9WGlD4SA0OIqV80lznaKDc6HOvK7JXX8JIqQaHJT3KlGYsDOaM6Y2hB033s5q8asPyR7y7EFD76UMUlbiF7Cf3QRHcRporbaLWVnW+z3sNy74oNlBhPEm3rold0a/QZ2VZQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Wo/gLBmid/lYJ8zGlLGwan0mFyQDslxu2PaK+hh5Em8=; b=WxJUETLQ+bJPiK9RQfDfCY4G4LDc3d4nHNrFLrt5SQvOjw00XwG5at1fC/MRbmW1qI8bvmt7BSxQjSlmth0KTCP6BSBKzfhO2CjUF/75uWG4vx4+pnSPxh0pUMt/kyFG3C50zS998l1QmTYqz3IExp63fw/jTa4fUe/pPb0uUzg= Received: from DS7PR10MB4861.namprd10.prod.outlook.com (2603:10b6:5:3a7::15) by SJ0PR10MB4784.namprd10.prod.outlook.com (2603:10b6:a03:2d4::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6977.31; Fri, 17 Nov 2023 14:48:25 +0000 Received: from DS7PR10MB4861.namprd10.prod.outlook.com ([fe80::58f4:c345:fcad:7b48]) by DS7PR10MB4861.namprd10.prod.outlook.com ([fe80::58f4:c345:fcad:7b48%4]) with mapi id 15.20.7002.022; Fri, 17 Nov 2023 14:48:24 +0000 Message-ID: Date: Fri, 17 Nov 2023 20:18:18 +0530 User-Agent: Mozilla Thunderbird Subject: Re: [External] : Re: [PATCH v3] gdb : Signal to pstack/gdb kills the attached process. Content-Language: en-US To: Guinevere Larsen , gdb-patches@sourceware.org, bert.barbe@oracle.com, rajesh.sivaramasubramaniom@oracle.com References: <123ee8d6-e6da-4227-ac7a-27d22041c20e@oracle.com> From: Partha Satapathy Organization: Oracle Corporation In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: TYWP286CA0031.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:262::19) To DS7PR10MB4861.namprd10.prod.outlook.com (2603:10b6:5:3a7::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS7PR10MB4861:EE_|SJ0PR10MB4784:EE_ X-MS-Office365-Filtering-Correlation-Id: ba38bcc2-4b91-418b-d9ac-08dbe77c3ff9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jbr/LbQawtZq3SEDg2yyAU1GfjUFZmktJLbLuxBNaQXxKP2kPiJiCB0UZI/qli/61R0Ir0TyeqJ4qZdFl8dreyTdpUV9HgP68o5vUsmjiGLcb+JTHRSz9l/7G4ODJmqNGLAxiO0jNWmDkkFc4LmefPAfso+8C9xrFss7G7RL1fYqtVHYX8noRdsXI4cIjp6ivg9u+2srKfC2K00ZUFrBAGjs1E3gjQegCTpsikJyHZtWTdeNdbEBbkrcXx9WJuTBZIthW5NldksWbNAdwvwICdSffDmubmWtvy6QaCA+jCO27KPPM8KljSkH5A00AOLcT4xumoMwWTzmR6M/0qun0HSgyxCAki/Bx2AXYQ9blJHvkGwtRG+LO2Otb+XumuiEu7Rb/XKeMWRf2FJl6KzmPLyAq0reIU6WF5ZJA9pUn0RYEEXgrdlyQXaqnehDw8EFhmNNfvlFL6vstr3OxLpMdzaBqfr8NFKT1QItdal2kBhr+Nk6FmNzr9wlgJMQje6T+WQkaBsCpI18UMjDD+2BDD42/rDj0zqUZYVej7AwJSZr0RnpYAgBo74lfJHLlcjcwDldrkSc8S29P2ywca8y4adYis0SOiHXGf5l+pVDZo4NX5yxtRB6rVJ/AZbewE2ZFoV1UAi/neuxozsOFiL75g== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS7PR10MB4861.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(136003)(366004)(376002)(396003)(39860400002)(346002)(230922051799003)(64100799003)(186009)(451199024)(1800799009)(2906002)(8936002)(316002)(66946007)(66476007)(66556008)(6636002)(8676002)(41300700001)(30864003)(44832011)(5660300002)(83380400001)(2616005)(86362001)(26005)(38100700002)(31696002)(478600001)(6486002)(36756003)(6666004)(6512007)(36916002)(6506007)(31686004)(53546011)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?L3Y4aTVta2dYRTFwWkFMdUxmRTF1TjdQR2pxOVB1MTc4cUdiUFJKN2NVSXlH?= =?utf-8?B?eGFZRlB5a0l5aDNMaklOZWVHRGN5aEtGRnA2VitkUEtCNDdIckV0b3ljbm9K?= =?utf-8?B?VFZWVlpSWVRSNFFPbGMzQktEa2t4ZkM1djU5MkpYN0lWY0Y2YXVhd3h4MEFu?= =?utf-8?B?Tmp0clJCRUZIV01Nb3ZkbnVDVUNVVWRpSWdTdXArVFVvUVN2cUJnYnlpa1RN?= =?utf-8?B?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3ueBVmVDk8hdnvpY= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: ba38bcc2-4b91-418b-d9ac-08dbe77c3ff9 X-MS-Exchange-CrossTenant-AuthSource: DS7PR10MB4861.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Nov 2023 14:48:24.5070 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 78ENOqs0vd0sVWUgiQURjw1OyyOJc3FE/yG1M5wGToitWY7mLpa8YTWEJSiuDEM2ikqddgB7OCFxi//fGMVa8Uki/KeXTmZtPA1b52M2WBI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB4784 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-17_13,2023-11-17_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 adultscore=0 mlxlogscore=999 mlxscore=0 malwarescore=0 phishscore=0 suspectscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311170110 X-Proofpoint-GUID: L01mTFVIbFqajQoPF8reeV0Jesd1KRFH X-Proofpoint-ORIG-GUID: L01mTFVIbFqajQoPF8reeV0Jesd1KRFH X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org On 11/6/2023 7:08 PM, Guinevere Larsen wrote: > On 02/11/2023 19:27, Partha Satapathy wrote: >> On 11/2/2023 11:54 PM, Partha Satapathy wrote: >>> On 10/25/2023 9:24 PM, Guinevere Larsen wrote: >>>> Hi! >>>> >>>> Thanks for working on this issue, and sorry about the delay in >>>> getting this reviewed. For future reference, we (at least I) tend to >>>> try and go for patches with many pings, so it is better to ping >>>> existing patches than re-sending them :) >>> >>> I some how missed this mail, hence a delay in reply. >>> I sorry for this and unfortunately have made the mistake once again. >>> Hope the extra threads can be deleted and I will keep my discussion >>> bound to this thread. >>> >>>> >>>> I'm not very knowledgeable on how GDB does signal handling, so I'm >>>> going to review this patch at face value. I hope someone who does >>>> know how this part works gets a look at this soon! >>>> >>>> On 16/10/2023 11:28, Partha Satapathy wrote: >>>>> Problem : >>>>> While gdb attaching a target, If ctrl-c pressed in the midst of the >>>>> process attach,  the sigint is passed to the debugged process. This >>>>> triggers exit of the debugged. >>>>> >>>>> Let’s take the example of pstack,  which dumps the stack of all >>>>> threads in a process. In some cases printing of stack can take >>>>> significant time and ctrl-c is pressed to abort pstack/gdb >>>>> application. This in turn kills the debugged process, which can be >>>>> critical for the system. In this case the intention of “ctrl+c” to >>>>> kill pstack/gdb, but not the target application. >>>>> >>>>> Reproduction: >>>>> >>>>> The debugged application generally attached to process by: >>>>> gdb -p <> >>>>> or gdb /proc/<>/exe pid >>>>> pstack uses the latter  method to attach the debugged to gdb. If >>>>> the application is large or process of reading symbols is slow, >>>>> gives a good window to press the ctrl+c during attach. Spawning >>>>> "gdb" under "strace -k" makes gdb a lot slower and gives a larger >>>>> window to easily press the >>>>> ctrl+c at the precise period i.e. during the attach of the debugged >>>>> process. The above strace hack will enhance rate of reproduction of >>>>> the issue. Testcase: >>>>> >>>>> With GDB 13.1 >>>>> ps aux | grep abrtd >>>>> root     2195168   /usr/sbin/abrtd -d -s >>>>> >>>>> #strace -k -o log gdb -p 2195168 >>>>> Attaching to process 2195168 >>>>> [New LWP 2195177] >>>>> [New LWP 2195179] >>>>> ^C[Thread debugging using libthread_db enabled] >>>>> <<<<   Note the ctrl+c is pressed after attach is initiated and it’s >>>>> still reading the symbols from library >>>> Using host libthread_db >>>>> library "/lib64/libthread_db.so.1". >>>>> 0x00007fe3ed6d70d1 in poll () from /lib64/libc.so.6 >>>>> (gdb) q >>>>> A debugging session is active. >>>>>           Inferior 1 [process 2195168] will be detached Quit >>>>> anyway? (y or n) y Detaching from program: /usr/sbin/abrtd, process >>>>> 2195168 >>>>> >>>>> # ps aux | grep 2195168 >>>>> <<<< Process exited >>>> >>>>> >>>>> Description: >>>>> >>>>> We are installing a signal handler in gdb that marks the >>>>> Ctrl-c/sigint received by gdb. GDB passes this sigint to the >>>>> debugged at some definite points during the window of process >>>>> attach. The process of attaching debugged  involves steps like >>>>> PTRACE_ATTACH , reading symbols, getting the stop signal from the >>>>> debugged and get ready with GDB prompt. Note: >>>>> one of the example of this is sigint passing is: >>>>> "     - installs a SIGINT handler that forwards SIGINT to the >>>>> inferior. >>>>>          Otherwise a Ctrl-C pressed just while waiting for the initial >>>>>          stop would end up as a spurious Quit. >>>>> " >>>>> >>>>> There are few other places where sigint is passed to the debugged >>>>> during attach of process to gdb. As the debugger and debugged are >>>>> not fully attached during this period, the sigint takes its default >>>>> action and terminates the process. >>>>> >>>>> Solution: >>>>> >>>>> While gdb attaches process, the target is not the current session >>>>> leader. Hence, until attach is complete and GDB prompt is availed, >>>>> the sigint should not be passed to the debugged. A similar approach >>>>> is taken for "gdb) run &". In target_terminal::inferior() >>>>>     /* A background resume (``run&'') should leave GDB in control >>>>> of the >>>>>        terminal.  */ >>>>>     if (ui->prompt_state != PROMPT_BLOCKED) >>>>>       return; >>>>> >>>>> The passing of signal is skipped if the process ran in background. >>>>> With this approach we can skip passing the sigint if the process is >>>>> attached to gdb and process attach is not complete. >>>>> Here is the proposed solution: >>>>> >>>>> >>>>> >>>>> Fix : >>>>> >>>>> While gdb attaching a target, If ctrl-c/sigint pressed in the midst >>>>> of the process attach, the sigint is passed to the debugged process. >>>>> This triggers exit of the debugged. >>>>> >>>>> This issue is evident while getting the process stack with ./gdb >>>>> --quiet -nx  -ex 'set width 0' -ex 'set height 0' >>>>> -ex 'set pagination no' -ex 'set confirm off' >>>>> -ex 'thread apply all bt' -ex quit /proc//exe and press >>>>> the ctrl+c while attach. >>>>> >>>>> The above method is also used in pstack application which is a >>>>> wrapper over gdb to print the process stack. A Ctrl+C intended to >>>>> kill gdb or pstack, but kills the debugged even if it is attached >>>>> and not spawned by gdb. >>>> >>>> This is a very good description of the error you've encountered, but >>>> given the repetition on this "fix:" part, I'm wondering, what is >>>> meant to be the commit message? Is it just these last few lines, or >>>> is it the whole thing? If it is just this last bit, I think it would >>>> benefit from some more explanation of the solution. If it is the >>>> whole message, I think you can reduce a bit the repetition. >>>> >>>> Also, at many points you say "debugged process" and "target". In >>>> GDB-land we call that the "inferior". Target has a very specific >>>> meaning in the context of GDB (roughly the CPU you're running, and >>>> some extra bits here and there). >>>> >>>> I also have a few comments on the specific changes, that are inlined. >>>> >>>>> --- >>>>>   gdb/inferior.h | 3 +++ >>>>>   gdb/target.c   | 4 ++++ >>>>>   gdb/top.c      | 2 ++ >>>>>   3 files changed, 9 insertions(+) >>>>> >>>>> diff --git a/gdb/inferior.h b/gdb/inferior.h index >>>>> 4d001b0ad50e..b7048d10bbe4 100644 >>>>> --- a/gdb/inferior.h >>>>> +++ b/gdb/inferior.h >>>>> @@ -557,6 +557,9 @@ class inferior : public refcounted_object, >>>>>     /* True if this child process was attached rather than forked.  */ >>>>>     bool attach_flag = false; >>>>> >>>>> +  /* True if target process synced and gdb ui is out of block. */ >>>>> bool >>>> >>>> This comment is oddly worded. Based on the change to gdb/top.c, I >>>> think you could reword it like this: >>>> >>>> /* True if inferior has been fully synced and the prompt is no >>>> longer blocked.  */ >>>> >>>>> + sync_flag = false; >>>> Typo here, the variable's type should be on this line. >>>>> + >>>>>     /* If this inferior is a vfork child, then this is the pointer to >>>>>        its vfork parent, if GDB is still attached to it.  */ >>>>>     inferior *vfork_parent = NULL; >>>>> diff --git a/gdb/target.c b/gdb/target.c index >>>>> d5bfd7d0849b..f7c115497451 100644 >>>>> --- a/gdb/target.c >>>>> +++ b/gdb/target.c >>>>> @@ -3826,6 +3826,10 @@ target_pass_ctrlc (void) >>>>>                   through the target_stack.  */ >>>>>                scoped_restore_current_inferior restore_inferior; >>>>>                set_current_inferior (inf); >>>>> +             if ((current_inferior()->attach_flag) && >>>> >>>> A couple of style issues here: when the indentation would have 8 >>>> spaces, you should use a tab instead; >>>> >>>> There should be a space between the function name and the parameters; >>>> And when you need to cut a logical expression in half, the operator >>>> should be at the start of a new line. >>>> >>>>> + !(current_inferior()->sync_flag)) { >>>> In this case, since it is just one line, there is no need to have >>>> the curly braces. However, when they are needed, they should be on >>>> the following line, and 2 spaces further in indentation. >>>>> + return; >>>>> +             } >>>>>                current_inferior ()->top_target ()->pass_ctrlc (); >>>>>                return; >>>>>              } >>>>> diff --git a/gdb/top.c b/gdb/top.c >>>>> index 621aa6883233..26cc6caac0e5 100644 >>>>> --- a/gdb/top.c >>>>> +++ b/gdb/top.c >>>>> @@ -542,6 +542,8 @@ wait_sync_command_done (void) >>>>>     while (gdb_do_one_event () >= 0) >>>>>       if (ui->prompt_state != PROMPT_BLOCKED) >>>>>         break; >>>>> + >>>>> +  current_inferior()->sync_flag = true; >>>> >>>> I'm not very knowledgeable on this part of GDB, so take this with a >>>> grain of salt, but I wonder if this is the best place to put this. >>>> >>>> Since you only set this flag as false when first creating the >>>> inferior structure, I don't see why it should be re-set every time >>>> we're waiting for a command to be done. You could set the sync flag >>>> to false every command, but that feels like overkill. I feel like >>>> there should be some a mechanism in GDB already that knows if we're >>>> the session leader or not, and thus handles things correctly, but I >>>> don't know what it is. >>>> >>>> Another possibility, based on the exact problem you had, is to put >>>> this at the end of either symbol expansions, or the reasons they are >>>> being expanded in the first place (which I suspect is something like >>>> trying to identify the language or name of the main function). >>>> >>> >>> wait_sync_command_done() is not frequently called with command >>> execution. >>> strace -k -o log ./gdb -p <> >>> (gdb) ls >>> Undefined command: "ls".  Try "help". >>> (gdb) !ls >>> (gdb) disassemble main >>> >>> confirmed the function wait_sync_command_done() is not part of this >>> trace. wait_sync_command_done() is called from run_inferior_call() >>> and serve as inferior startup and wait for it to stop. >>> >>> /* Subroutine of call_function_by_hand to simplify it. >>>     Start up the inferior and wait for it to stop. >>>     Return the exception if there's an error, or an exception with >>>     reason >= 0 if there's no error. >>> >>>     This is done inside a TRY_CATCH so the caller needn't worry about >>>     thrown errors.  The caller should rethrow if there's an error.  */ >>> >>> static struct gdb_exception >>> run_inferior_call (std::unique_ptr sm, >>>                     struct thread_info *call_thread, CORE_ADDR real_pc) >>> { >>> >>>        /* Inferior function calls are always synchronous, even if the >>>           target supports asynchronous execution.  */ >>>        wait_sync_command_done (); >>> >>> So wait_sync_command_done called once per inferior at startup. >>> >>> >>> Hi Guinevere, >>> >>> Thanks for the review and sorry for the delay in reply. >>> Please find comments inline. >>> >>> I will send the V2 incorporating rest of the comment. >>> >>> Thanks >>> Partha >> > Hi! Thanks for the updated version. It looks much better! > > However, I still cant apply the patch. Are you sure you're developing on > the master branch of our upstream repository? > (https://urldefense.com/v3/__https://sourceware.org/git/binutils-gdb.git__;!!ACWV5N9M2RV99hQ!N_X8-tLG80n66yoOg95U0435CrvbbnDiHbebshHmNxivPGKLL5ZTy2le27VURzCGpKU6zzBqP4Jtu3d5km1jRA$ ) > > I have been manually changing the source code to test the patch, but it > should cleanly apply for other maintainer to have an easier time > reviewing things. > >> >> Problem: While gdb is attaching an inferior, if ctrl-c is pressed in the >> middle of the process attach,  the sigint is passed to the debugged >> process. This triggers the exit of the inferior. For example in pstack, >> printing a stack can take significant time, and ctrl-c is pressed to >> abort the pstack/gdb application. This in turn kills the debugged >> process, which can be critical for the system. In this case, the >> intention of ctrl+c is to kill pstack/gdb, but not the inferior >> application. >> gdb -p <> >> or gdb /proc/<>/exe pid >> Attaching to process >> << ctrl+c is pressed during attach >> (gdb) q >> <<<< inferior process exited >>>> >> >> A Ctrl-C/sigint received by gdb during the attachment of an inferior >> passed to the debugged at some definite points during the window of >> process attachment. The process of attaching an inferior is a multistep >> process, and it takes time to get ready with the GDB prompt. As the >> debugger and debugger are not fully attached during this period, the >> sigint takes its default action to terminate the process. >> >> Solution: While GDB attaches processes, the inferior is not the current >> session leader. Hence, until attach is complete and the GDB prompt is >> available, the sigint should not be passed to the inferior. >> The signal should be skipped if the process runs in the background. With >> this approach, we can skip passing the signature if the process is >> attached to the GDB and the process attach is not complete. >> --- >>  gdb/inferior.h | 3 +++ >>  gdb/target.c   | 4 ++++ >>  gdb/top.c      | 2 ++ >>  3 files changed, 9 insertions(+) >> >> diff --git a/gdb/inferior.h b/gdb/inferior.h >> index 4d001b0ad50e..d5d01bd0d09c 100644 >> --- a/gdb/inferior.h >> +++ b/gdb/inferior.h >> @@ -557,6 +557,9 @@ class inferior : public refcounted_object, >>    /* True if this child process was attached rather than forked. */ >>    bool attach_flag = false; >> >> +  /* True if inferior has been fully synced and prompt is no longer >> blocked.  */ >> +  bool sync_flag = false; >> + >>    /* If this inferior is a vfork child, then this is the pointer to >>       its vfork parent, if GDB is still attached to it.  */ >>    inferior *vfork_parent = NULL; >> diff --git a/gdb/target.c b/gdb/target.c >> index d5bfd7d0849b..4eff3130bad7 100644 >> --- a/gdb/target.c >> +++ b/gdb/target.c >> @@ -3826,6 +3826,10 @@ struct target_ops * >>                  through the target_stack.  */ >>               scoped_restore_current_inferior restore_inferior; >>               set_current_inferior (inf); >> +             if ((current_inferior ()->attach_flag) >> +                 && !(current_inferior ()->sync_flag)) >> +                   return; > also, there's still 8 spaces here. All 8 space-identations should be > replaced with tabs. >> + >>               current_inferior ()->top_target ()->pass_ctrlc (); >>               return; >>             } >> diff --git a/gdb/top.c b/gdb/top.c >> index a685dbf5122e..f05fdd161a42 100644 >> --- a/gdb/top.c >> +++ b/gdb/top.c >> @@ -542,6 +542,8 @@ struct ui_out ** >>    while (gdb_do_one_event () >= 0) >>      if (ui->prompt_state != PROMPT_BLOCKED) >>        break; >> + >> +  current_inferior ()->sync_flag = true; > > I'm still not 100% convinced this is the best place to put this. Mainly > because this function is also called by maybe_wait_sync_command_done; it > didn't show up in your testing because when we run gdb from a terminal, > the UI is synchronous (so it fails the first part of the IF condition), > but this would be exercised in other situations. And > maybe_wait_sync_command_done is called after every single command. > > I tried adding this to setup_inferior, which looked like the perfect > place for it, but it unfortunately didn't work. Since done is better > than perfect, I'm not going to block this patch on this, but I'd love to > see a more logical place for this code. > Hi Guinevere, Can't agree more on setup_inferior is the best place to reset this variable. Updated V3 of review accordingly. Added a check_quit_flag which will clear quit_flag, if set before setup_inferior. Author: Partha Sarathi Satapathy Date: Fri Nov 17 11:42:11 2023 +0000 gdb : Signal to pstack/gdb kills the attached process. Problem: While gdb is attaching an inferior, if ctrl-c is pressed in the middle of the process attach, the sigint is passed to the debugged process. This triggers the exit of the inferior. For example in pstack, printing a stack can take significant time, and ctrl-c is pressed to abort the pstack/gdb application. This in turn kills the debugged process, which can be critical for the system. In this case, the intention of ctrl+c is to kill pstack/gdb, but not the inferior application. gdb -p <> or gdb /proc/<>/exe pid Attaching to process << ctrl+c is pressed during attach (gdb) q <<<< inferior process exited >>>> A Ctrl-C/sigint received by gdb during the attachment of an inferior passed to the debugged at some definite points during the window of process attachment. The process of attaching an inferior is a multistep process, and it takes time to get ready with the GDB prompt. As the debugger and debugger are not fully attached during this period, the sigint takes its default action to terminate the process. Solution: While GDB attaches processes, the inferior is not the current session leader. Hence, until attach is complete and the GDB prompt is available, the sigint should not be passed to the inferior. The signal should be skipped if the process runs in the background. With this approach, we can skip passing the signature if the process is attached to the GDB and the process attach is not complete. --- gdb/infcmd.c | 2 ++ gdb/inferior.h | 3 +++ gdb/target.c | 3 +++ 3 files changed, 8 insertions(+) diff --git a/gdb/infcmd.c b/gdb/infcmd.c index cf8cd527955..0aedbfc06b8 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -2556,6 +2556,8 @@ setup_inferior (int from_tty) target_post_attach (inferior_ptid.pid ()); post_create_inferior (from_tty); + current_inferior ()->sync_flag = true; + check_quit_flag(); } /* What to do after the first program stops after attaching. */ diff --git a/gdb/inferior.h b/gdb/inferior.h index 33eff7a9141..4e517bf9bc4 100644 --- a/gdb/inferior.h +++ b/gdb/inferior.h @@ -600,6 +600,9 @@ class inferior : public refcounted_object, /* True if this child process was attached rather than forked. */ bool attach_flag = false; + /* True if inferior has been fully synced and prompt is no longer blocked */ + bool sync_flag = false; + /* If this inferior is a vfork child, then this is the pointer to its vfork parent, if GDB is still attached to it. */ inferior *vfork_parent = NULL; diff --git a/gdb/target.c b/gdb/target.c index a6ca7fc4f07..b5556eaeb5a 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -3811,6 +3811,9 @@ target_pass_ctrlc (void) through the target_stack. */ scoped_restore_current_inferior restore_inferior; set_current_inferior (inf); + if ((current_inferior ()->attach_flag) + && !(current_inferior ()->sync_flag)) + return; current_inferior ()->top_target ()->pass_ctrlc (); return; } -- 2.39.3 Thanks Partha