From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: joakim@verona.se Newsgroups: gmane.emacs.bugs Subject: bug#54814: 29.0.50; symbol visibility in modules may cause emacs crash in nativ-compilation emacs Date: Sat, 09 Apr 2022 20:30:51 +0200 Message-ID: <87pmlqp0ro.fsf@tanaka.verona.se> References: <87zgkuqu77.fsf@tanaka.verona.se> <83h7728hy3.fsf@gnu.org> <877d7yqlh9.fsf@tanaka.verona.se> <83bkxa8bty.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36040"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 54814@debbugs.gnu.org, akrl@sdf.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 09 20:32:15 2022 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 1ndFsc-0009Bh-7o for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 Apr 2022 20:32:14 +0200 Original-Received: from localhost ([::1]:32794 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ndFsa-0004RC-PC for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 Apr 2022 14:32:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45470) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ndFsQ-0004Qy-3u for bug-gnu-emacs@gnu.org; Sat, 09 Apr 2022 14:32:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44778) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ndFsP-0002KM-RH for bug-gnu-emacs@gnu.org; Sat, 09 Apr 2022 14:32:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ndFsP-0008QC-OD for bug-gnu-emacs@gnu.org; Sat, 09 Apr 2022 14:32:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: joakim@verona.se Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Apr 2022 18:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54814 X-GNU-PR-Package: emacs Original-Received: via spool by 54814-submit@debbugs.gnu.org id=B54814.164952907632312 (code B ref 54814); Sat, 09 Apr 2022 18:32:01 +0000 Original-Received: (at 54814) by debbugs.gnu.org; 9 Apr 2022 18:31:16 +0000 Original-Received: from localhost ([127.0.0.1]:38675 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ndFrR-0008Od-9j for submit@debbugs.gnu.org; Sat, 09 Apr 2022 14:31:16 -0400 Original-Received: from smtp.outgoing.loopia.se ([93.188.3.37]:62378) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ndFrP-0008OM-L2 for 54814@debbugs.gnu.org; Sat, 09 Apr 2022 14:31:00 -0400 Original-Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id 7C3AA2F2A9E2 for <54814@debbugs.gnu.org>; Sat, 9 Apr 2022 20:30:53 +0200 (CEST) Original-Received: from s499.loopia.se (unknown [172.22.191.5]) by s807.loopia.se (Postfix) with ESMTP id 6DAD02F51AA2; Sat, 9 Apr 2022 20:30:53 +0200 (CEST) Original-Received: from s473.loopia.se (unknown [172.22.191.5]) by s499.loopia.se (Postfix) with ESMTP id 68F721CE509F; Sat, 9 Apr 2022 20:30:53 +0200 (CEST) X-Virus-Scanned: amavisd-new at amavis.loopia.se Original-Received: from s899.loopia.se ([172.22.191.5]) by s473.loopia.se (s473.loopia.se [172.22.190.13]) (amavisd-new, port 10024) with LMTP id 8jZZQd0Ogk8E; Sat, 9 Apr 2022 20:30:52 +0200 (CEST) X-Loopia-Auth: user X-Loopia-User: joakim.verona@chimeslab.se X-Loopia-Originating-IP: 193.234.148.196 Original-Received: from tanaka.verona.se (unknown [193.234.148.196]) (Authenticated sender: joakim.verona@chimeslab.se) by s899.loopia.se (Postfix) with ESMTPSA id F34E02C9CCB4; Sat, 9 Apr 2022 20:30:51 +0200 (CEST) In-Reply-To: <83bkxa8bty.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 09 Apr 2022 19:23:53 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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:229631 Archived-At: Eli Zaretskii writes: >> X-Spam-Status: No, score=3D-1 tagged_above=3D-999 required=3D6.2 >> tests=3D[ALL_TRUSTED=3D-1] autolearn=3Ddisabled >> From: joakim@verona.se >> Cc: Andrea Corallo , 54814@debbugs.gnu.org >> Date: Sat, 09 Apr 2022 18:18:10 +0200 >>=20 >> Eli Zaretskii writes: >>=20 >> >> From: joakim@verona.se >> >> Date: Sat, 09 Apr 2022 15:09:48 +0200 >> >>=20 >> >>=20 >> >> symbol visibility in modules may cause emacs crash in nativ-compilati= on >> >> emacs >> > >> > Does it really have to do anything with native-compilation? The fixes >> > seem to be to compile the external modules with less visibility, but >> > that doesn't affect Emacs, only the modules. >> > >> > Or am I missing something? >>=20 >> Well, I'm not really sure, but I have a couple of different builds of >> emacs, and when I load the emacs-zmq precompiled binaries they crash my >> main emacs, which has native-compilation, but not the other emacs I >> tried this in. I also get the same result of crashing native emacs, when >> using the packaged build proceedure of emacs-zmq. The hidden-visibility >> branch seems to fix these problems. > > It's possible that Emacs with native-compilation somehow triggers the > problem, but the proposed fixes are entirely in the modules, AFAICT. > >> Can I help pinpointing the issue somehow? > > A detailed explanation of why it crashes could help, I think. All I > saw are backtraces with no details, and no explanation what exactly > caused the crash and how that was related to symbol visibility. Well, I dont really know, but maybe having symbols in modules trigger a crash in native compilation emacs? Wouldn't then removing the symbols from the module remove the crash? I attach a gdb bt below, but I really didnt do anything except load the module, the crash happens immediately. The crash does happen inside the module, but for me, only in native compilation emacs. 17:11:45-joakim@tanaka:~/emacs-zmq$ gdb /home/joakim/build/myemacs/emacs/sr= c/emacs GNU gdb (GDB) Fedora 11.2-1.fc35 Copyright (C) 2022 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-redhat-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 /home/joakim/build/myemacs/emacs/src/emacs... (gdb) run -q Starting program: /mnt/fast/myemacs/emacs/src/emacs -q This GDB supports auto-downloading debuginfo from the following URLs: https://debuginfod.fedoraproject.org/=20 Enable debuginfod for this session? (y or [n]) n Debuginfod has been disabled. To make this setting permanent, add 'set debuginfod enabled off' to .gdbini= t. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". [New Thread 0x7fffdc25a640 (LWP 260604)] [New Thread 0x7fffdb70a640 (LWP 260608)] Invalid cast. warning: Probes-based dynamic linker interface failed. Reverting to original interface. [New Thread 0x7fffdac07640 (LWP 260609)] [New Thread 0x7fffda07d640 (LWP 260610)] [New Thread 0x7fffd9612640 (LWP 260611)] [Thread 0x7fffd9612640 (LWP 260611) exited] [New Thread 0x7fffd9612640 (LWP 260612)] [New Thread 0x7fffd8c82640 (LWP 260613)] [Thread 0x7fffd9612640 (LWP 260612) exited] [New Thread 0x7fffd9612640 (LWP 260614)] [New Thread 0x7fffd8c82640 (LWP 260615)] [Thread 0x7fffd8c82640 (LWP 260613) exited] [Thread 0x7fffd9612640 (LWP 260614) exited] [Thread 0x7fffd8c82640 (LWP 260615) exited] (emacs:260579): Gtk-CRITICAL **: 17:20:27.468: gtk_distribute_natural_alloc= ation: assertion 'extra_space >=3D 0' failed (emacs:260579): Gtk-CRITICAL **: 17:20:32.924: gtk_distribute_natural_alloc= ation: assertion 'extra_space >=3D 0' failed [Thread 0x7fffda07d640 (LWP 260610) exited] (emacs:260579): Gtk-CRITICAL **: 17:21:07.507: gtk_distribute_natural_alloc= ation: assertion 'extra_space >=3D 0' failed (emacs:260579): Gtk-CRITICAL **: 17:21:17.041: gtk_distribute_natural_alloc= ation: assertion 'extra_space >=3D 0' failed Thread 1 "emacs" received signal SIGSEGV, Segmentation fault. 0x00007fffc3a627db in emacs_module_init (ert=3D) at emacs-zm= q.c:286 286 Qt =3D GLOBREF(INTERN("t")); Missing separate debuginfos, use: dnf debuginfo-install GConf2-3.2.6-31.fc3= 5.x86_64 ImageMagick-libs-6.9.12.37-1.fc35.x86_64 alsa-lib-1.2.6.1-3.fc35.x= 86_64 at-spi2-atk-2.38.0-3.fc35.x86_64 at-spi2-core-2.42.0-1.fc35.x86_64 at= k-2.36.0-4.fc35.x86_64 bzip2-libs-1.0.8-9.fc35.x86_64 cairo-1.17.4-4.fc35.x= 86_64 cairo-gobject-1.17.4-4.fc35.x86_64 dbus-glib-0.112-2.fc35.x86_64 dbus= -libs-1.12.22-1.fc35.x86_64 elfutils-libs-0.186-1.fc35.x86_64 fontconfig-2.= 13.94-5.fc35.x86_64 freetype-2.11.0-3.fc35.x86_64 fribidi-1.0.10-5.fc35.x86= _64 gdk-pixbuf2-2.42.6-2.fc35.x86_64 giflib-5.2.1-8.fc35.x86_64 glib2-2.70.= 5-1.fc35.x86_64 glibc-2.34-29.fc35.x86_64 gmp-6.2.0-7.fc35.x86_64 gnutls-3.= 7.2-3.fc35.x86_64 gstreamer1-plugins-base-1.20.0-1.fc35.x86_64 gtk3-3.24.31= -2.fc35.x86_64 gvfs-client-1.48.1-2.fc35.x86_64 harfbuzz-2.9.1-1.fc35.x86_6= 4 jansson-2.13.1-3.fc35.x86_64 jbigkit-libs-2.1-22.fc35.x86_64 json-glib-1.= 6.6-1.fc35.x86_64 keyutils-libs-1.6.1-3.fc35.x86_64 krb5-libs-1.19.2-2.fc35= .x86_64 lcms2-2.12-2.fc35.x86_64 libICE-1.0.10-7.fc35.x86_64 libSM-1.2.3-9.= fc35.x86_64 libX11-1.7.3.1-1.fc35.x86_64 libXau-1.0.9-7.fc35.x86_64 libXcom= posite-0.4.5-6.fc35.x86_64 libXcursor-1.2.0-6.fc35.x86_64 libXext-1.3.4-7.f= c35.x86_64 libXpm-3.5.13-6.fc35.x86_64 libXrandr-1.5.2-7.fc35.x86_64 libXre= nder-0.9.10-15.fc35.x86_64 libXt-1.2.0-5.fc35.x86_64 libacl-2.3.1-2.fc35.x8= 6_64 libcap-2.48-3.fc35.x86_64 libcom_err-1.46.3-1.fc35.x86_64 libepoxy-1.5= .9-1.fc35.x86_64 libffi-3.1-29.fc35.x86_64 libgcc-11.2.1-9.fc35.x86_64 libg= ccjit-11.2.1-9.fc35.x86_64 libglvnd-egl-1.3.4-2.fc35.x86_64 libglvnd-glx-1.= 3.4-2.fc35.x86_64 libglvnd-opengl-1.3.4-2.fc35.x86_64 libgnomekbd-3.26.1-6.= fc35.x86_64 libgomp-11.2.1-9.fc35.x86_64 libgpg-error-1.43-1.fc35.x86_64 li= bicu-69.1-2.fc35.x86_64 libjpeg-turbo-2.1.0-3.fc35.x86_64 liblqr-1-0.4.2-17= .fc35.x86_64 libmanette-0.2.6-3.fc35.x86_64 libmpc-1.2.1-3.fc35.x86_64 libn= ghttp2-1.45.1-1.fc35.x86_64 libpng-1.6.37-11.fc35.x86_64 libraqm-0.7.2-1.fc= 35.x86_64 librsvg2-2.52.7-1.fc35.x86_64 libsecret-0.20.4-3.fc35.x86_64 libs= oup-2.74.2-1.fc35.x86_64 libssh-0.9.6-1.fc35.x86_64 libstdc++-11.2.1-9.fc35= .x86_64 libstemmer-0-17.585svn.fc35.x86_64 libthai-0.1.28-7.fc35.x86_64 lib= tiff-4.3.0-4.fc35.x86_64 libtool-ltdl-2.4.6-50.fc35.x86_64 libtracker-sparq= l-3.2.1-1.fc35.x86_64 libunwind-1.5.0-1.fc35.x86_64 libuuid-2.37.4-1.fc35.x= 86_64 libwayland-client-1.20.0-1.fc35.x86_64 libwayland-cursor-1.20.0-1.fc3= 5.x86_64 libwayland-egl-1.20.0-1.fc35.x86_64 libwayland-server-1.20.0-1.fc3= 5.x86_64 libwebp-1.2.2-1.fc35.x86_64 libwpe-1.10.1-2.fc35.x86_64 libxcb-1.1= 3.1-8.fc35.x86_64 libxkbcommon-1.3.1-1.fc35.x86_64 libxml2-2.9.13-1.fc35.x8= 6_64 libzstd-1.5.2-1.fc35.x86_64 lz4-libs-1.9.3-3.fc35.x86_64 mpfr-4.1.0-8.= fc35.x86_64 openjpeg2-2.4.0-4.fc35.x86_64 openldap-2.4.59-3.fc35.x86_64 orc= -0.4.31-5.fc35.x86_64 pixman-0.40.0-4.fc35.x86_64 sqlite-libs-3.36.0-3.fc35= .x86_64 systemd-libs-249.9-1.fc35.x86_64 webkit2gtk3-2.34.6-1.fc35.x86_64 w= ebkit2gtk3-jsc-2.34.6-1.fc35.x86_64 xapps-2.2.8-1.fc35.x86_64 xz-libs-5.2.5= -7.fc35.x86_64 zlib-1.2.11-30.fc35.x86_64 (gdb) bt #0 0x00007fffc3a627db in emacs_module_init (ert=3D) at emac= s-zmq.c:286 #1 0x000000000063f304 in Fmodule_load (file=3D0xc86684) at emacs-module.c:= 1144 #2 0x000000000060b478 in eval_sub (form=3D) at eval.c:2382 #3 0x000000000060d7e7 in Feval (form=3D0x1038543, lexical=3D) at eval.c:2240 #4 0x00007fffea15a8d8 in F6576616c2d65787072657373696f6e_eval_expression_0= () at /mnt/fast/myemacs/emacs/src/../native-lisp/29.0.50-074789c9/preloade= d/simple-34ebfc5b-c7860df7.eln #5 0x0000000000607c73 in Ffuncall (nargs=3Dnargs@entry=3D5, args=3Dargs@en= try=3D0x7fffffffcfe8) at eval.c:2873 #6 0x000000000060378f in Ffuncall_interactively (nargs=3D5, args=3D0x7ffff= fffcfe8) at callint.c:260 #7 0x0000000000607c73 in Ffuncall (nargs=3D6, args=3D0x7fffffffcfe0) at ev= al.c:2873 #8 0x00000000006093f8 in Fapply (nargs=3Dnargs@entry=3D3, args=3Dargs@entr= y=3D0x7fffffffd130) at eval.c:2550 #9 0x00000000006050b4 in Fcall_interactively (function=3D0x7fffe9cdd140 , record_flag=3D0x0, keys=3D0xc2bcc5) at calli= nt.c:353 #10 0x00007fffea15e010 in F636f6d6d616e642d65786563757465_command_execute_0= () at /mnt/fast/myemacs/emacs/src/../native-lisp/29.0.50-074789c9/preloade= d/simple-34ebfc5b-c7860df7.eln #11 0x0000000000607c73 in Ffuncall (nargs=3Dnargs@entry=3D2, args=3Dargs@en= try=3D0x7fffffffd2d0) at eval.c:2873 #12 0x000000000058f9c6 in call1 (arg1=3D, fn=3D0x48c0) at /m= nt/fast/myemacs/emacs/src/lisp.h:3216 #13 command_loop_1 () at keyboard.c:1514 #14 0x00000000006064e7 in internal_condition_case (bfun=3Dbfun@entry=3D0x58= f570 , handlers=3Dhandlers@entry=3D0x90, hfun=3Dhfun@entry= =3D0x5831d0 ) at eval.c:1450 #15 0x000000000057bb9a in command_loop_2 (handlers=3Dhandlers@entry=3D0x90)= at keyboard.c:1142 #16 0x0000000000606441 in internal_catch (tag=3Dtag@entry=3D0xf3c0, func=3D= func@entry=3D0x57bb80 , arg=3Darg@entry=3D0x90) at eval.c:1= 180 #17 0x000000000057bb3f in command_loop () at keyboard.c:1120 #18 0x0000000000582d83 in recursive_edit_1 () at keyboard.c:729 #19 0x00000000005830fa in Frecursive_edit () at keyboard.c:812 #20 0x0000000000468cad in main (argc=3D2, argv=3D) at emacs.= c:2447 > > > --=20 Joakim Verona joakim@verona.se