From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id BFCEC3856DFD for ; Wed, 15 Jun 2022 04:04:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BFCEC3856DFD Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25F3u9I1013638; Wed, 15 Jun 2022 04:03:51 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2105.outbound.protection.outlook.com [104.47.55.105]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3gppa6nbgq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 15 Jun 2022 04:03:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i3c/JrZbxc2G5My+SsJJrC+EiRTmCHCUroAskM8MwisXmS8bn+QpfxVW0VnFglX69RmXDy51VP5AYg0zDk+pvLjGBFMkPEuqhxioZciNhDqZ3+NvsVD+TxMo1aMloeBzpzEBrBSl8+u6QyDTtmI39xHuYbKcR/GNbqmM57RPAFF1WdnMYS5KDcaXhbjo4PGa1CRENAGxOlxhoElVX6j9V3jCgJUXqLEOEilcp2znzqKyX+2C3KFr0qklQdPuiE4LazybrAAoARoLWMOEzSWf0JCKdpSqVUJh3ieNjAixFe6sqcyJwmpeA+XpJHbDWZPWoIgY01HnuYNDYm1g2CvFfQ== 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=w6Dk35zwT7wyXi67NpDGGsMqvNDvJbJFKC1n6A3KL7w=; b=oWs0CpVcLrIfBD8VJ4YsKMP7KB+zRhjlNGhJkSgbXgki00n1/cW6pXLx6TsxGAGv2XT1dfHkUFE3dKcg9qu0NvrwVnFq9TjxOGhKR3IgNGjS1arEAS43H9MJk2bRXb4NjYq08rpplLcQtrKzb4bX7lrFe+71DTxSlXFytoyewaqaWfj35JNJPwHi/RUa/2/DxrGtWsCyMrkgUwpqcotxhamabfwtbwD8+44aOLe45HIp4gnRCspEPwVThVDWoMRNh+rJFKdWr8GM63YX5xXLpXN4SnQhPut4gcxxZpiUoUKzy2e4/HjZA3iesEpGxocJcRm/iutSOltBbYecoh0+3g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ibm.com; dmarc=pass action=none header.from=ibm.com; dkim=pass header.d=ibm.com; arc=none Received: from BN8PR15MB2867.namprd15.prod.outlook.com (2603:10b6:408:83::15) by DM6PR15MB2393.namprd15.prod.outlook.com (2603:10b6:5:8f::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.22; Wed, 15 Jun 2022 04:03:48 +0000 Received: from BN8PR15MB2867.namprd15.prod.outlook.com ([fe80::45cd:7071:f912:9563]) by BN8PR15MB2867.namprd15.prod.outlook.com ([fe80::45cd:7071:f912:9563%5]) with mapi id 15.20.5332.022; Wed, 15 Jun 2022 04:03:48 +0000 From: Aditya Vidyadhar Kamath To: Simon Marchi , Aditya Vidyadhar Kamath CC: Sangamesh Mallayya , Simon Marchi via Gdb-patches Thread-Topic: [EXTERNAL] RE: [PATCH] Use current_inferior ()->pid for AIX Thread-Index: AQHYQzomuN6vfkBMD0KaGHkq0D0viKzWU60AgAGS5NqACWl/AIALCa68gA4+fACAPIyDsYAAmxEAgBFqh2OAByjYAg== Date: Wed, 15 Jun 2022 04:03:48 +0000 Message-ID: References: <5f142468-bc68-9128-d4d6-80cf36f12a48@polymtl.ca> <87169b93-8be2-5ccd-6b58-51b395a367bd@polymtl.ca> <4516dbf7-2655-39c5-0614-8235df05248e@polymtl.ca> <0ad5c21e-60fa-e52d-f70c-d2bc62e0ac74@polymtl.ca> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: suggested_attachment_session_id: 0f65aca5-7dd9-ed39-3d2c-10441c1a97c0 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 9dcf6b27-035d-4d34-b5f3-08da4e840cc5 x-ms-traffictypediagnostic: DM6PR15MB2393:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 47R7bR76uIASVAWtGCQbB1sV045fiOa89sO+Vs5heU8t4rWxd8XZulpIQjLYZLIqRns8ApSEMiyAviWGvWl3X75x2vIa1qQqWOloKPkGYGO8WBaTzbZr0A9tRKCZjxeFn7JfzLG3Az++/LS9mdsev0MVP1OHumsJssN70NN+baBhdU+uKVvQ2UsbCf81yufyTPHUSFQeWjFICSrc1k4L8LGY+lKRKwCARH2IM+w5+O+udWzH7JNLzAISF3zprJjKgQ0IVqb4BErR+9xG9/s9fk/IaSTvES0Zt4XHI6hJVqaTuYTWS4bPT4fgbCfJ9O9GT+AbJTWXT6LMnfi04DrTemOaxk7l2zKEYRbIK/8KeVY+uSxvRJ1NwA9pPQRF8q2o9XtBh56bng+LnWsCyOC537lmDZBZ5uZqqf5F1big4lp3EVcOSGatp8ibPjho7fd6OfG2IyGFEcYy/7cboM9VI11N9GXj3L5UW0Bx79bF9tckj/JiEfjOIAt+yEmbvUi+AGnShllA5pKahUTTztN90MiC2X835qXJ8I6qG23DS4hJVk/otdW6mHIOQMtn8MieqRGxTcN7s8DCQU+4bQbyJWzniuu4m6nTEVjDWP3IHMjiA82ptrwzMv7wme7NR1zUhS/xbpFpR3Sv1uokVyIqO4XVBf8OCMLdNhfgAcMhOiRMmwyr/x1p8oUA8XELoxhCx3ixp1dx/5HCwTDUlm6GpA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN8PR15MB2867.namprd15.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(366004)(71200400001)(186003)(86362001)(38070700005)(316002)(19627405001)(38100700002)(54906003)(110136005)(66476007)(4326008)(64756008)(66556008)(33656002)(83380400001)(53546011)(6506007)(7696005)(9686003)(508600001)(2906002)(52536014)(66446008)(55016003)(8676002)(91956017)(76116006)(66946007)(122000001)(5660300002)(8936002)(26005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?J0HvttUlYWws74yQx4sEwPbPDW0jC3aXMWlsXKpyTT9emoTjUr4r0z84NXM2?= =?us-ascii?Q?E82GtzVRdr9fGNRNxZrXOk00+B9ip/AHzxt8jllfvKiWocgxC1uVZuwO4GmC?= =?us-ascii?Q?4KkaeA7Bm5+qLBxgFDyTgxesgp3GNiV4y7PRHGrWK/VKp1KIrZdLOIjnkXyt?= =?us-ascii?Q?TtDLg+KROwVn5C+dqaejOs0SYJQR8OxLgOE+yNJRZ/bC7T4m1IV5YhwjoiVJ?= =?us-ascii?Q?07iQJi3J+xJ2iFVpoiR4UvSdHknKr3r4SvKPah7MSDzfaLGOR6EfQV/iG7V7?= =?us-ascii?Q?87ZqHmsDpAHZbpxEZRaMAfHHiHeo1cdaGSHeX3sFXyz1fgEoKVqSnfD/mCJA?= =?us-ascii?Q?GdIGxZ0UjLu5KrJ9BP/iMEnw6BUNBfq6xyZeL91OPimAPt65ZKJGCmeKvQuR?= =?us-ascii?Q?G3pXRSZg3vWVOOGDYfXe51SMzzX3lsoPvr1Q/Gv9q8RuGIQJX8gQqW0ydn25?= =?us-ascii?Q?j89bOoO141G4k1ajXLqaXpxED31W7Kf1nGFFMxp9LBdIrZ9dA8ocwuM2x/VC?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ps8VlrCJxE4wlFFsjmiXdjZBq9sBG0m4cJjxkcK?= =?us-ascii?Q?TQfpgk3ccl50gYS+3wGAJIOl+3aycaKEn5ZvECYMRSxQEJ5iOUQeN6mxoxXm?= =?us-ascii?Q?hc2Ckafj6p997fNp15+8OBacyr2QAp4WtorOSD+/P3aT1LRwv0GGaO24b8NA?= =?us-ascii?Q?hYXWIzMW6Ux/hb/ulBV/CdhzdJvHNqWBIFyiL+L0XZa1Xjjt8+bbzpNBa9fS?= =?us-ascii?Q?6N0mE6Jd5nQgk14tM5cDwSWk7FJOxf6PciQghHMxK/2cLk732W5To8SUBVTl?= =?us-ascii?Q?zYJ8ZxK8CNI8wHiveWUWsCo/jiP2eKW2b/K2pabeXlvS5J5WrETQXak8Dn21?= =?us-ascii?Q?4bOvaeP3+c3WiB10epxm4zGYt3tE8g8=3D?= MIME-Version: 1.0 X-OriginatorOrg: ibm.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN8PR15MB2867.namprd15.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9dcf6b27-035d-4d34-b5f3-08da4e840cc5 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jun 2022 04:03:48.3123 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: fcf67057-50c9-4ad4-98f3-ffca64add9e9 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: UfYOLB3eXqvsU14Y4JWHqwyHo+msI/WD1opwCKHcrOZHnCN3cNzTYte4fIiEH9gSRHJLAIMLj5Q/FNdb82VfzUw3UD+90ueEkeC0wkD+gnA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR15MB2393 X-Proofpoint-GUID: 1b3Z-HpE-YWRU9P6ct7jN72BE4-nSgbB X-Proofpoint-ORIG-GUID: 1b3Z-HpE-YWRU9P6ct7jN72BE4-nSgbB Subject: RE: [PATCH] Use current_inferior ()->pid for AIX X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.517,FMLib:17.11.64.514 definitions=2022-06-15_01,2022-06-13_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 clxscore=1015 suspectscore=0 impostorscore=0 phishscore=0 malwarescore=0 adultscore=0 mlxscore=0 spamscore=0 mlxlogscore=677 lowpriorityscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206150010 X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, HTML_MESSAGE, RCVD_IN_MSPIKE_H2, 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2022 04:04:11 -0000 Hi all, Kindly give us a feedback for this update. Thanks and regards, Aditya ________________________________ From: Gdb-patches on behalf of Aditya Vidyadhar Kamath via Gdb-patches Sent: Friday, June 10, 2022 8:17 PM To: Simon Marchi Cc: Sangamesh Mallayya ; Simon Marchi via Gdb-p= atches Subject: [EXTERNAL] RE: [PATCH] Use current_inferior ()->pid for AIX Hi all, While testing programs in AIX I noticed that GDB crashes when an inferior exits, with this error: inferior.c:293: internal- error: inferior* find_inferior_pid(process_stra= tum_target*, int): Assertion `pid !=3D 0' failed. When a process exits inferior_ptid.pid is set to 0. Unfortunately, the rs60= 00-aix-nat target is still relying on the value of inferior_ptid in the case where an inferior exits - we return the value of inferior_ptid as the pid of the process that exited. The waitpid() system call suspends execution of the calling process until a= child specified by pid argument has changed state. Once the inferior [assu= ming there is only one inferior] dies, waitpid() has no child to return. Due to this an ERRCHLD error is returned thereby returning an inferior_ptid= .pid with 0 leading to this assertion failure. This patch is a fix to the same where we use the pid returned by the beneat= h wait using waitpid and adjust our inferior_ptid so that the rest of the c= ode will take in the right values of both inferior_ptid and current_inferio= r. The following are the test results after running gdb.base test suite with t= he patch. # of expected passes 26244 # of unexpected failures 4230 # of unexpected successes 1 # of expected failures 17 # of known failures 26 # of unresolved testcases 110 # of untested testcases 79 # of unsupported tests 62 # of paths in test names 1 # of duplicate test names 4 The following are test results after running gdb.base test suite without th= e patch. # of expected passes 12935 # of unexpected failures 1988 # of unexpected successes 1 # of expected failures 3 # of known failures 6 # of unresolved testcases 159 # of untested testcases 77 # of unsupported tests 39 # of paths in test names 2 # of duplicate test names 13 Please find attached the patch. [See 0001-Fix-gdb_assert-pid-0-assertion-fa= ilure-in-AIX.patch]. Have a nice day ahead, Thanks and regards, Aditya. ________________________________ From: Simon Marchi Sent: Monday, May 30, 2022 6:15 PM To: Aditya Vidyadhar Kamath Cc: Sangamesh Mallayya ; Simon Marchi via Gdb-p= atches Subject: [EXTERNAL] Re: [PATCH] Use current_inferior ()->pid for AIX Hi, Re-adding gdb-patches, since it's information useful to everybody. On 2022-05-29 23:41, Aditya Vidyadhar Kamath wrote: > Hi Simon, > > Thank you so much for the feedback. Yes it makes sense. As I was trying t= o fix this we need one more information that will help us. > > Once an inferior finishes its execution where is the inferior_ptid's pid = variable set to 0. Or who is the one [file name or function name] that upda= tes inferior_ptid class variable pid to 0. This is done in the mourn_inferior target method. Many targets call the generic_mourn_inferior function, which calls switch_to_no_thread, which sets current_thread_ to nullptr and inferior_ptid to null_ptid. Simon