all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Elias Martenson <elias.martenson@murex.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 25178@debbugs.gnu.org, Andreas Schwab <schwab@linux-m68k.org>
Subject: bug#25178: 26.0.50; Crash when pressing C-g in TTY mode
Date: Wed, 14 Dec 2016 11:13:35 +0800	[thread overview]
Message-ID: <yxd8k2b3mcdc.fsf@murex.com> (raw)
In-Reply-To: <8337hrboy0.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 13 Dec 2016 21:37:27 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

> > From: Andreas Schwab <schwab@linux-m68k.org>
> > Cc: Elias Martenson <elias.martenson@murex.com>,  25178@debbugs.gnu.org
> > Date: Tue, 13 Dec 2016 20:26:10 +0100
> > 
> > On Dez 13 2016, Eli Zaretskii <eliz@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.

  parent reply	other threads:[~2016-12-14  3:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-12  4:33 bug#25178: 26.0.50; Crash when pressing C-g in TTY mode Elias Martenson
2016-12-12 16:56 ` Eli Zaretskii
2016-12-13  2:52   ` Elias Martenson
2016-12-13  3:07   ` Elias Martenson
2016-12-13 18:45     ` Eli Zaretskii
2016-12-13 19:26       ` Andreas Schwab
2016-12-13 19:37         ` Eli Zaretskii
2016-12-13 20:12           ` Andreas Schwab
2016-12-14  3:13           ` Elias Martenson [this message]
2016-12-14  3:09       ` Elias Martenson
2016-12-14  3:39         ` Eli Zaretskii
2016-12-14  5:41           ` Elias Martenson
2016-12-17 13:58         ` Eli Zaretskii
2016-12-19  2:48           ` Elias Martenson
     [not found] ` <E1cJ1Z7-0000yc-Dd@eggs.gnu.org>
2017-01-05 23:39   ` npostavs
2017-01-06  7:47     ` Eli Zaretskii

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=yxd8k2b3mcdc.fsf@murex.com \
    --to=elias.martenson@murex.com \
    --cc=25178@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --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.