all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Peter Wang <peterwang@vip.qq.com>
To: emacs-devel@gnu.org
Subject: emacs hangs and takes 100% cpu when ssh exit abnormally.
Date: Thu, 18 Dec 2008 11:39:58 +0800	[thread overview]
Message-ID: <u8wqerw1d.fsf@vip.qq.com> (raw)


hi, all.  

    I use the latest cvs version emacs, and come across a problem, i
think it may be a bug, problem details as follows:

my machine env:
$ cat /etc/SuSE-release 
SUSE Linux Enterprise Server 10 (i586)
VERSION = 10

$ /lib/libc.so.6 
GNU C Library development release version 2.4 (20060616), by Roland McGrath et al.

$ uname -a
Linux sbox 2.6.16.21-0.8 #1 SMP Mon Dec 10 09:28:01 CST 2007 i686 athlon i386 GNU/Linux

the emacs process takes 100% cpu, and when strace the process, it outputs:
gettimeofday({1229568244, 285707}, NULL) = 0
rt_sigprocmask(SIG_UNBLOCK, [ALRM], [HUP ALRM TERM IO], 8) = 0
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfdab1a8) = -1 EIO (Input/output error)
ioctl(3, SNDCTL_TMR_STOP or TCSETSW, {B4000000 opost -isig -icanon -echo ...}) = -1 EIO (Input/output error)
write(3, "\7", 1)                       = -1 EIO (Input/output error)
gettimeofday({1229568244, 286053}, NULL) = 0
gettimeofday({1229568244, 286087}, NULL) = 0
gettimeofday({1229568244, 286119}, NULL) = 0
rt_sigprocmask(SIG_BLOCK, [IO], [HUP TERM IO], 8) = 0
ioctl(3, FIONREAD, [24])                = -1 EIO (Input/output error)
kill(13574, SIGHUP)                     = 0
rt_sigprocmask(SIG_BLOCK, [ALRM], [HUP TERM IO], 8) = 0
gettimeofday({1229568244, 286310}, NULL) = 0
rt_sigprocmask(SIG_UNBLOCK, [ALRM], [HUP ALRM TERM IO], 8) = 0
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfdab1a8) = -1 EIO (Input/output error)
ioctl(3, SNDCTL_TMR_STOP or TCSETSW, {B4000000 opost -isig -icanon -echo ...}) = -1 EIO (Input/output error)
write(3, "\7", 1)                       = -1 EIO (Input/output error)
gettimeofday({1229568244, 286629}, NULL) = 0
gettimeofday({1229568244, 286662}, NULL) = 0
gettimeofday({1229568244, 286694}, NULL) = 0
rt_sigprocmask(SIG_BLOCK, [IO], [HUP TERM IO], 8) = 0
ioctl(3, FIONREAD, [24])                = -1 EIO (Input/output error)
kill(13574, SIGHUP)                     = 0
rt_sigprocmask(SIG_BLOCK, [ALRM], [HUP TERM IO], 8) = 0

and i grep the source code of emacs, and found:
emacs/src/keyboard.c:7030

             if (!terminal_list->next_terminal)
                /* Formerly simply reported no input, but that                                                                
                   sometimes led to a failure of Emacs to terminate.                                                          
                   SIGHUP seems appropriate if we can't reach the                                                             
                   terminal.  */
                /* ??? Is it really right to send the signal just to                                                          
                   this process rather than to the whole process                                                              
                   group?  Perhaps on systems with FIONREAD Emacs is                                                          
                   alone in its group.  */
                kill (getpid (), SIGHUP);

i think here may be the bug code, is there any emacs expert confirm that, thanks.





                 reply	other threads:[~2008-12-18  3:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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

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

  git send-email \
    --in-reply-to=u8wqerw1d.fsf@vip.qq.com \
    --to=peterwang@vip.qq.com \
    --cc=emacs-devel@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.