From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Thomas Fitzsimmons Newsgroups: gmane.emacs.bugs Subject: bug#33174: 27.0.50; Dump fails on GNU/Linux ppc64le Date: Sun, 28 Oct 2018 21:47:06 -0400 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1540777211 791 195.159.176.226 (29 Oct 2018 01:40:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 29 Oct 2018 01:40:11 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 33174@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 29 02:40:07 2018 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 1gGwXE-0008TE-5k for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Oct 2018 02:40:04 +0100 Original-Received: from localhost ([::1]:43148 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gGwZK-0005cq-Ho for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Oct 2018 21:42:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48824) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gGwZD-0005ca-Oy for bug-gnu-emacs@gnu.org; Sun, 28 Oct 2018 21:42:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gGwZA-00082J-Co for bug-gnu-emacs@gnu.org; Sun, 28 Oct 2018 21:42:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45263) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gGwZA-00081o-6I for bug-gnu-emacs@gnu.org; Sun, 28 Oct 2018 21:42:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gGwZ8-0007A8-Gz for bug-gnu-emacs@gnu.org; Sun, 28 Oct 2018 21:42:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Thomas Fitzsimmons Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 Oct 2018 01:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33174 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33174-submit@debbugs.gnu.org id=B33174.154077731227513 (code B ref 33174); Mon, 29 Oct 2018 01:42:02 +0000 Original-Received: (at 33174) by debbugs.gnu.org; 29 Oct 2018 01:41:52 +0000 Original-Received: from localhost ([127.0.0.1]:49521 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGwYx-00079h-NO for submit@debbugs.gnu.org; Sun, 28 Oct 2018 21:41:52 -0400 Original-Received: from mail-it1-f178.google.com ([209.85.166.178]:37549) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGwYv-00079R-J5 for 33174@debbugs.gnu.org; Sun, 28 Oct 2018 21:41:50 -0400 Original-Received: by mail-it1-f178.google.com with SMTP id e74-v6so7662264ita.2 for <33174@debbugs.gnu.org>; Sun, 28 Oct 2018 18:41:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fitzsim-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=h4u+/G3urEI7mm0fo94KqNlTEz2KvKh5etjZn8+RVxU=; b=qEkzIwQMEPgn2JOA5el6yn2avklDmth5RCHlLXR7YH0WoWi9n/HFRq1FrfJDcktjkF +N7PcWwF9raBczJ/s76QZLJ8h7blpKodynN5ieYZ/H+4F5zfIVQ4DEZnPHLwBWkrugUO CPRXpWjyQ2iETJS2MRTfuUvlhaZzi0fx8vu8I9ccjNzJOFkFAK+jMZwTltlaajWebhGo KTq25AKCK7UhtWbKKfkOnO8N2dBC/DGWjB5Np6BxRnacZzsT+oLT2DE/rDVUBRQsayCO HWVHyiBHp3+ak1QMuiGwmVWG8WPtC6xB85SkxnUCcVizNYWNWUfHcLytAZaSzVE54Vqc EcBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=h4u+/G3urEI7mm0fo94KqNlTEz2KvKh5etjZn8+RVxU=; b=J1vTRc6YtEjzeWRcJL8uHteQ2zn7QEWxt49N8lr51FNlHaoEOotRWdr9R0DIpbIGNb KaZnV0wELnQ9X3zkLL+fOumA78CWezeCFmIv7Bd41sDFDcEtjzLpVD0jXg1cuXsX/jU/ cM6gH2lz8n2WOmomZxA4w84LYqYFq75hAkLWNGKjL956IrKqLvvd6IJQYfhstavj767i OeU8I8KOu2beteKDKMXJ4A4S1cpTJhOUuqStKS8cuOgGBy1x41fDbdIrcqJHhaA5bHdQ vOOmwLOclZejXYoIy8h/OJxk6Os+ZcPqLV1fnjVtjrm2myA52PA4Y5Fqiw5fkQQ1lfrn 4b0g== X-Gm-Message-State: AGRZ1gJkqm0x6vRgr0cUUsrsILTHMNltPTj3EnWQxcUOj7vBrI8WxHVi sHsoXrb/4DisE8iilsVRnciBRoMwFGFZeQ== X-Google-Smtp-Source: AJdET5e5t4LtW+8tEgN/3WkTWqVm67yh4FeL+oOg4kgTzdfOmUiOZTn5SqCgP93Cr2y3xwGOVb06qg== X-Received: by 2002:a02:854e:: with SMTP id g72-v6mr6792653jai.113.1540777303552; Sun, 28 Oct 2018 18:41:43 -0700 (PDT) Original-Received: from localhost.localdomain (69-165-165-189.dsl.teksavvy.com. [69.165.165.189]) by smtp.gmail.com with ESMTPSA id v193-v6sm4617143ita.2.2018.10.28.18.41.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 28 Oct 2018 18:41:42 -0700 (PDT) In-Reply-To: (Paul Eggert's message of "Sat, 27 Oct 2018 13:26:07 -0700") 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:151764 Archived-At: Paul Eggert writes: > Wonderful. Yet another reason we need to get the pdumper branch working. Anyway: > > 1. Can you use strace and/or GDB to investigate how ./temacs is > disabling address randomization? In the emacs-26 branch, if you run > this command in src: > > strace -f -o /tmp/tr ./temacs --batch --load loadup bootstrap > > the output file /tmp/tr should contain something like this: > > 18406 personality(0xffffffff) = 0 (PER_LINUX) > 18406 personality(PER_LINUX|ADDR_NO_RANDOMIZE) = 0 (PER_LINUX) > 18406 personality(0xffffffff) = 0x40000 (PER_LINUX|ADDR_NO_RANDOMIZE) I see the above personality calls exactly as you've shown them. strace never gets to the next execve; the crash happens before the next execve is run, see below. > 18406 execve("./temacs", ["./temacs", "--batch", "--load", "loadup", > "bootstrap"], 0xc521b0 /* 80 vars */) = 0 > > and later on there should be one more call to 'personality', like this: > > 18406 personality(0xffffffff) = 0x40000 (PER_LINUX|ADDR_NO_RANDOMIZE) > > If it doesn't look like this, please investigate why, by using GDB. When I run the command under gdb, it succeeds, so I had to enable core dumps to get the backtrace: $ gdb ./temacs core GNU gdb (Debian 7.12-6) 7.12.0.20161007-git 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 "powerpc64le-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 ./temacs...done. [New LWP 26831] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/powerpc64le-linux-gnu/libthread_db.so.1". Core was generated by `./temacs --batch --load loadup bootstrap '. Program terminated with signal SIGSEGV, Segmentation fault. #0 __memcpy_power7 () at ../sysdeps/powerpc/powerpc64/power7/memcpy.S:111 111 ../sysdeps/powerpc/powerpc64/power7/memcpy.S: No such file or directory. SIGINT is used by the debugger. Are you sure you want to change it? (y or n) [answered Y; input not from terminal] DISPLAY = :0 TERM = dumb Breakpoint 1 at 0x10118108: file emacs.c, line 363. Temporary breakpoint 2 at 0x10137aa8: init_sys_modes. (3 locations) (gdb) thread apply all bt Thread 1 (Thread 0x7fff940a7be0 (LWP 26831)): #0 __memcpy_power7 () at ../sysdeps/powerpc/powerpc64/power7/memcpy.S:111 #1 0x00000000101ec188 in memcpy (__len=383855080, __src=0x105cd618, __dest=) at /usr/include/powerpc64le-linux-gnu/bits/string3.h:53 #2 unexec (new_name=0x11b934f8 "/build/emacs/src/emacs", old_name=0x11b93528 "/build/emacs/src/temacs") at unexelf.c:411 #3 0x0000000010110bec in Fdump_emacs (filename=XIL(0x11b945a4), symfile=XIL(0x11b94584)) at emacs.c:2224 #4 0x00000000101a7cb8 in eval_sub (form=...) at eval.c:2244 #5 0x00000000101a8194 in Fprogn (body=XIL(0x107360d3)) at eval.c:459 #6 0x00000000101a7d6c in eval_sub (form=...) at eval.c:2193 #7 0x00000000101ab8bc in Fif (args=...) at eval.c:414 #8 0x00000000101a7d6c in eval_sub (form=...) at eval.c:2193 #9 0x00000000101d8a98 in readevalloop (readcharfun=XIL(0x68d0), infile0=0x7fffc3cef950, sourcename=XIL(0x107216a4), printflag=false, unibyte=..., readfun=XIL(0), start=XIL(0), end=XIL(0)) at lread.c:2048 #10 0x00000000101d90bc in Fload (file=XIL(0x107215a4), noerror=..., nomessage=XIL(0), nosuffix=..., must_suffix=...) at lread.c:1435 #11 0x00000000101a7c34 in eval_sub (form=...) at eval.c:2255 #12 0x00000000101acd18 in Feval (form=XIL(0x10727f03), lexical=...) at eval.c:2061 #13 0x00000000101188f8 in top_level_2 () at keyboard.c:1119 #14 0x00000000101a6410 in internal_condition_case (bfun=0x101188d0 , handlers=..., hfun=0x1011f030 ) at eval.c:1336 #15 0x00000000101188a8 in top_level_1 (ignore=...) at keyboard.c:1127 #16 0x00000000101a6364 in internal_catch (tag=..., func=0x10118800 , arg=XIL(0)) at eval.c:1101 #17 0x000000001011873c in command_loop () at keyboard.c:1088 #18 0x000000001011e89c in recursive_edit_1 () at keyboard.c:695 #19 0x000000001011eeb4 in Frecursive_edit () at keyboard.c:766 #20 0x0000000010017804 in main (argc=, argv=0x7fffc3cf0308) at emacs.c:1717 You can't do that without a process to debug. (gdb) > 2. What filesystem are you building in, ext4 > and does it support xattrs? Yes. > What is the output of the following in your build directory? > > touch x > setfattr -n user.variable -v value x > getfattr -n user.variable x I bootstrapped Debian from a minimal root file system, so I didn't have the attr package installed (i.e., the setfattr and getfattr commands were not found). After I installed it, the output of the above commands is: $ touch x $ setfattr -n user.variable -v value x $ getfattr -n user.variable x # file: x user.variable="value" > 3. What is the output of "getfattr -d src/temacs"? It should be something like this: > > # file: src/temacs > user.pax.flags="er" > > If not, we need to figure out why not. Yes, after I re-ran configure and make after having installed the attr package: $ getfattr -d src/temacs # file: src/temacs user.pax.flags="er" > 4. The output of 'make V=1' should contain something like the > following. If not, please investigate why not. > > setfattr -n user.pax.flags -v er temacs When setfattr is not installed, configure shows: [...] checking for setfattr... no [...] and that command is not run. After I installed the attr package, configure shows: checking for setfattr... yes and the above command shows up in make V=1 output. Thomas