GNU bug report logs - #7951
23.1; SIG_HUP handler infinite loop?

Previous Next

Package: emacs;

Reported by: Alan Malloy <alan.malloy <at> yieldbuild.com>

Date: Mon, 31 Jan 2011 19:03:01 UTC

Severity: normal

Merged with 4970

Found in version 23.1

Done: Jan Djärv <jan.h.d <at> swipnet.se>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 7951 in the body.
You can then email your comments to 7951 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7951; Package emacs. (Mon, 31 Jan 2011 19:03:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alan Malloy <alan.malloy <at> yieldbuild.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 31 Jan 2011 19:03:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Alan Malloy <alan.malloy <at> yieldbuild.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 23.1; SIG_HUP handler infinite loop?
Date: Mon, 31 Jan 2011 11:05:01 -0800
[Message part 1 (text/plain, inline)]
Steps to reproduce:

1. ssh into my machine from somewhere else

2. fire up emacs in terminal mode

3. suspend the emacs process with C-z

4. violently kill the ssh process on the other machine, so that it
doesn't send a clean logout

Symptoms:

The emacs process remains alive on my machine, quickly climbs to 100%
CPU usage, and gradually allocates more and more memory, apparently
stopping at 2GB. It doesn't respond to SIGINT (kill [pid]); I have to
send it a SIGKILL to get my machine back. If I strace the running
process, I get the following lines repeated forever:

gettimeofday({1296499016, 975065}, NULL) = 0
gettimeofday({1296499016, 975102}, NULL) = 0
gettimeofday({1296499016, 975128}, NULL) = 0
rt_sigprocmask(SIG_BLOCK, [IO], [HUP TERM IO], 8) = 0
ioctl(3, FIONREAD, [0]) = -1 EIO (Input/output error)
kill(1793, SIGHUP) = 0
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfc0fba8) = -1 EIO 
(Input/output error)
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfc0fb14) = -1 EIO 
(Input/output error)
ioctl(3, SNDCTL_TMR_STOP or TCSETSW, {B0 -opost -isig -icanon -echo 
...}) = -1 EIO (Input/output error)
write(3, "\7", 1) = -1 EIO (Input/output error)
gettimeofday({1296499016, 975503}, NULL) = 0
gettimeofday({1296499016, 975529}, NULL) = 0
gettimeofday({1296499016, 975555}, NULL) = 0
rt_sigprocmask(SIG_BLOCK, [IO], [HUP TERM IO], 8) = 0
ioctl(3, FIONREAD, [0]) = -1 EIO (Input/output error)
kill(1793, SIGHUP) = 0
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfc0fba8) = -1 EIO 
(Input/output error)

FD 3 is /dev/tty, if that's relevant. In my limited experience, it
looks like something weird is happening in the SIGHUP handler,
possibly trying to send some data to the disconnected TTY and
repeating when that causes an error. But really I've no idea, so I'll
leave it at that and hope the strace is useful. I'd like to attach GDB
to get a stack trace, but I didn't install from source and it would be
kinda a hassle to switch unless someone tells me that will be useful.


In GNU Emacs 23.1.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2010-11-23 on rothera, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.10706000
configured using `configure  '--build=i486-linux-gnu' 
'--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' 
'--libexecdir=/usr/lib' '--localstatedir=/var/lib' 
'--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' 
'--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim' 
'--with-x=yes' '--with-x-toolkit=lucid' '--with-toolkit-scroll-bars' 
'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 
'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS=''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  global-auto-complete-mode: t
  auto-complete-mode: t
  delete-selection-mode: t
  tooltip-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <menu-bar> <help-menu> <about-emacs>
<help-echo> C-x k <return> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <menu-bar>
<help-menu> <send-emacs-bug-report>

Recent messages:
Loading /etc/emacs/site-start.d/50emacs-goodies-el.el (source)...done
Loading /etc/emacs/site-start.d/50git-core.el (source)...done
Loading /etc/emacs/site-start.d/50psvn.el (source)...done
Loading /etc/emacs/site-start.d/50slime.el (source)...
Loading /usr/share/emacs23/site-lisp/slime/slime-autoloads...done
Loading /etc/emacs/site-start.d/50slime.el (source)...done
Loading delsel...done
Loading /home/akm/.emacs.d/elpa/package.el (source)...done
Loading /home/akm/src/clojure/cdt/ide/emacs/cdt.el (source)...done
For information about GNU Emacs and the GNU system, type C-h C-a. [2 times]

-- 
------------------------------------------------------------------------
Alan Malloy
HubPages <www.hubpages.com> software engineer
415-273-9702
alan.malloy <at> yieldbuild.com <mailto:alan.malloy <at> yieldbuild.com>
[Message part 2 (text/html, inline)]

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7951; Package emacs. (Mon, 31 Jan 2011 22:34:02 GMT) Full text and rfc822 format available.

Message #8 received at 7951 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Alan Malloy <alan.malloy <at> yieldbuild.com>
Cc: 7951 <at> debbugs.gnu.org
Subject: Re: bug#7951: 23.1; SIG_HUP handler infinite loop?
Date: Mon, 31 Jan 2011 17:41:25 -0500
Alan Malloy wrote:

> 1. ssh into my machine from somewhere else
>
> 2. fire up emacs in terminal mode
>
> 3. suspend the emacs process with C-z
>
> 4. violently kill the ssh process on the other machine, so that it
> doesn't send a clean logout
>
> Symptoms:
>
> The emacs process remains alive on my machine, quickly climbs to 100%
> CPU usage,

Is this with `emacs -Q -nw'? Because I could not reproduce it with
Emacs 23.1 or 23.2 using -Q. If it does not happen with -Q, please try
to narrow down a precise recipe starting from -Q.

> In GNU Emacs 23.1.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
>  of 2010-11-23 on rothera, modified by Debian




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7951; Package emacs. (Mon, 31 Jan 2011 22:38:01 GMT) Full text and rfc822 format available.

Message #11 received at 7951 <at> debbugs.gnu.org (full text, mbox):

From: Alan Malloy <alan.malloy <at> yieldbuild.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 7951 <at> debbugs.gnu.org
Subject: Re: bug#7951: 23.1; SIG_HUP handler infinite loop?
Date: Mon, 31 Jan 2011 14:46:34 -0800
[Message part 1 (text/plain, inline)]
I was not using -Q (didn't know about it), but having gotten your 
suggestion I tried it and still see the buggy behavior.

On 01/31/2011 02:41 PM, Glenn Morris wrote:
> Alan Malloy wrote:
>
>> 1. ssh into my machine from somewhere else
>>
>> 2. fire up emacs in terminal mode
>>
>> 3. suspend the emacs process with C-z
>>
>> 4. violently kill the ssh process on the other machine, so that it
>> doesn't send a clean logout
>>
>> Symptoms:
>>
>> The emacs process remains alive on my machine, quickly climbs to 100%
>> CPU usage,
> Is this with `emacs -Q -nw'? Because I could not reproduce it with
> Emacs 23.1 or 23.2 using -Q. If it does not happen with -Q, please try
> to narrow down a precise recipe starting from -Q.
>
>> In GNU Emacs 23.1.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
>>   of 2010-11-23 on rothera, modified by Debian

-- 
------------------------------------------------------------------------
Alan Malloy
HubPages <www.hubpages.com> software engineer
415-273-9702
alan.malloy <at> yieldbuild.com <mailto:alan.malloy <at> yieldbuild.com>
[Message part 2 (text/html, inline)]

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7951; Package emacs. (Mon, 31 Jan 2011 23:14:02 GMT) Full text and rfc822 format available.

Message #14 received at 7951 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Alan Malloy <alan.malloy <at> yieldbuild.com>
Cc: 7951 <at> debbugs.gnu.org
Subject: Re: bug#7951: 23.1; SIG_HUP handler infinite loop?
Date: Mon, 31 Jan 2011 18:22:12 -0500
> In GNU Emacs 23.1.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
>   of 2010-11-23 on rothera, modified by Debian

Can you try Debian's latest 23.2+1-7?

http://packages.qa.debian.org/e/emacs23.html




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7951; Package emacs. (Mon, 29 Aug 2011 16:10:02 GMT) Full text and rfc822 format available.

Message #17 received at 7951 <at> debbugs.gnu.org (full text, mbox):

From: Charles Hedrick <hedrick <at> rutgers.edu>
To: 7951 <at> debbugs.gnu.org
Subject: SIG_HUP handler infinite loop
Date: Mon, 29 Aug 2011 10:36:13 -0400
I'm seeing that on Ubuntu 10.4. It's caused production systems to become unusable often enough that we're backing off to Emacs 22.

There's no Ubuntu package for a later version, so I can't verify whether it's fixed. The problem is easily reproducible using the instructions in the original bug report.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#7951; Package emacs. (Tue, 04 Oct 2011 07:27:02 GMT) Full text and rfc822 format available.

Message #20 received at 7951 <at> debbugs.gnu.org (full text, mbox):

From: "era eriksson" <era+emacs <at> iki.fi>
To: 7951 <at> debbugs.gnu.org
Subject: Duplicate of #4970?
Date: Tue, 04 Oct 2011 10:23:47 +0300
Is this bug a duplicate of #4970?

(https://bugs.launchpad.net/emacs/+bug/786730/comments/2 alleges that it
is; it seems to me like a plausible conjecture.)

/* era */

-- 
If this were a real .signature, it would suck less.  Well, maybe not.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#7951; Package emacs. (Tue, 04 Oct 2011 07:32:02 GMT) Full text and rfc822 format available.

Message #23 received at 7951 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: "era eriksson" <era+emacs <at> iki.fi>
Cc: 7951 <at> debbugs.gnu.org
Subject: Re: bug#7951: Duplicate of #4970?
Date: Tue, 04 Oct 2011 03:29:41 -0400
"era eriksson" wrote:

> Is this bug a duplicate of #4970?

Well, that one was fixed in Emacs 23.2, so I repeat my suggestion to try
23.2 (preferably 23.3 now).




Forcibly Merged 4970 7951. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 18 Oct 2011 07:07:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 15 Nov 2011 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 221 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.