GNU bug report logs - #25178
26.0.50; Crash when pressing C-g in TTY mode

Previous Next

Package: emacs;

Reported by: Elias Martenson <elias.martenson <at> murex.com>

Date: Mon, 12 Dec 2016 04:34:01 UTC

Severity: normal

Tags: fixed

Found in version 26.0.50

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


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

From: Elias Martenson <elias.martenson <at> murex.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 25178 <at> debbugs.gnu.org, Andreas Schwab <schwab <at> linux-m68k.org>
Subject: Re: bug#25178: 26.0.50; Crash when pressing C-g in TTY mode
Date: Wed, 14 Dec 2016 11:13:35 +0800
Eli Zaretskii <eliz <at> gnu.org> writes:

> > From: Andreas Schwab <schwab <at> linux-m68k.org>
> > Cc: Elias Martenson <elias.martenson <at> murex.com>,  25178 <at> debbugs.gnu.org
> > Date: Tue, 13 Dec 2016 20:26:10 +0100
> > 
> > On Dez 13 2016, Eli Zaretskii <eliz <at> gnu.org> wrote:
> > 
> > > Hmm...  Is calling pthread_mutex_unlock twice in a row, without an
> > > intervening call to pthread_mutex_lock, supposed to segfault?
> > 
> > It's undefined, so anything can happen.  Just don't do that.
> 
> At this point, I'd like to establish whether the fact Emacs does do it
> could explain crashes reported by Elias which I cannot reproduce on a
> different GNU/Linux system.
> 
> What I think happens is that C-g on a TTY produces a SIGINT that
> interrupts the call to pselect and runs handle_interrupt, which then
> longjmps back to read_char, which then calls thread_select.  But since
> pselect inside the previous call to thread_select was interrupted, the
> following call to acquire_global_lock was not done, and we are now
> running with the global lock unlocked.  Then thread_select calls
> release_global_lock which attempts to unlock the (unlocked) mutex.
> 
> The question is whether this is just bad, or causes the crash.  It
> doesn't crash for me.

I'm using Arch Linux, which tends to use quite bleeding edge versions
pretty much everything.

Since I don't recall seeing this issue until recently, I'm
suspecting—although I have no proof of this—that they might have
recently introduced a change that causes this to crash instead of
silently accepting it, perhaps as a way to find bugs like this?

Regards,
Elias
*******************************

This e-mail contains information for the intended recipient only. It may contain proprietary material or confidential information. If you are not the intended recipient you are not authorised to distribute, copy or use this e-mail or any attachment to it. Murex cannot guarantee that it is virus free and accepts no responsibility for any loss or damage arising from its use. If you have received this e-mail in error please notify immediately the sender and delete the original email received, any attachments and all copies from your system.

This bug report was last modified 8 years and 139 days ago.

Previous Next


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