GNU bug report logs - #11403
24.0.96; Emacs crashes when ViewMail downloads IMAP messages

Previous Next

Packages: ns, emacs;

Reported by: Konrad Hinsen <konrad.hinsen <at> fastmail.net>

Date: Fri, 4 May 2012 10:47:02 UTC

Severity: normal

Merged with 10752, 11584

Found in versions 24.0.93, 24.0.96, 24.0.97

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: Chong Yidong <cyd <at> gnu.org>
To: Konrad Hinsen <konrad.hinsen <at> fastmail.net>
Cc: 11403 <at> debbugs.gnu.org
Subject: Re: bug#11403: 24.0.96;
	Emacs crashes when ViewMail downloads IMAP messages
Date: Sat, 05 May 2012 00:08:02 +0800
Konrad Hinsen <konrad.hinsen <at> fastmail.net> writes:

> Sorry, I can't give a recipe, but this happens about twice a day
> since I use prerelease 24.0.96. The situation is always the same:
> I open a VM folder (VM = ViewMail), or I refresh an already opened
> one. VM starts downloading messages from my IMAP server, annoucing
> its progress in the minibuffer. And then Emacs crashes before VM
> as finished downloading and displaying the new messages.

I assume, from your description, that these crashes didn't happen on
24.0.95?

Off the top of my head, I don't see anything informative in the
backtrace you sent.  But if the bug has something to with process
interaction, there was only one change in process.c between 24.0.95 and
24.0.96 which could have caused this.

Could you try running with the following patch (which basically reverts
said change) and see if it makes any difference?


=== modified file 'src/process.c'
*** src/process.c	2012-04-20 06:39:29 +0000
--- src/process.c	2012-05-04 16:04:10 +0000
***************
*** 4893,4915 ****
  		 It can't hurt.  */
  	      else if (nread == -1 && errno == EIO)
  		{
! 		  struct Lisp_Process *p = XPROCESS (proc);
! 
! 		  /* Clear the descriptor now, so we only raise the
! 		     signal once.  */
! 		  FD_CLR (channel, &input_wait_mask);
! 		  FD_CLR (channel, &non_keyboard_wait_mask);
! 
! 		  if (p->pid == -2)
! 		    {
! 		      /* If the EIO occurs on a pty, sigchld_handler's
! 			 wait3() will not find the process object to
! 			 delete.  Do it here.  */
! 		      p->tick = ++process_tick;
! 		      p->status = Qfailed;
! 		    }
!                   else
! 		    kill (getpid (), SIGCHLD);
  		}
  #endif /* HAVE_PTYS */
  	      /* If we can detect process termination, don't consider the
--- 4893,4908 ----
  		 It can't hurt.  */
  	      else if (nread == -1 && errno == EIO)
  		{
!                   /* Don't do anything if only a pty, with no associated
! 		     process (bug#10933).  */
!                   if (XPROCESS (proc)->pid != -2) {
!                     /* Clear the descriptor now, so we only raise the signal
! 		       once.  */
!                     FD_CLR (channel, &input_wait_mask);
!                     FD_CLR (channel, &non_keyboard_wait_mask);
!                     
!                     kill (getpid (), SIGCHLD);
!                   }
  		}
  #endif /* HAVE_PTYS */
  	      /* If we can detect process termination, don't consider the





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

Previous Next


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