Subject: bug#20471: Emacs ceased to respond to C-g on a tty; SIGINT became blocked?

From: Ivan Shmakov <[email-masked]>
Date: Mon, 04 May 2015 15:55:48 +0000

>>>>> Andreas Schwab <[email-masked]> writes:
>>>>> Ivan Shmakov <[email-masked]> writes:

 >> Attaching GDB to it shows no signals being delivered on C-g, which
 >> (AIUI) hints at either SIGINT being blocked /or/ C-g “unbound” from
 >> the signal via terminal settings.  I’ve copied the latter from a
 >> terminal used by a properly working Emacs instance with the stty(1)
 >> invocation below, yet I still see no signals via GDB, which leaves
 >> the signal mask as the only point of failure that I can think of.

 >> Any suggestion on how do I debug this issue any further?

 > A blocked signal would still be visible in the debugger

	It’s not what I observe.  Why, SIGINT seem to be ignored by GDB
	itself when it’s attached to that Emacs instance.

 > (assuming you haven't changed the handling of SIGINT in gdb).

	I didn’t.

(gdb) info signals 
Signal        Stop      Print   Pass to program Description

SIGHUP        Yes       Yes     Yes             Hangup
SIGINT        Yes       Yes     No              Interrupt
SIGQUIT       Yes       Yes     Yes             Quit
…

	Just in case, the ps(1) output for two of my Emacs instances
	goes below.  The GDB ‘bt’ output at SIGCONT time (after a
	properly handled C-z) is MIMEd, too.

	To note is that I’ve tried to set a breakpoint on the next line
	of internal_catch (), but it doesn’t seem to ever be triggered.
	Could it hint at some non-local exit issue, perhaps?

$ ps -o pid,pending,blocked,ignored,caught,stat,bsdtime,command \
      -C emacs24 -C emacs25 
  PID   PENDING   BLOCKED   IGNORED    CAUGHT STAT   TIME COMMAND
19987  00000000  00000000  14001000 <cb816eff S+   843:01 emacs24
25806  00000002  04002006  04001000 <db816eff Sl+   52:00 emacs25
$ 

-- 
FSF associate member #7257  http://am-1.org/~ivan/      … 3013 B6A0 230E 334A