unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Markus Triska <markus.triska@gmx.at>
To: 84@emacsbugs.donarmstrong.com
Subject: bug#84: Acknowledgement (23.0.60; Occasional hangs in  flyspell-mode and ispell-word)
Date: Sat, 12 Jul 2008 17:56:41 +0200	[thread overview]
Message-ID: <m13amfp03q.fsf@mt-computer.local.i-did-not-set--mail-host-address--so-tickle-me> (raw)
In-Reply-To: m1iqvds5s4.fsf@gmx.at


I now think the previous patch only fixes a symptom of an underlying
problem, which is that the aspell process occasionally receives SIGPIPE
and terminates unexpectedly. Here's a simpler test case - it seems to
work only on OSX and with Emacs >= 23, but I have seen very similar
problems on other systems and with Emacs <= 22 too (for example, when
replying to a post in Gnus, sometimes aspell would die and not be
restarted). Let f.el consist of:

   (defun reactivate-flyspell ()
     (unless (memq 'flyspell-post-command-hook post-command-hook)
       (flyspell-mode 1)))

   (setq my-idle (run-with-idle-timer 0.1 t 'reactivate-flyspell))

If I then do:

1) $ emacs -Q f.el -f eval-buffer

2) enter and leave Gnus twice: M-x gnus RET q y M-x gnus RET q y

3) kill the aspell process:
   
   M-! killall -9 aspell RET

   (aspell is instantly restarted by the idle timer, and you can attach
    gdb to the new process to verify the signal in the next step.)
   
4) M-x gnus RET q y  (==> you're back in f.el - do anything, like C-n)

   Now aspell receives SIGPIPE and exits, and I get EBADF in
   wait_reading_process_output; the previous patch handles this, and
   thus you can at least interrupt the wait. Ideally though, the aspell
   process would not have been killed in the first place, and besides,
   after SIGPIPE, the process status should become 'signal eventually.

I would like to trace down where the SIGPIPE comes from, and how the
file descriptor can become invalid in Emacs; I've traced through the
Lisp code of Gnus and flyspell/ispell, and they seem not to touch the
aspell process here.  What would be a good place to put a breakpoint in
GDB, such that I can observe execution right after the final "C-n" in
f.el?  I tried to raise an error in before-change-functions in f.el, and
instead of "C-n" insert a character in the last step, so that I can put
a breakpoint in Fsignal, but the SIGPIPE occurs before this hook.






      reply	other threads:[~2008-07-12 15:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080327052040.002826434E0@mt-computer.local>
     [not found] ` <handler.84.B.120662569622724.ack@emacsbugs.donarmstrong.com>
2008-07-08 13:25   ` bug#84: Acknowledgement (23.0.60; Occasional hangs in flyspell-mode and ispell-word) Markus Triska
2008-07-08 18:24     ` Markus Triska
2008-07-09  9:57       ` Markus Triska
2008-07-10 23:01         ` Markus Triska
2008-07-12 15:56           ` Markus Triska [this message]

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=m13amfp03q.fsf@mt-computer.local.i-did-not-set--mail-host-address--so-tickle-me \
    --to=markus.triska@gmx.at \
    --cc=84@emacsbugs.donarmstrong.com \
    /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).