unofficial mirror of bug-gnu-emacs@gnu.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
Subject: bug#17561: Emacs can forget processes
Date: Tue, 27 May 2014 20:27:56 +0200	[thread overview]
Message-ID: <20140527202756.7bade0ce@forcix.jorgenschaefer.de> (raw)
In-Reply-To: <5383D535.2000407@cs.ucla.edu>

On Mon, 26 May 2014 16:58:45 -0700
Paul Eggert <eggert@cs.ucla.edu> wrote:

> Jorgen Schaefer wrote:
> > the-bug.txt.gz ... shows the strace of a
> > running Emacs session which starts to exhibit the bug, so we now
> > have a trace that includes the time when the bug actually happens.
> > It shows me starting Python subprocesses (elpy RPC processes) and
> > killing them, in an attempt to reproduce the problem. Eventually,
> > this succeeds, and Emacs goes into the loop reading from fd 15.
> 
> Thanks for that trace; it's helpful.  A couple of things.  First,
> what platform are you running on, exactly?  I'm running on an AMD
> Phenom II X4 910e (according to /proc/cpuinfo), and using Fedora 20
> x86-64 (Linux kernel 3.14.4-200.fc20.x86_64, glibc 2.18), and
> compiling with GCC 4.9.0.

Thanks for making me check that. There was a bit of a wtf there for
me :-D The strace is from an OpenVZ virtual host:

Debian GNU/Linux 7.5 (wheezy)
Intel(R) Xeon(R) CPU E5-2620 0 @ 2.00GHz
Linux kernel 3.2.41-042stab085.20
eglibc 2.13

Note the embedded glibc. 

I have seen a similar behavior (Emacs suddenly responding badly,
improving once processes are killed) on this type of system:

openSUSE 12.2 (x86_64)
Intel(R) Core(TM) i3-2120 CPU @ 3.30GHz
Linux kernel 3.4.63-2.44-desktop
glibc-2.15
gcc 4.7.1

But I can't know for sure if it's the same bug.

> Second, looking at the-bug.txt I'm suspicious about the interaction 
> between vfork, pthread_sigmask (aka rt_sigprocmask) and rt_sigreturn. 
> Could you please try building Emacs with fork rather than vfork and
> see whether that fixes the problem?  If it fixes things, great; if
> not I'd like to see another strace of the bug.  To use fork instead
> of vfork, you can run "./configure ac_cv_func_fork_works=no", or
> (faster but flimsier) edit src/config.h to add "#define fork vfork".

Should that be ac_cv_func_vfork_works=no? I have no recompiled Emacs
with the latter change, and it's using clone(2) to execute processes,
which sounds right. I haven't been able to reproduce the bug so far,
sadly that doesn't say much, I have gone for over a week before without
noticing the bug until it reappeared.

Regards,
Jorgen





  reply	other threads:[~2014-05-27 18:27 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 [this message]
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
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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=20140527202756.7bade0ce@forcix.jorgenschaefer.de \
    --to=forcer@forcix.cx \
    --cc=17561@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).