Subject: Re: bug#45658: Infinite loop in run loop on macOS

From: Po Lu <[email-masked]>
Date: Wed, 20 Oct 2021 10:02:23 +0800

Alan Third <[email-masked]> writes:

> ns_send_appdefined somewhere. Can you switch to the thread that's
> running fd_handler and see what it's doing? There are only two
> branches, so it should be easy to work out which one is in use.

>>     frame #8: 0x00007fff2d14c039 AppKit`_DPSNextEvent + 883
>>     frame #9: 0x00007fff2d14a880 AppKit`-[NSApplication(NSEvent)
>> _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352
>>     frame #10: 0x00007fff2d13c58e AppKit`-[NSApplication run] + 658
>>     frame #11: 0x000000010036c5fa Emacs`-[EmacsApp
>> run](self=0x000000010525e180, _cmd="run") at nsterm.m:5602:9
>>     frame #12: 0x000000010036a8eb Emacs`ns_select(nfds=30,
>> readfds=0x00007ffeefbfd1f0, writefds=0x00007ffeefbfd170,
>> exceptfds=0x0000000000000000, timeout=0x00007ffeefbfd148,
>> sigmask=0x0000000000000000) at nsterm.m:4690:3

Does it also make sense for this to occur on GNUstep?  I have just seen
a very similar bug there, but I lost the backtrace :(