From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from userp2130.oracle.com (userp2130.oracle.com [156.151.31.86]) by sourceware.org (Postfix) with ESMTPS id 07EE43887007 for ; Tue, 2 Jun 2020 07:34:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 07EE43887007 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0527VvKU040310; Tue, 2 Jun 2020 07:34:16 GMT Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2130.oracle.com with ESMTP id 31bewqth0p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 02 Jun 2020 07:34:16 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0527NFi2171702; Tue, 2 Jun 2020 07:32:16 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userp3030.oracle.com with ESMTP id 31c1dwr1fg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 02 Jun 2020 07:32:15 +0000 Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 0527WBFf028954; Tue, 2 Jun 2020 07:32:11 GMT Received: from [192.168.15.238] (/89.233.184.135) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 02 Jun 2020 00:32:10 -0700 Subject: Re: Solaris - procfs: couldn't find pid 32748 (kernel thread 21) in procinfo list To: Pedro Alves , gdb@sourceware.org References: <5ab0b8b1-6072-6717-1ae0-ba06339254b8@oracle.com> <0570473c-1181-2269-06a0-0f6d4fc6b178@redhat.com> From: Petr Sumbera Organization: Oracle Corporation Message-ID: <51ff2398-4a7d-eb07-be98-0ae92673e152@oracle.com> Date: Tue, 2 Jun 2020 09:32:08 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 MIME-Version: 1.0 In-Reply-To: <0570473c-1181-2269-06a0-0f6d4fc6b178@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9639 signatures=668686 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxlogscore=999 spamscore=0 bulkscore=0 adultscore=0 suspectscore=0 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006020046 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9639 signatures=668686 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 bulkscore=0 phishscore=0 suspectscore=0 impostorscore=0 cotscore=-2147483648 lowpriorityscore=0 mlxscore=0 adultscore=0 spamscore=0 mlxlogscore=999 malwarescore=0 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006020047 X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2020 07:34:21 -0000 On 01.06.2020 21:12, Pedro Alves wrote: > On 6/1/20 12:39 PM, Petr Sumbera via Gdb wrote: >> The issue seems to be that the LWP exits and the status->kind is set to TARGET_WAITKIND_SPURIOUS: >> >> https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gdb/procfs.c;h=f6c6b0e71c16224d3e7345ca09e011cdcf06349a;hb=HEAD#l2214 >> >> But instantly it's added into the list again here: >> >> https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gdb/infrun.c;h=95fc3bfe45930b53c33cb4de165db9c070449ad8;hb=HEAD#l5200 >> >> But there is no longer such LWP in /proc. >> >> Any suggestion? Thanks for looking at it! > Either: > > - replace TARGET_WAITKIND_SPURIOUS with TARGET_WAITKIND_THREAD_EXITED, or, With this I'm getting: [LWP 21 exited] [LWP 21 exited] /builds/psumbera/userland-gdb-procinfo/components/gdb/gdb-9.2/gdb/thread.c:459: internal-error: void delete_thread_1(thread_info*, bool): Assertion `thr != nullptr' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. > - replace > status->kind = TARGET_WAITKIND_SPURIOUS; > return retval; > with > goto wait_again; > instead. and with this: [LWP 20 exited] [LWP 20 exited] /builds/psumbera/userland-gdb-procinfo/components/gdb/gdb-9.2/gdb/thread.c:459: internal-error: void delete_thread_1(thread_info*, bool): Assertion `thr != nullptr' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. -- Note that in both cases there are TWO exits for one LWP. But LWP numbers differ. Any other comment? Thanks! Petr