From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#38912: 27.0.60; PDumper meets segmentation fault when evil is loaded Date: Thu, 05 Mar 2020 09:14:38 +0200 Message-ID: <83zhcvuvc1.fsf@gnu.org> References: <333553AC-68DE-4F1C-9586-5A13248AD6DD@icloud.com> <83ftgvh96l.fsf@gnu.org> <83a771g2tc.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="100340"; mail-complaints-to="usenet@ciao.gmane.io" Cc: niwtrx@icloud.com, 38912@debbugs.gnu.org To: "Daniel Colascione" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 05 08:16:16 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j9kjw-000Q0X-Nt for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 Mar 2020 08:16:16 +0100 Original-Received: from localhost ([::1]:44220 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9kjv-0003TN-9C for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 Mar 2020 02:16:15 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37062) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9kjn-0003SW-Lz for bug-gnu-emacs@gnu.org; Thu, 05 Mar 2020 02:16:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j9kjm-0005M5-3V for bug-gnu-emacs@gnu.org; Thu, 05 Mar 2020 02:16:07 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36143) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j9kjl-0005Lu-W6 for bug-gnu-emacs@gnu.org; Thu, 05 Mar 2020 02:16:06 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j9kji-0000Ts-CQ for bug-gnu-emacs@gnu.org; Thu, 05 Mar 2020 02:16:04 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Mar 2020 07:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38912 X-GNU-PR-Package: emacs Original-Received: via spool by 38912-submit@debbugs.gnu.org id=B38912.15833925051774 (code B ref 38912); Thu, 05 Mar 2020 07:16:02 +0000 Original-Received: (at 38912) by debbugs.gnu.org; 5 Mar 2020 07:15:05 +0000 Original-Received: from localhost ([127.0.0.1]:42116 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j9kin-0000SY-9J for submit@debbugs.gnu.org; Thu, 05 Mar 2020 02:15:05 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50036) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j9kil-0000Rl-R6 for 38912@debbugs.gnu.org; Thu, 05 Mar 2020 02:15:04 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:39541) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j9kig-0004Cw-Dr; Thu, 05 Mar 2020 02:14:58 -0500 Original-Received: from [176.228.60.248] (port=3252 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1j9kif-00072p-S0; Thu, 05 Mar 2020 02:14:58 -0500 In-Reply-To: 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: 209.51.188.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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:176883 Archived-At: Ping! Any news in debugging this? > Date: Mon, 6 Jan 2020 09:10:20 -0800 > From: "Daniel Colascione" > Cc: "NiwTinray" , > "Daniel Colascione" , > 38912@debbugs.gnu.org > > > [Please use "Reply All" to reply, so that the bug address is kept on > > the CC list.] > > > >> From: NiwTinray > >> Date: Sun, 5 Jan 2020 13:25:07 +0800 > >> > >> > I cannot reproduce this from "emacs -Q" because 'use-package' is not a > >> > known function. Can you show a recipe starting from "emacs -Q", > >> > please? > >> > >> Here. I've attached a minimal script file that helps reproduce this bug. > >> > >> (require 'package) > >> (package-initialize) > >> (add-to-list 'package-archives > >> '("melpa-stable" . "https://stable.melpa.org/packages/") t) > >> (unless (package-installed-p 'evil) > >> (package-refresh-contents) > >> (package-install 'evil)) > >> (require 'evil) > >> (dump-emacs-portable "/tmp/test.pdmp") > >> > >> The script downloads the package "evil" from Melpa stable, load the evil > >> package > >> and dumps an image to /tmp/test.pdmp. > >> > >> > Also, does this happen if you add -Q to the Emacs invocation after > >> > dumping? If not, there's more detail missing in your report: the > >> > customizations in your init files. > >> > >> > >> Sure. Please download this file, and run the command: > >> > >> emacs --batch -Q --script evil.el > >> > >> To see the bug happen, load the test.pdmp file: > >> > >> emacs -Q --dump-file /tmp/test.pdmp > >> > >> You should see a segmentation fault: > >> > >> [1] 23369 segmentation fault (core dumped) emacs -Q --dump-file > >> /tmp/test.pdmp > >> > >> I run debugger inside src/.gdbinit using the command: > >> > >> gdb -x .gdbinit --args ./emacs --dump-file /tmp/test.pdmp > >> > >> And logged backtrace. See my second attachment: > >> > >> (base) omnisky :: ~/emacs/src ‹emacs-27*› » gdb -x .gdbinit --args > >> ./emacs --dump-file /tmp/test.pdmp > >> GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1 > >> Copyright (C) 2016 Free Software Foundation, Inc. > >> License GPLv3+: GNU GPL version 3 or later > >> > >> This is free software: you are free to change and redistribute it. > >> There is NO WARRANTY, to the extent permitted by law. Type "show > >> copying" > >> and "show warranty" for details. > >> This GDB was configured as "x86_64-linux-gnu". > >> Type "show configuration" for configuration details. > >> For bug reporting instructions, please see: > >> . > >> Find the GDB manual and other documentation resources online at: > >> . > >> For help, type "help". > >> Type "apropos word" to search for commands related to "word"... > >> Reading symbols from ./emacs...done. > >> warning: File "/home/ntr/emacs/src/.gdbinit" auto-loading has been > >> declined by your `auto-load safe-path' set to > >> "$debugdir:$datadir/auto-load". > >> To enable execution of this file add > >> add-auto-load-safe-path /home/ntr/emacs/src/.gdbinit > >> line to your configuration file "/home/ntr/.gdbinit". > >> To completely disable this security protection add > >> set auto-load safe-path / > >> line to your configuration file "/home/ntr/.gdbinit". > >> For more information about this security protection see the > >> "Auto-loading safe path" section in the GDB manual. E.g., run from the > >> shell: > >> info "(gdb)Auto-loading safe path" > >> SIGINT is used by the debugger. > >> Are you sure you want to change it? (y or n) [answered Y; input not from > >> terminal] > >> Environment variable "DISPLAY" not defined. > >> TERM = xterm-24bits > >> Breakpoint 1 at 0x411df0: file emacs.c, line 370. > >> Breakpoint 2 at 0x4bfe60: file xterm.c, line 10130. > >> (gdb) r > >> Starting program: /home/ntr/emacs/src/emacs --dump-file /tmp/test.pdmp > >> /home/ntr/emacs/src/emacs: > >> /raid_sdc/home/ntr/anaconda3/lib/libtiff.so.5: no version information > >> available (required by /home/ntr/emacs/src/emacs) > >> [Thread debugging using libthread_db enabled] > >> Using host libthread_db library > >> "/lib/x86_64-linux-gnu/libthread_db.so.1". > >> > >> Program received signal SIGSEGV, Segmentation fault. > >> 0x00000000004f12d0 in Fcurrent_active_maps (olp=olp@entry=XIL(0x30), > >> position=position@entry=XIL(0)) at keymap.c:1541 > >> 1541 && NILP (KVAR (current_kboard, > >> Voverriding_terminal_local_map)) > >> (gdb) xbacktrace > >> "key-binding" (0xffffd5c8) > >> "turn-on-undo-tree-mode" (0xffffd758) > >> "global-undo-tree-mode-enable-in-buffers" (0xffffd948) > >> "run-hooks" (0xffffd9e8) > >> "run-mode-hooks" (0xffffdbc0) > >> "minibuffer-inactive-mode" (0xffffdd40) > >> (gdb) > > > > In my debug build of Emacs 27.0.60 I get an assertion violation while > > dumping, which probably is already a sign of trouble. > > > > Daniel, any ideas? > > I haven't had a chance over the past few days to repro this problem, but I > hope to do so this weeekend. The messages about the assertion failure > *during* dumping do seem likely unrelated. The easiest way to debug this > particular crash is with rr. Run the original test as "rr record emacs > [args]", then run "rr replay". The latter will dump you in a GDB prompt. > Type "cont" and run the replay of Emacs until you get to the SIGSEGV. Run > "watch -l [expression]" to break out of execution whenever that value > changes, then run "reverse-cont" to run the replay *backwards* until you > get to the code that changed the variable with the bad value. > >