From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Daniel Kraus Newsgroups: gmane.emacs.bugs Subject: bug#28430: 26.0.50; Segfault on unexpected connection loss Date: Thu, 14 Sep 2017 10:27:08 +0800 Message-ID: <87a81ygglf.fsf@matrix> References: <87h8w8qxrz.fsf@matrix> <83d16wq7vl.fsf@gnu.org> <87h8w7hsi9.fsf@matrix> <83tw06ocm1.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1505356094 17377 195.159.176.226 (14 Sep 2017 02:28:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 14 Sep 2017 02:28:14 +0000 (UTC) Cc: 28430@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 14 04:28:06 2017 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 1dsJsr-0004M9-Og for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 Sep 2017 04:28:06 +0200 Original-Received: from localhost ([::1]:45416 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dsJsy-0000fF-PJ for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Sep 2017 22:28:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57008) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dsJss-0000ef-J3 for bug-gnu-emacs@gnu.org; Wed, 13 Sep 2017 22:28:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dsJso-0002l1-Jc for bug-gnu-emacs@gnu.org; Wed, 13 Sep 2017 22:28:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58828) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dsJso-0002kt-GP for bug-gnu-emacs@gnu.org; Wed, 13 Sep 2017 22:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dsJso-00067D-7f for bug-gnu-emacs@gnu.org; Wed, 13 Sep 2017 22:28:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Kraus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Sep 2017 02:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28430 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28430-submit@debbugs.gnu.org id=B28430.150535605523473 (code B ref 28430); Thu, 14 Sep 2017 02:28:02 +0000 Original-Received: (at 28430) by debbugs.gnu.org; 14 Sep 2017 02:27:35 +0000 Original-Received: from localhost ([127.0.0.1]:39276 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dsJsN-00066W-6E for submit@debbugs.gnu.org; Wed, 13 Sep 2017 22:27:35 -0400 Original-Received: from mx2.mailbox.org ([80.241.60.215]:54280) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dsJsK-00066E-Lp for 28430@debbugs.gnu.org; Wed, 13 Sep 2017 22:27:33 -0400 Original-Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 82F3148617; Thu, 14 Sep 2017 04:27:26 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Original-Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter02.heinlein-hosting.de (spamfilter02.heinlein-hosting.de [80.241.56.116]) (amavisd-new, port 10030) with ESMTP id VR1PiMi-QTij; Thu, 14 Sep 2017 04:27:24 +0200 (CEST) In-reply-to: <83tw06ocm1.fsf@gnu.org> 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:136950 Archived-At: Eli Zaretskii writes: >> From: Daniel Kraus >> Cc: 28430@debbugs.gnu.org >> Date: Wed, 13 Sep 2017 17:12:14 +0800 >> >> >> Open new buffer (e.g. 'test.rest') and `M-x restclient-mode`. >> >> Type: >> >> `GET http://127.0.0.1:6543/` >> >> and then press `C-c C-c` >> >> >> >> Switch to the netcat window and Ctrl-C to break up the connection. >> >> Emacs segfaults: >> >> #+BEGIN_QUOTE >> >> Fatal error 11: Segmentation fault >> > >> > Can you please run this under GDB, and when Emacs segfaults, produce >> > the C backtrace and post it here? >> >> --cut-- >> #0 0x00007ffff017bc40 in raise () at /usr/lib/libpthread.so.0 >> #1 0x0000000000597ab9 in terminate_due_to_signal (sig=6, backtrace_limit=2147483647) at emacs.c:394 >> #2 0x0000000000632a74 in die (msg=0x778761 "CONSP (data)", file=0x7786d1 "keyboard.c", line=999) at alloc.c:7419 >> #3 0x000000000059c3e1 in cmd_error_internal (data=..., context=0x798c6c "error in process sentinel: ") at keyboard.c:999 >> #4 0x00000000006c5edd in exec_sentinel_error_handler (error_val=...) at process.c:7105 >> #5 0x0000000000657d51 in internal_condition_case_1 (bfun=0x6c2b0d , arg=..., handlers=..., hfun=0x6c5ebe ) at eval.c:1352 >> #6 0x00000000006c609c in exec_sentinel (proc=..., reason=...) at process.c:7158 >> #7 0x00000000006c6303 in status_notify (deleting_process=0x0, wait_proc=0x0) at process.c:7260 > > Thanks. This seems to be a slightly different problem: the signal > here is 6 (SIGABRT), not SIGSEGV. Before I had Emacs compiled with compiler optimisations and stripped debug symbols.. maybe that's why? > In any case, can you show what these GDB commands produce, after the > crash is triggered, and you wind up in 'raise'? > > (gdb) frame 4 > (gdb) pp error_val > > After "frame 4", you should be in this function: > > #4 0x00000000006c5edd in exec_sentinel_error_handler (error_val=...) at process.c:7105 > > If not, adjust the argument 4 as needed. Hmm, not sure that's what you're looking for. `pp` gave `Undefined command`. I started gdb from another Emacs instance like described in the DEBUG document if that matters. --cut-- (gdb) r Starting program: /home/daniel/repos/emacs-git/src/emacs-git/src/bootstrap-emacs -Q [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". [New Thread 0x7fffe5694700 (LWP 9879)] [New Thread 0x7fffdffff700 (LWP 9880)] [New Thread 0x7fffdf670700 (LWP 9881)] [New Thread 0x7fffe402ca40 (LWP 10179)] [Thread 0x7fffe402ca40 (LWP 10179) exited] Thread 1 "bootstrap-emacs" received signal SIGABRT, Aborted. 0x00007ffff017bc40 in raise () from /usr/lib/libpthread.so.0 (gdb) frame 4 #4 0x00000000006c5edd in exec_sentinel_error_handler (error_val=...) at process.c:7105 7105 cmd_error_internal (error_val, "error in process sentinel: "); (gdb) pp error_val Undefined command: "pp". Try "help". (gdb) print error_val $1 = {i = 0} --cut-- Let me know if/how I should further investigate. Thanks, Daniel