Subject: Re: bug#29548: 25.2; How to DEBUG get-device-terminal

From: Noam Postavsky <[email-masked]>
Date: Tue, 09 Jan 2018 22:51:47 -0500

Live System User <[email-masked]> writes:

> Noam Postavsky <[email-masked]> writes:
>
>> Hmm, if you can reproduce this semi-regularly, then perhaps the
>> following patch can catch the reason for the problem.  It sets a
>> breakpoint in Fsignal while the terminal is in the process of being

I said Fsignal, but posted a patching breaking in signal_or_quit.  The
latter only exists in emacs-26.  Are you running that or 25.2 as in your
original report?

Actually I think it might work better to break in longjmp instead.

> Thread 1 "emacs" hit Breakpoint 3, begin_delete_terminal () at terminal.c:317
> 317	    delete_terminal_count++;
>
>
>    I noticed that this didn't end with a paired
>
>              "delete_terminal_count--;".
>              
>    which it does do so normally.

I believe this means that the problem is indeed a non-local exit
happening somewhere in there, but we failed to catch it.  Either because
I posted the Emacs 26 version while you are on Emacs 25, or it doesn't
go through the signal machinery at all.