all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* emacs hangs and takes 100% cpu when ssh exit abnormally.
@ 2008-12-18  3:39 Peter Wang
  0 siblings, 0 replies; only message in thread
From: Peter Wang @ 2008-12-18  3:39 UTC (permalink / raw)
  To: emacs-devel


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.





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-12-18  3:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-18  3:39 emacs hangs and takes 100% cpu when ssh exit abnormally Peter Wang

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.