From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: "Daniel Colascione" Newsgroups: gmane.emacs.bugs Subject: bug#38912: 27.0.60; PDumper meets segmentation fault when evil is loaded Date: Sun, 8 Mar 2020 19:15:31 -0700 Message-ID: References: <333553AC-68DE-4F1C-9586-5A13248AD6DD@icloud.com> <83ftgvh96l.fsf@gnu.org> <83a771g2tc.fsf@gnu.org> <83zhcvuvc1.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="78034"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: SquirrelMail/1.4.23 [SVN] Cc: niwtrx@icloud.com, 38912@debbugs.gnu.org To: "Eli Zaretskii" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 09 03:16:36 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 1jB7y5-000KAB-Re for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 09 Mar 2020 03:16:34 +0100 Original-Received: from localhost ([::1]:35252 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jB7y4-0005sf-Pp for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 08 Mar 2020 22:16:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56967) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jB7xc-0005sU-UN for bug-gnu-emacs@gnu.org; Sun, 08 Mar 2020 22:16:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jB7xb-0000z9-7w for bug-gnu-emacs@gnu.org; Sun, 08 Mar 2020 22:16:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43626) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jB7xb-0000yw-4k for bug-gnu-emacs@gnu.org; Sun, 08 Mar 2020 22:16:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jB7xa-0004Zp-7Q for bug-gnu-emacs@gnu.org; Sun, 08 Mar 2020 22:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Daniel Colascione" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 Mar 2020 02: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.158372014017562 (code B ref 38912); Mon, 09 Mar 2020 02:16:02 +0000 Original-Received: (at 38912) by debbugs.gnu.org; 9 Mar 2020 02:15:40 +0000 Original-Received: from localhost ([127.0.0.1]:49599 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jB7xD-0004ZC-JT for submit@debbugs.gnu.org; Sun, 08 Mar 2020 22:15:40 -0400 Original-Received: from dancol.org ([96.126.100.184]:34072) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jB7xA-0004Z1-64 for 38912@debbugs.gnu.org; Sun, 08 Mar 2020 22:15:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:To:From: Subject:Date:References:In-Reply-To:Message-ID:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=l8WGbP9oe2NHhTn2Xjtq5Azpde+Ldnr7VAgJ8CXO4TU=; b=raLeQT5vmSBC7d0ZMRMaDM92/i vYje4dOQl9+1c/eKvfm7KPKjmNU3GGmu7E6xyHfzdiFA9F3S6nCQzYTKQ1xjJBsAmNtyrsVFBRzCm eDauXM7k5SgU95jGP/TjjLUm5WKsmgfA2pYyaVfUOV20u3sFF+9bdUR2VDp/aTfqQcHyFXoTctr1P Mv84KMnkrue5NX8hvyvDZOA+D2PaUdn/k1UfpiNpIDCIVoaEE7V452cIwj055crlWAr6Vh17unPO+ TUwFo5ELNhMHYwD6RPIpLKbp/k5dNnEjK0Xk7UIdxRIlMDlCTwm6VrUuYYL2KnNUEaNMHaACEbR84 QJD1pewg==; Original-Received: from localhost ([127.0.0.1] helo=dancol.org) by dancol.org with esmtp (Exim 4.89) (envelope-from ) id 1jB7x5-0003o6-0r; Sun, 08 Mar 2020 19:15:31 -0700 Original-Received: from 127.0.0.1 (SquirrelMail authenticated user dancol) by dancol.org with HTTP; Sun, 8 Mar 2020 19:15:31 -0700 In-Reply-To: <83zhcvuvc1.fsf@gnu.org> X-Priority: 3 (Normal) Importance: Normal 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:177076 Archived-At: Sorry, haven't had a chance to look at it yet. I've been treating it as low-ish priority because pdumping outside loadup isn't supported yet. Is there some reason to expedite this work? > 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. >> >> >