From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: recent master core dumps building on FreeBSD i386 Date: Wed, 17 Oct 2018 18:09:39 -0700 Organization: UCLA Computer Science Department Message-ID: References: <86va6151mf.fsf@phe.ftfl.ca> <86o9bt746r.fsf@phe.ftfl.ca> <837eigsgel.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------FE4758961E7F62C4B8B6D217" X-Trace: blaine.gmane.org 1539824913 26052 195.159.176.226 (18 Oct 2018 01:08:33 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 18 Oct 2018 01:08:33 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 Cc: emacs-devel@gnu.org To: Eli Zaretskii , Joseph Mingrone Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 18 03:08:29 2018 Return-path: Envelope-to: ged-emacs-devel@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 1gCwnc-0006fm-Dn for ged-emacs-devel@m.gmane.org; Thu, 18 Oct 2018 03:08:28 +0200 Original-Received: from localhost ([::1]:39707 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCwph-00082b-8o for ged-emacs-devel@m.gmane.org; Wed, 17 Oct 2018 21:10:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46454) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCwp0-00082L-M7 for emacs-devel@gnu.org; Wed, 17 Oct 2018 21:09:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gCwox-0001Ku-76 for emacs-devel@gnu.org; Wed, 17 Oct 2018 21:09:54 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:48888) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gCwos-0001Gp-T8; Wed, 17 Oct 2018 21:09:47 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 7A1BF161753; Wed, 17 Oct 2018 18:09:44 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id eYGSqSdRk9qv; Wed, 17 Oct 2018 18:09:39 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 579A4161755; Wed, 17 Oct 2018 18:09:39 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id WJCyZI8EiCDe; Wed, 17 Oct 2018 18:09:39 -0700 (PDT) Original-Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 3A823161753; Wed, 17 Oct 2018 18:09:39 -0700 (PDT) Openpgp: preference=signencrypt Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= xsFNBEyAcmQBEADAAyH2xoTu7ppG5D3a8FMZEon74dCvc4+q1XA2J2tBy2pwaTqfhpxxdGA9 Jj50UJ3PD4bSUEgN8tLZ0san47l5XTAFLi2456ciSl5m8sKaHlGdt9XmAAtmXqeZVIYX/UFS 96fDzf4xhEmm/y7LbYEPQdUdxu47xA5KhTYp5bltF3WYDz1Ygd7gx07Auwp7iw7eNvnoDTAl KAl8KYDZzbDNCQGEbpY3efZIvPdeI+FWQN4W+kghy+P6au6PrIIhYraeua7XDdb2LS1en3Ss mE3QjqfRqI/A2ue8JMwsvXe/WK38Ezs6x74iTaqI3AFH6ilAhDqpMnd/msSESNFt76DiO1ZK QMr9amVPknjfPmJISqdhgB1DlEdw34sROf6V8mZw0xfqT6PKE46LcFefzs0kbg4GORf8vjG2 Sf1tk5eU8MBiyN/bZ03bKNjNYMpODDQQwuP84kYLkX2wBxxMAhBxwbDVZudzxDZJ1C2VXujC OJVxq2kljBM9ETYuUGqd75AW2LXrLw6+MuIsHFAYAgRr7+KcwDgBAfwhPBYX34nSSiHlmLC+ KaHLeCLF5ZI2vKm3HEeCTtlOg7xZEONgwzL+fdKo+D6SoC8RRxJKs8a3sVfI4t6CnrQzvJbB n6gxdgCu5i29J1QCYrCYvql2UyFPAK+do99/1jOXT4m2836j1wARAQABzSBQYXVsIEVnZ2Vy dCA8ZWdnZXJ0QGNzLnVjbGEuZWR1PsLBfgQTAQIAKAUCTIByZAIbAwUJEswDAAYLCQgHAwIG FQgCCQoLBBYCAwECH In-Reply-To: <837eigsgel.fsf@gnu.org> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 131.179.128.68 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:230468 Archived-At: This is a multi-part message in MIME format. --------------FE4758961E7F62C4B8B6D217 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 10/17/18 9:10 AM, Eli Zaretskii wrote: >> As far as I can tell, the core dump began with f5896e2. > This is unexpected. Can you run the offending command under GDB and > show the backtrace from the crash, please? > Quite possibly this is yet another obscure bug involving dumping. I hope the portable dumper will be merged soon. Could you please remind me what the remaining trouble spots are with pdumper, i.e., the issues that are preventing merging that branch in? Anyway, I struggled a bit with Joseph's report (trying lots of ways to build Emacs master on Fedora 28) and managed to reproduce a similar problem that does indeed involve dumping. I installed into Emacs master the attached patch, which fixed that bug for me. Joseph, please try the latest master, and if that doesn't work then GDB may well be your friend (though it may not be; dumping leads to reaaaally obscure problems). --------------FE4758961E7F62C4B8B6D217 Content-Type: text/x-patch; name="0001-Bring-back-nocombreloc-if-dumping.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Bring-back-nocombreloc-if-dumping.patch" >From 3d67ec142099196df17a633da63e772fbe33b4fb Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 17 Oct 2018 17:55:43 -0700 Subject: [PATCH] Bring back nocombreloc if dumping Without this patch, Emacs dumps core on Fedora 28 x86-64 when configured via "CC='gcc -m32' --enable-gcc-warnings --without-imagemagick --without-gif --with-modules PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig:/usr/share/pkgconfig". and then when run normally in a windowing system. 'make check' and 'emacs -nw' work OK even without the patch. * configure.ac (LD_SWITCH_SYSTEM_TEMACS): Prepend -znocombreloc if supported and if dumping. This mostly reverts 2018-06-15T21:37:39!eggert@cs.ucla.edu "Remove old combreloc hack". --- configure.ac | 33 +++++++++++++++++++++++++++++++++ etc/PROBLEMS | 12 ++++++++++++ 2 files changed, 45 insertions(+) diff --git a/configure.ac b/configure.ac index bfd9d5d177..3a61090902 100644 --- a/configure.ac +++ b/configure.ac @@ -1336,6 +1336,37 @@ AC_DEFUN ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS" fi +dnl On some platforms using GNU ld, linking temacs needs -znocombreloc. +dnl Although this has something to do with dumping, the details are unknown. +dnl If the flag is used but not needed, +dnl Emacs should still work (albeit a bit more slowly), +dnl so use the flag everywhere that it is supported. +dnl When testing whether the flag works, treat GCC specially +dnl since it just gives a non-fatal 'unrecognized option' +dnl if not built to support GNU ld. +if test "$GCC" = yes; then + LDFLAGS_NOCOMBRELOC="-Wl,-znocombreloc" +else + LDFLAGS_NOCOMBRELOC="-znocombreloc" +fi + +AC_CACHE_CHECK([for -znocombreloc], [emacs_cv_znocombreloc], + [if test "$CANNOT_DUMP" = "yes"; then + emacs_cv_znocombreloc='not needed' + else + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS $LDFLAGS_NOCOMBRELOC" + AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], + [emacs_cv_znocombreloc=yes], [emacs_cv_znocombreloc=no]) + LDFLAGS=$save_LDFLAGS + fi]) + +case $emacs_cv_znocombreloc in + no*) + LDFLAGS_NOCOMBRELOC= ;; +esac + + AC_CACHE_CHECK([whether addresses are sanitized], [emacs_cv_sanitize_address], [AC_COMPILE_IFELSE( @@ -5346,6 +5377,8 @@ AC_DEFUN esac fi +LD_SWITCH_SYSTEM_TEMACS="$LDFLAGS_NOCOMBRELOC $LD_SWITCH_SYSTEM_TEMACS" + AC_SUBST(LD_SWITCH_SYSTEM_TEMACS) ## Common for all window systems diff --git a/etc/PROBLEMS b/etc/PROBLEMS index eba3420fcb..6805e8733d 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -192,6 +192,18 @@ Upgrading to a newer version of Exceed has been reported to prevent these crashes. You should consider switching to a free X server, such as Xming or Cygwin/X. +** Emacs crashes with SIGSEGV in XtInitializeWidgetClass. + +It crashes on X, but runs fine when called with option "-nw". + +This has been observed when Emacs is linked with GNU ld but without passing +the -z nocombreloc flag. Emacs normally knows to pass the -z nocombreloc +flag when needed, so if you come across a situation where the flag is +necessary but missing, please report it via M-x report-emacs-bug. + +On platforms such as Solaris, you can also work around this problem by +configuring your compiler to use the native linker instead of GNU ld. + ** When Emacs is compiled with Gtk+, closing a display kills Emacs. There is a long-standing bug in GTK that prevents it from recovering -- 2.17.2 --------------FE4758961E7F62C4B8B6D217--