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 59C38385021E for ; Thu, 23 Jun 2022 20:40:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 59C38385021E Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25NKcH4q020943; Thu, 23 Jun 2022 20:40:37 GMT Received: from nam02-sn1-obe.outbound.protection.outlook.com (mail-sn1anam02lp2047.outbound.protection.outlook.com [104.47.57.47]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3gvy1drg4s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 Jun 2022 20:40:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VXQD2dAu0VZbmCL3D0sRERXkvHY63u5L1TBEY3ioPPLGeRolMa5XYRmbjjXGjOroHIjTPJ78oZN3Zij64RUPP6j3EQBeAdfix18dZxbbNCk4Z55G7KW/eSkhl+XgjM3PLKh3lpQxWbcO36f69cX8tqzg3Dlmera5VRbw+/B/vF4YVBUZ4lllEj9NBRC/HtnhkBVAOzdk3m6C5XCkp/k77eA28ybtREIEzgsmOmYA3L+UybLrJ4fv90LRUN2hN4dn+/ft6v9Qw/GGhuMe0HHe/z2+GsEQdkbAjC+Rx6q7H+DvkjafIj4DXtGHYSjJvYv554Y3HZSH5frRpk5S8gKFtA== 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=PC02F/6cwxXSlbz38Z2kZUzEjpfHrcx8pSXZJjdROSM=; b=AzPpID/cevY06v6i+JDSLpPDnMJm4hpU2gK5I7vRvCJUMJMxQ8AiphH+Q7NCfMPmsbcf4QXUlplpsY9PT01WYcB+1Vnjuq7ny3zPi/ry9RohsqV4ryzE7R4TqFGRdorim7rhartlmUfDZDeY+B97u8xI19mjQqFZqUeAI86hD/APHX/XzUHV9Li6Xt7Snuhjpc5+CVBMCmv4INYnXOgjXXZkaBN1jULK+ddZjbOVExDl/HS4E7YfW8nr0hE+lFIwK1jIDxhGXigufV2Wn52BUrGiQ6WAKM4A6xyKhCS+Cde9wjtlw+CPSBctphEIIw8JxrvpLoyS3yW7F7RAMRCW3A== 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 DM4PR15MB5332.namprd15.prod.outlook.com (2603:10b6:8:5f::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.15; Thu, 23 Jun 2022 20:40:35 +0000 Received: from BN8PR15MB2867.namprd15.prod.outlook.com ([fe80::bdba:e456:65f2:9f6c]) by BN8PR15MB2867.namprd15.prod.outlook.com ([fe80::bdba:e456:65f2:9f6c%5]) with mapi id 15.20.5373.016; Thu, 23 Jun 2022 20:40:35 +0000 From: Aditya Vidyadhar Kamath To: Simon Marchi CC: Sangamesh Mallayya , Simon Marchi via Gdb-patches Thread-Topic: [EXTERNAL] RE: [PATCH] Use current_inferior ()->pid for AIX Thread-Index: AQHYQzomuN6vfkBMD0KaGHkq0D0viKzWU60AgAGS5NqACWl/AIALCa68gA4+fACAPIyDsYAAmxEAgBFqh2OAByjYAoANqUtB Date: Thu, 23 Jun 2022 20:40:35 +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: b5b9b354-0365-ad6b-6bf5-66f31f4c453d x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c07268be-5a01-4367-6147-08da55589fc0 x-ms-traffictypediagnostic: DM4PR15MB5332:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: A1e46qsuQ8BHg97dpLvYWTjFkjYeOHB15ZanS34cUR3yaD8VOy2tUHxGewfqFDTKIlEQ7Yw5cKqX/Rfj8yug9OnqZlXS3TUQYiTkXqlbf/u0zyO2TRMGFrSJHNfcJU4MtsR/g5WH8V4Lrj0PnqkyME8lVpjI90Z56pJ3x7d+r2y0GePmGpDdh8cdxUIhORRgcBqBsukX7Va2+ll5jeGPNkyIzIX+1nNyxrboYoq9gen/tE/GgomTJSwVgCZyuyauT80P0b0KlveJk0A2zJuNHrTn3Rx1LTewegP7s+sVBqwoGib5aa3H5tryU6nEkqVIs2M4d3VEEBZ++A/m4gjoMjpeE05sTURXe+36fOulSBTBFql1t77l259zYjh+6BB7YYNLCfkI86ZcyHwsXHuGuH37AenBjmhLpvGEV0TMbqzMtkPy6NzfRJw6C0Gfv8iDiXk7FOKYJyMcJuWy1hbwd5Ys+LLjAkhar7sNn92H1rxDmhAMUeDPBKcT9ons8pEPJZL5DIzyEv5RCkvpn2h6nhk1YnOL3M6PuZSp9BEFpYuhiDmdf3rTB4aXcXY8+CiBQwr2iIaJ63pfEYpWPD3jr7J7QNAPY3wGcyMX9eYxIfgWQz6Jv9TBSUWfAdCOKkC4ohVgw8IebPJUYCpHTfHCHbuHS+Ag+WF2AR40majKagiA6Lts50w+aPbTDMiSmKr/bGH9Hf5n2gZitXnIsoAqtKyWYlOOLPTyzytzKXkkiaS1KfCLr2nprEPcNppJWaczwThTw4d5bxSAYnmd2URNgUrpZAZJxBodCOrDudGKpdQ= 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)(39860400002)(376002)(136003)(346002)(396003)(64756008)(66946007)(8676002)(4326008)(66446008)(316002)(66556008)(41300700001)(76116006)(38070700005)(122000001)(83380400001)(66476007)(2906002)(6916009)(38100700002)(71200400001)(91956017)(19627405001)(9686003)(54906003)(53546011)(6506007)(7696005)(478600001)(52536014)(8936002)(186003)(86362001)(33656002)(26005)(5660300002)(55016003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?dKl4u8SsZwY7hreck5r4lD2nfc+P5ZMU/jqbrLB5cJqqnwLeCF1bjlIA/hBM?= =?us-ascii?Q?NH8FAvUukWboXGOejPVCGYCQYpUAh9NtUrmqpEkep8ynMxh1NWCD33ORr1oQ?= =?us-ascii?Q?T7B3+T8Vc7DhQpUhT5pXDt69VTKGfVmO/YJpRYjLSPxVWMly6FwAo0fKi2Pg?= =?us-ascii?Q?tDixypsb3WEIunMTJBhyEKhTMZz0OJrR75ZGpptCLl58MaRG6TvDdb2RUgqx?= =?us-ascii?Q?Yngn5GOunzPiTIY8ZFa4Xw+tehW/B8B2SeZTySr3eZ0637GwtfhhsMwWX3D1?= =?us-ascii?Q?YDn7cJdJCW0uKgGaDiOCDAO4qSV08Y1lcUTTobsbDO6gQ0HJBC0fq/PpHurC?= =?us-ascii?Q?rTSCieHIvj88eNC+nFmZeVDD3p2wt68ulJQdbnpKgVIZ6hk422ineD9Ja/6q?= =?us-ascii?Q?pdKZvtp3qKsZ9kGTWOykGv6YLHLeSE70AAc4lYh5jRy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s/tglmvjfgeCB/7qMnN0vo9qObE374EjZ7oXpizTqr/uwKOyK3qZ48s?= =?us-ascii?Q?luWKfAelTWBFsBBvgF6BPFdriT4o0rgQgeSEYt6mWPCicALW6fY6pMutY4EL?= =?us-ascii?Q?1lbqd6mavJMdXSdK5wz8k7ZFnxWFjJy0vZ2zsM2fTznSIZvlVbxvjY3nn7Px?= =?us-ascii?Q?5bIGomMiSadiBywxtwk8E0OwdguK9/0z7vsdala8BzlUbgULUHx8aWMgVUOX?= =?us-ascii?Q?zS87FsW4b9WKZdrhzCqotbKNTOoiX3v2HSTqvQ8/vHeWcEjUiuJFL/pxOARM?= =?us-ascii?Q?6Q=3D=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: c07268be-5a01-4367-6147-08da55589fc0 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Jun 2022 20:40:35.1702 (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: tQuoY8gS9fQWHNUsiUOWEr0fPjSpNj7ElOQGH3Si181lBGYc3qV1eGozYnuGXgbq6reMX6fvO9LgMpTOkM9ChPZDUKVTQzyIBivp+9W7erQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR15MB5332 X-Proofpoint-GUID: c9HgPbIflbD0RG5TswplVnUfpX1wYH7g X-Proofpoint-ORIG-GUID: c9HgPbIflbD0RG5TswplVnUfpX1wYH7g Subject: RE: [PATCH] Use current_inferior ()->pid for AIX X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-06-23_10,2022-06-23_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 lowpriorityscore=0 malwarescore=0 suspectscore=0 bulkscore=0 mlxscore=0 impostorscore=0 phishscore=0 priorityscore=1501 adultscore=0 mlxlogscore=652 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206230078 X-Spam-Status: No, score=-3.6 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_KAM_HTML_FONT_INVALID, 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: Thu, 23 Jun 2022 20:40:50 -0000 Hi all, Kindly give us a feedback for this patch update. Thanks and regards, Aditya ________________________________ From: Aditya Vidyadhar Kamath Sent: Wednesday, June 15, 2022 9:33 AM To: Simon Marchi ; Aditya Vidyadhar Kamath Cc: Sangamesh Mallayya ; Simon Marchi via Gdb-p= atches Subject: Re: [EXTERNAL] RE: [PATCH] Use current_inferior ()->pid for AIX 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