unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ivan Shmakov <ivan@siamics.net>
To: 20471@debbugs.gnu.org
Subject: bug#20471: Emacs ceased to respond to C-g on a tty; SIGINT became blocked?
Date: Mon, 04 May 2015 15:55:48 +0000	[thread overview]
Message-ID: <87fv7cmj5n.fsf@violet.siamics.net> (raw)
In-Reply-To: <87h9rxhaii.fsf@igel.home> (Andreas Schwab's message of "Thu, 30 Apr 2015 18:00:05 +0200")

[-- Attachment #1: Type: text/plain, Size: 1887 bytes --]

>>>>> Andreas Schwab <schwab@linux-m68k.org> writes:
>>>>> Ivan Shmakov <ivan@siamics.net> 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

[-- Attachment #2: Type: application/octet-stream, Size: 2674 bytes --]

(gdb) bt 
#0  0x00007f4cb4d13f0a in tcsetattr () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00000000004a5e71 in emacs_set_tty (fd=5, 
    settings=settings@entry=0x7fffb46cfaf0, flushp=flushp@entry=false)
    at sysdep.c:850
#2  0x00000000004a6c84 in init_sys_modes (tty_out=0x12c20c0) at sysdep.c:1079
#3  0x00000000004a6f18 in init_all_sys_modes () at sysdep.c:907
#4  0x00000000004fcce2 in unbind_to (count=<optimized out>, value=0)
    at eval.c:3217
#5  0x000000000049d8f5 in Fsuspend_emacs (stuffstring=0) at keyboard.c:10266
#6  0x00000000004fdf13 in Ffuncall (nargs=5, args=0x7b0250 <Ssuspend_emacs>)
    at eval.c:2718
#7  0x0000000000530073 in exec_byte_code (bytestr=<optimized out>, 
    vector=9208813, maxdepth=<optimized out>, args_template=<optimized out>, 
    nargs=<optimized out>, args=<optimized out>) at bytecode.c:919
#8  0x00000000004fdd33 in Ffuncall (nargs=5, nargs@entry=1, 
    args=0x8c8390 <pure+1118096>) at eval.c:2779
#9  0x00000000004f9b3a in Ffuncall_interactively (nargs=1, args=0x7fffb46cff88)
    at callint.c:252
#10 0x00000000004fde19 in Ffuncall (nargs=5, nargs@entry=2, 
    args=0xa95dd8 <Sfuncall_interactively>) at eval.c:2698
#11 0x00000000004ff18c in Fapply (nargs=nargs@entry=3, 
    args=args@entry=0x7fffb46cff80) at eval.c:2289
#12 0x00000000004f9e98 in Fcall_interactively (function=3671376, 
    record_flag=0, keys=<optimized out>) at callint.c:394
#13 0x00000000004fdef7 in Ffuncall (nargs=5, 
    args=0xa95da8 <Scall_interactively>) at eval.c:2725
#14 0x0000000000530073 in exec_byte_code (bytestr=<optimized out>, 
    vector=8964949, maxdepth=<optimized out>, args_template=<optimized out>, 
    nargs=<optimized out>, args=<optimized out>) at bytecode.c:919
#15 0x00000000004fdd33 in Ffuncall (nargs=5, nargs@entry=2, 
    args=0x88cb00 <pure+874240>) at eval.c:2779
#16 0x00000000004fdfea in call1 (fn=fn@entry=12096, arg1=<optimized out>)
    at eval.c:2573
#17 0x000000000049c90d in command_loop_1 () at keyboard.c:1521
#18 0x00000000004fc617 in internal_condition_case (
    bfun=bfun@entry=0x49c520 <command_loop_1>, handlers=handlers@entry=15888, 
    hfun=hfun@entry=0x493a50 <cmd_error>) at eval.c:1348
#19 0x000000000048f5ac in command_loop_2 (ignore=ignore@entry=0)
    at keyboard.c:1139
#20 0x00000000004fc4f3 in internal_catch (tag=tag@entry=40992, 
    func=func@entry=0x48f590 <command_loop_2>, arg=arg@entry=0) at eval.c:1108
#21 0x000000000048f569 in command_loop () at keyboard.c:1118
#22 0x0000000000493666 in recursive_edit_1 () at keyboard.c:728
#23 0x0000000000493980 in Frecursive_edit () at keyboard.c:799
#24 0x0000000000407f78 in main (argc=1, argv=0x7fffb46d05e8) at emacs.c:1626
(gdb) 

  reply	other threads:[~2015-05-04 15:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-30 15:30 bug#20471: Emacs ceased to respond to C-g on a tty; SIGINT became blocked? Ivan Shmakov
2015-04-30 16:00 ` Andreas Schwab
2015-05-04 15:55   ` Ivan Shmakov [this message]
2015-05-04 16:09     ` Eli Zaretskii
2015-05-04 16:20       ` Ivan Shmakov
2022-05-02  9:51 ` Lars Ingebrigtsen
2022-05-30 18:06   ` Lars Ingebrigtsen
2022-06-02  5:20   ` Ivan Shmakov
2022-06-02  9:19     ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fv7cmj5n.fsf@violet.siamics.net \
    --to=ivan@siamics.net \
    --cc=20471@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).