all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jorgen Schaefer <forcer@forcix.cx>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: 17561@debbugs.gnu.org, Andreas Schwab <schwab@linux-m68k.org>
Subject: bug#17561: Emacs can forget processes
Date: Fri, 30 May 2014 22:41:56 +0200	[thread overview]
Message-ID: <20140530224156.78b2d277@forcix.jorgenschaefer.de> (raw)
In-Reply-To: <5388200A.6090508@cs.ucla.edu>

On Thu, 29 May 2014 23:07:06 -0700
Paul Eggert <eggert@cs.ucla.edu> wrote:

> Andreas Schwab wrote:
> > quit_throw_to_read_char doesn't restore the signal mask.
> 
> Thanks for the diagnosis.  I installed trunk bzr 117201 to try to fix 
> this problem.  I don't see how this would explain the bug in
> emacs-24, though, as in emacs-24 the signal handler invokes
> pthread_sigmask (SIG_SETMASK, &empty_mask, 0) before calling
> quit_throw_to_read_char, and the pthread_sigmask call should restore
> the signal mask.

I haven't been able to reproduce the bug since I am running the
patched version. Does not say it's gone, but it's a good indication.

It is entirely possible that the hangs I have witnessed in the past
were caused by some other problem. As I said initially, it's only been
the last few days that I actually had the luck to track down the
behavior in the first place (being at work is a bad time to try and
find weird behavior of your editor, sadly :-)).

So I would assume that this bug is fixed, and if I come across weird
behavior again, I'll create a new report or re-open this one. Thank you
for the excellent debugging!


Possibly related, while trying to reproduce the bug, I have noticed
some other strange behavior. I managed to reduce it to the following
reproduction code:

(with-temp-buffer
  (let ((proc (start-process "test" (current-buffer) "bash" "-c"
                             "echo foo ; sleep 5")))
    (set-process-query-on-exit-flag proc nil)
    (accept-process-output nil 2)))

This hangs my normal Emacs for 2 seconds. A newly-started Emacs returns
immediately. I *suspect* that this is a timing issue, and strace
*seems* to concur - Emacs reads the "foo" from the subprocess before
running accept-process-output, and then just hangs for the two second
timeout, instead of noticing that there already was some output. Should
I create a new bug report for this?

Regards,
Jorgen





  reply	other threads:[~2014-05-30 20:41 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-23 15:52 bug#17561: 24.4.50; Emacs can forget processes Jorgen Schaefer
2014-05-23 16:28 ` bug#17561: " Paul Eggert
2014-05-23 16:44   ` Jorgen Schaefer
2014-05-24 23:01     ` Paul Eggert
2014-05-25  7:57       ` Jorgen Schaefer
2014-05-26 17:08         ` Paul Eggert
2014-05-26 18:49           ` Jorgen Schaefer
2014-05-26 23:58             ` Paul Eggert
2014-05-27 18:27               ` Jorgen Schaefer
2014-05-27 21:42                 ` Paul Eggert
2014-05-27 22:16                   ` Jorgen Schaefer
2014-05-28  0:47                     ` Paul Eggert
2014-05-28 20:53                       ` Jorgen Schaefer
2014-05-28 23:00                         ` Paul Eggert
2014-05-28 23:35                           ` Jorgen Schaefer
2014-05-29  1:22                             ` Paul Eggert
2014-05-29 10:08                               ` Jorgen Schaefer
2014-05-29 23:15                                 ` Paul Eggert
2014-05-29  4:17                             ` Paul Eggert
2014-05-29 11:39                               ` Jorgen Schaefer
2014-05-29 15:09                                 ` Paul Eggert
2014-05-29 15:22                                   ` Andreas Schwab
2014-05-29 15:26                                     ` Paul Eggert
2014-05-29 17:03                                       ` Jorgen Schaefer
2014-05-29 17:55                                         ` Andreas Schwab
2014-05-29 18:23                                           ` Jorgen Schaefer
2014-05-29 19:06                                             ` Jorgen Schaefer
2014-05-29 20:27                                               ` Andreas Schwab
2014-05-29 19:15                                             ` Andreas Schwab
2014-05-30  6:07                                               ` Paul Eggert
2014-05-30 20:41                                                 ` Jorgen Schaefer [this message]
2014-05-30 21:29                                                   ` Paul Eggert
2014-05-27  4:05             ` Paul Eggert

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=20140530224156.78b2d277@forcix.jorgenschaefer.de \
    --to=forcer@forcix.cx \
    --cc=17561@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=schwab@linux-m68k.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.