[PATCH] gdb: fix "set scheduler-locking" thread exit hang
Simon Marchi
simon.marchi@efficios.com
Thu Nov 11 19:14:09 GMT 2021
On 2021-11-11 2:04 p.m., Pedro Alves wrote:
> On 2021-11-11 18:33, Simon Marchi wrote:
>> On 2021-11-11 1:09 p.m., Pedro Alves wrote:
>>> On 2021-11-08 21:49, Simon Marchi via Gdb-patches wrote:
>>>
>>>> The problem is in handle_no_resumed: we check if some other thread is
>>>> actually resumed, to see if we should ignore that event (see comments in
>>>> that function for more info). If this condition is true:
>>>>
>>>> (thread->executing () || thread->has_pending_waitstatus ())
>>>>
>>>> ... then we ignore the event. The problem is that there are some non-resumed
>>>> threads with a pending event, which makes us ignore the event. But these
>>>> threads are not resumed, so we end up waiting while nothing executes, hence
>>>> waiting for ever.
>>>
>>> "There are some non-resumed" ... "But these are not resumed".
>>>
>>> The first "non-resumed" should be "non-executing", I believe.
>>
>> Hmm, no. These other threads ("other" meaning other than the thread
>> resumed under schedlock) are stopped / non-infrun-resumed.
>
> I see, nevermind, I somehow read "non-resumed" vs "not resumed" as opposites
> and then brain shorted out. Sorry.
>
Np, thanks for the review. I will push the patch.
Simon
More information about the Gdb-patches
mailing list