From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#25178: 26.0.50; Crash when pressing C-g in TTY mode Date: Tue, 13 Dec 2016 20:45:25 +0200 Message-ID: <838trjbrcq.fsf@gnu.org> References: <83bmwhccib.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1481654839 26608 195.159.176.226 (13 Dec 2016 18:47:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 13 Dec 2016 18:47:19 +0000 (UTC) Cc: 25178@debbugs.gnu.org To: Elias Martenson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 13 19:47:12 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cGs6W-00059a-Bd for geb-bug-gnu-emacs@m.gmane.org; Tue, 13 Dec 2016 19:47:08 +0100 Original-Received: from localhost ([::1]:40081 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGs6a-0004dK-MA for geb-bug-gnu-emacs@m.gmane.org; Tue, 13 Dec 2016 13:47:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46959) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGs6U-0004d4-6R for bug-gnu-emacs@gnu.org; Tue, 13 Dec 2016 13:47:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cGs6Q-0005Nz-Ay for bug-gnu-emacs@gnu.org; Tue, 13 Dec 2016 13:47:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53840) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cGs6Q-0005Nt-7Z for bug-gnu-emacs@gnu.org; Tue, 13 Dec 2016 13:47:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cGs6P-0005M5-Uo for bug-gnu-emacs@gnu.org; Tue, 13 Dec 2016 13:47:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Dec 2016 18:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25178 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25178-submit@debbugs.gnu.org id=B25178.148165476520519 (code B ref 25178); Tue, 13 Dec 2016 18:47:01 +0000 Original-Received: (at 25178) by debbugs.gnu.org; 13 Dec 2016 18:46:05 +0000 Original-Received: from localhost ([127.0.0.1]:41006 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cGs5V-0005Kt-Dj for submit@debbugs.gnu.org; Tue, 13 Dec 2016 13:46:05 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:55808) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cGs5T-0005KB-RO for 25178@debbugs.gnu.org; Tue, 13 Dec 2016 13:46:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cGs5K-000566-Ll for 25178@debbugs.gnu.org; Tue, 13 Dec 2016 13:45:58 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49382) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGs5K-000561-JU; Tue, 13 Dec 2016 13:45:54 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2730 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cGs5H-0000uo-Pn; Tue, 13 Dec 2016 13:45:54 -0500 In-reply-to: (message from Elias Martenson on Tue, 13 Dec 2016 11:07:08 +0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:126997 Archived-At: > From: Elias Martenson > CC: <25178@debbugs.gnu.org> > Date: Tue, 13 Dec 2016 11:07:08 +0800 > > Here is the actual stack trace from the core dump generated during the > crash: > > Machine ID: 50467f3a69eb4dbea19c8a2972949839 > Hostname: em-desktop > Storage: /var/lib/systemd/coredump/core.emacs.50067.45a62f2ad9804a0b81fed25ad8faffab.21460.1481598260000000000000.lz4 > Message: Process 21460 (emacs) of user 50067 dumped core. > > Stack trace of thread 21460: > #0 0x00007fec16127f5f raise (libpthread.so.0) > #1 0x0000000000553c66 terminate_due_to_signal (emacs-26.0.50) > #2 0x00000000005783c1 handle_fatal_signal (emacs-26.0.50) > #3 0x0000000000578392 deliver_thread_signal (emacs-26.0.50) > #4 0x00000000005783f8 deliver_fatal_thread_signal (emacs-26.0.50) > #5 0x00000000005785ae handle_sigsegv (emacs-26.0.50) > #6 0x00007fec16128080 __restore_rt (libpthread.so.0) > #7 0x00007fec161296a0 __lll_unlock_elision (libpthread.so.0) > #8 0x0000000000677a94 sys_mutex_unlock (emacs-26.0.50) > #9 0x000000000067638d release_global_lock (emacs-26.0.50) > #10 0x0000000000676d75 really_call_select (emacs-26.0.50) > #11 0x00000000005d4a02 flush_stack_call_func (emacs-26.0.50) > #12 0x0000000000676e2b thread_select (emacs-26.0.50) > #13 0x0000000000651168 wait_reading_process_output (emacs-26.0.50) > #14 0x00000000004252be sit_for (emacs-26.0.50) > #15 0x000000000055bc48 read_char (emacs-26.0.50) Hmm... Is calling pthread_mutex_unlock twice in a row, without an intervening call to pthread_mutex_lock, supposed to segfault? Posix seems to say the result is undefined behavior, but AFAICT by looking in the glibc sources, its implementation triggers a crash in that case. Strangely, I don't see this on the GNU/Linux system to which I have access, although Emacs definitely calls pthread_mutex_unlock twice in a row in the scenario of this bug report. Is this some change in latest versions of glibc?