From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!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: Sun, 05 Jan 2020 20:45:19 +0200 Message-ID: <83a771g2tc.fsf@gnu.org> References: <333553AC-68DE-4F1C-9586-5A13248AD6DD@icloud.com> <83ftgvh96l.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="83932"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 38912@debbugs.gnu.org To: NiwTinray , Daniel Colascione Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jan 05 19:46:14 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ioAuj-000Lf2-GS for geb-bug-gnu-emacs@m.gmane.org; Sun, 05 Jan 2020 19:46:13 +0100 Original-Received: from localhost ([::1]:44360 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ioAui-0005N2-6K for geb-bug-gnu-emacs@m.gmane.org; Sun, 05 Jan 2020 13:46:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42437) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ioAua-0005Mw-N8 for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2020 13:46:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ioAuY-0003Z9-Is for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2020 13:46:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38636) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ioAuY-0003Z0-Ex for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2020 13:46:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ioAuY-0004sQ-Dj for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2020 13:46:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Jan 2020 18:46: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.157824992418693 (code B ref 38912); Sun, 05 Jan 2020 18:46:02 +0000 Original-Received: (at 38912) by debbugs.gnu.org; 5 Jan 2020 18:45:24 +0000 Original-Received: from localhost ([127.0.0.1]:44609 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ioAtv-0004rQ-ID for submit@debbugs.gnu.org; Sun, 05 Jan 2020 13:45:24 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:33342) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ioAtt-0004rD-DS for 38912@debbugs.gnu.org; Sun, 05 Jan 2020 13:45:22 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40719) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ioAtn-00039u-L0; Sun, 05 Jan 2020 13:45:15 -0500 Original-Received: from [176.228.60.248] (port=2635 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ioAtm-0001Yy-Na; Sun, 05 Jan 2020 13:45:15 -0500 In-reply-to: (message from NiwTinray on Sun, 5 Jan 2020 13:25:07 +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: 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:174203 Archived-At: [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? Here's the backtrace from the assertion violation, and some data involved in the assertion: dumping fingerprint: 79862409ba15bcbb091a8b1aa5b942cc3283f12f123a69372f5cfe59de047ba9 pdumper.c:2684: Emacs fatal error: assertion failed: EQ (expected_value, found_value) Thread 1 hit Breakpoint 1, terminate_due_to_signal (sig=22, backtrace_limit=2147483647) at emacs.c:371 371 signal (sig, SIG_DFL); (gdb) bt #0 terminate_due_to_signal (sig=22, backtrace_limit=2147483647) at emacs.c:371 #1 0x01317f22 in die ( msg=0x19bac5c "EQ (expected_value, found_value)", file=0x19ba210 "pdumper.c", line=2684) at alloc.c:7246 #2 0x01326817 in check_hash_table_rehash (table_orig=XIL(0xa000000006288090)) at pdumper.c:2684 #3 0x01326a6c in dump_hash_table (ctx=0x82d1f0, object=XIL(0xa000000006288090), offset=-4) at pdumper.c:2725 #4 0x013279c5 in dump_vectorlike (ctx=0x82d1f0, lv=XIL(0xa000000006288090), offset=-4) at pdumper.c:2991 #5 0x01327f92 in dump_object (ctx=0x82d1f0, object=XIL(0xa000000006288090)) at pdumper.c:3127 #6 0x0132ace3 in dump_drain_deferred_hash_tables (ctx=0x82d1f0) at pdumper.c:3977 #7 0x0132b4ca in Fdump_emacs_portable (filename=XIL(0x8000000006d24008), track_referrers=XIL(0)) at pdumper.c:4148 #8 0x013825de in eval_sub (form=XIL(0xc0000000067b2150)) at eval.c:2276 #9 0x0137aec2 in Fprogn (body=XIL(0)) at eval.c:462 #10 0x01382182 in eval_sub (form=XIL(0xc0000000067b2090)) at eval.c:2226 #11 0x013819e8 in Feval (form=XIL(0xc0000000067b2090), lexical=XIL(0x30)) at eval.c:2102 #12 0x01384ecc in funcall_subr (subr=0x1960b00 , numargs=2, args=0x82d978) at eval.c:2869 #13 0x013848f9 in Ffuncall (nargs=3, args=0x82d970) at eval.c:2794 #14 0x01427e37 in exec_byte_code (bytestr=XIL(0x800000000612e1e0), vector=XIL(0xa00000000612d0f8), maxdepth=make_fixnum(25), args_template=make_fixnum(257), nargs=1, args=0x82e378) at bytecode.c:633 #15 0x01385a11 in funcall_lambda (fun=XIL(0xa00000000612d0c8), nargs=1, arg_vector=0x82e370) at eval.c:2989 #16 0x01384953 in Ffuncall (nargs=2, args=0x82e368) at eval.c:2796 #17 0x01427e37 in exec_byte_code (bytestr=XIL(0x8000000006131a80), vector=XIL(0xa00000000612e450), maxdepth=make_fixnum(14), args_template=make_fixnum(0), nargs=0, args=0x82efa8) at bytecode.c:633 #18 0x01385a11 in funcall_lambda (fun=XIL(0xa00000000612e420), nargs=0, arg_vector=0x82efa8) at eval.c:2989 #19 0x01384953 in Ffuncall (nargs=1, args=0x82efa0) at eval.c:2796 #20 0x01427e37 in exec_byte_code (bytestr=XIL(0x8000000006132488), vector=XIL(0xa000000006131c20), maxdepth=make_fixnum(12), args_template=make_fixnum(0), nargs=0, args=0x82f680) at bytecode.c:633 #21 0x01385a11 in funcall_lambda (fun=XIL(0xa000000006131bf0), nargs=0, arg_vector=0x82f680) at eval.c:2989 #22 0x01385519 in apply_lambda (fun=XIL(0xa000000006131bf0), args=XIL(0), count=4) at eval.c:2926 #23 0x01382b51 in eval_sub (form=XIL(0xc000000006278198)) at eval.c:2318 #24 0x013819e8 in Feval (form=XIL(0xc000000006278198), lexical=XIL(0)) at eval.c:2102 #25 0x011df7a3 in top_level_2 () at keyboard.c:1100 #26 0x0137f02d in internal_condition_case (bfun=0x11df76d , handlers=XIL(0x90), hfun=0x11def2f ) at eval.c:1355 #27 0x011df818 in top_level_1 (ignore=XIL(0)) at keyboard.c:1108 #28 0x0137e1f8 in internal_catch (tag=XIL(0xdfe0), func=0x11df7a9 , arg=XIL(0)) at eval.c:1116 #29 0x011df679 in command_loop () at keyboard.c:1069 #30 0x011de9b7 in recursive_edit_1 () at keyboard.c:714 #31 0x011dec2d in Frecursive_edit () at keyboard.c:786 #32 0x011d3547 in main (argc=4, argv=0xa42848) at emacs.c:2054 Lisp Backtrace: "dump-emacs-portable" (0x82d468) "progn" (0x82d658) "eval" (0x82d978) "command-line-1" (0x82e370) "command-line" (0x82efa8) "normal-top-level" (0x82f680) (gdb) fr 5 #5 0x01327f92 in dump_object (ctx=0x82d1f0, object=XIL(0xa000000006288090)) at pdumper.c:3127 3127 offset = dump_vectorlike (ctx, object, offset); (gdb) p object $1 = XIL(0xa000000006288090) (gdb) xtype Lisp_Vectorlike PVEC_HASH_TABLE (gdb) xhashtable $2 = (struct Lisp_Hash_Table *) 0x6288090 (gdb) p *$ $3 = { header = { size = 1291882500 }, weak = XIL(0), hash = XIL(0xa0000000068192c0), next = XIL(0xa0000000068194d0), index = XIL(0xa0000000068196e0), count = 13, next_free = 13, purecopy = false, mutable = true, rehash_threshold = 0.8125, rehash_size = 0.5, key_and_value = XIL(0xa000000005fbe6f8), test = { name = XIL(0x5610), user_hash_function = XIL(0), user_cmp_function = XIL(0), cmpfn = 0x13a7ffe , hashfn = 0x13a8107 }, next_weak = 0x0 } (gdb) p $2->key_and_value $4 = XIL(0xa000000005fbe6f8) (gdb) xtype Lisp_Vectorlike PVEC_NORMAL_VECTOR (gdb) xvector $5 = (struct Lisp_Vector *) 0x5fbe6f8 0 (gdb) p $2->test.name $6 = XIL(0x5610) (gdb) xtype Lisp_Symbol (gdb) xsymbol $7 = (struct Lisp_Symbol *) 0x1bc74d0 "equal" (gdb) p expected_value $8 = XIL(0xa000000006a527d8) (gdb) xtype Lisp_Vectorlike PVEC_COMPILED (gdb) xcompiled $9 = (struct Lisp_Vector *) 0x6a527d8 {make_fixnum(771), XIL(0x8000000006ab8250), XIL(0xa000000006a36558), make_fixnum(13), XIL(0x8000000006ab81c0)} (gdb) p found_value $10 = XIL(0xa000000006c2fc00) (gdb) xtype Lisp_Vectorlike PVEC_COMPILED (gdb) xcompiled $11 = (struct Lisp_Vector *) 0x6c2fc00 {make_fixnum(771), XIL(0x80000000069d21b0), XIL(0xa000000006c2fba0), make_fixnum(13), XIL(0x8000000006a412b0)} (gdb)