From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#57789: Emacs 28.1 clone build with native compilation crashes on s390x Date: Fri, 03 Jan 2025 18:57:55 +0000 Message-ID: <877c7bk9ov.fsf@protonmail.com> References: <87h71aix5r.fsf@trouble.defaultvalue.org> <83pmftz1pn.fsf@gnu.org> <871qs0trcx.fsf@trouble.defaultvalue.org> <87y0ztc27x.fsf@trouble.defaultvalue.org> <87r05jagqq.fsf@trouble.defaultvalue.org> Reply-To: Pip Cet Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31313"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gerd.moellmann@gmail.com, 57789@debbugs.gnu.org, Eli Zaretskii , Andrea Corallo , Stefan Kangas To: Rob Browning Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 03 19:59:37 2025 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 1tTmtU-00081a-P5 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 03 Jan 2025 19:59:37 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTmt7-0002Wq-Fj; Fri, 03 Jan 2025 13:59:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tTmsx-0002Uf-Mx for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2025 13:59:04 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tTmsw-00021L-Qn for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2025 13:59:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:From:Date:To:Subject; bh=L305j8yomBjDPb3pHW/5qRFU0jDS0DpC4iE+S7GpLqg=; b=OXd2YnRoudKUTjdq4GRG2tWcHXR6xyezEcaPXsiwFGibo1xVFUVIs270J14CSUzQZm1qRXar95xje+IA4DQp3FlsenP1aTQyqGPuLFcuB4ohEl+u585mKQJ/KTdawuqcTGUBxD20QnG4JevvIEaBMlc1thFEZB7Q/JVdNbxW0aaTgNzGvja3cpvzxbTtYH7puIuT3/CJf7v8kuzc0MkkKQBb1eyZ4pbCiUguCa6hMvDgg3qhoO/cVDqj97DdX2mmMY2caH5P9Lkvw2xog2XjnAaqmFtCYJaL2jIsPdDkVsG4o6HmhndS0SRyUB9V2gJ0G8zB2BadjlG7BDgoV7dReg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tTmsw-0001jC-Ji for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2025 13:59:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Jan 2025 18:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57789 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 57789-submit@debbugs.gnu.org id=B57789.17359306896461 (code B ref 57789); Fri, 03 Jan 2025 18:59:02 +0000 Original-Received: (at 57789) by debbugs.gnu.org; 3 Jan 2025 18:58:09 +0000 Original-Received: from localhost ([127.0.0.1]:52073 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tTms5-0001g5-77 for submit@debbugs.gnu.org; Fri, 03 Jan 2025 13:58:09 -0500 Original-Received: from mail-40131.protonmail.ch ([185.70.40.131]:49819) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tTms2-0001f5-Q6 for 57789@debbugs.gnu.org; Fri, 03 Jan 2025 13:58:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1735930679; x=1736189879; bh=L305j8yomBjDPb3pHW/5qRFU0jDS0DpC4iE+S7GpLqg=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=o/6his/He06zpNl9Rk5gXj0hdFQM3t0MDe/Fk7djFy4TF1whwG9UUsG//G0onzoh6 ReNBPi9didDMeX8Ue4rkmka93rP0NGgTrpBcfFZHHB1u/gA7G20s98vB11XMjkR/AK bCCJWAAX1SCathPVClSq7uxyZ/OgJr/5SFCxuyPniq4rtyGvJ9DN0uuPmj92GnnKmA +xrY46aNJcSvzU8vBSZNhXI6WgrRYcsP2ORak6aji+Trpo1rN1PQa36hqexY3cH9UM nXhK9lXNOUNIbj8vGZpx0GOuR/WQhdLzMu3fdI0tbv1lbGI4RxCE79RN9FkRD37lCQ lkwiz8AHFRUJw== In-Reply-To: <87r05jagqq.fsf@trouble.defaultvalue.org> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: fa18211069dcca2a8a972dab14c0eeaf06f9bd95 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:298299 Archived-At: "Rob Browning" writes: > Stefan Kangas writes: > >> Thanks. I guess not a lot of us have access to an s390x machine, so I >> don't think anyone has been able to test it. > > Hmm, I think I've heard there may be (or were?) some public instances > that provide short-term dev access, but have never looked in to it. I have cfarm access, but cfarm doesn't have an s390 machine :-( > I was also going to outline an easy way to test in a vm at least on a > Debian system via debvm/mmdebstrap, but after doing that, I wasn't able > to reproduce the problem there. (Happy to provide instructions for > anyone interested, otherwise.) Same compiler? Is ASLR in use? In any case, I'm always interested in weird machines, even if they're virtual, so I'd appreciate such instructions. > In any case, I just tried both the current Debian package and an > upstream emcs-29.4 checkout on zelenka.debian.org, and both fail. > > The emacs-29.4 tree fails like this: > > make[3]: Entering directory '/home/rlb/emacs/admin/unidata' > make[3]: Nothing to be done for 'charscript.el'. > make[3]: Leaving directory '/home/rlb/emacs/admin/unidata' > make -C ../admin/unidata emoji-zwj.el > make[3]: Entering directory '/home/rlb/emacs/admin/unidata' > make[3]: Nothing to be done for 'emoji-zwj.el'. > make[3]: Leaving directory '/home/rlb/emacs/admin/unidata' > ELC+ELN ../lisp/emacs-lisp/eldoc.elc > > Error: wrong-type-argument ("../lisp/emacs-lisp/eldoc.el" hash-table-p > [unbound unbound unbound unbound unbound unbound unbound unbound > unbound unbound unbound unbound unbound unbound unbound unbound > unbound unbound unbound unbound unbound unbound unbound unbound > unbound unbound unbound unbound unbound unbound unbound unbound > unbound unbound unbound unbound unbound unbound unbound unbound > unbound unbound unbound unbound unbound unbound unbound unbound > unbound unbound unbound unbound unbound unbound unbound unbound > unbound unbound unbound unbound unbound unbound unbound unbound > unbound unbound unbound unbound unbound unbound unbound unbound > unbound unbound unbound unbound unbound unbound unbound unbound > unbound unbound unbound unbound unbound unbound unbound unbound > unbound unbound unbound unbound unbound unbound unbound unbound > unbound unbound unbound unbound unbound unbound unbound unbound > unbound unbound unbound unbound unbound unbound unbound unbound > unbound unbound unbound unbound unbound unbound unbound unbound > unbound unbound unbound unbound unbound unbound unbound unbound > unbound unbound]) > Fatal error 11: Segmentation fault Two random guesses: 1. purespace overflow. This causes erratic behavior of pretty much every description. The tell-tale sign would be a "Pure Lisp storage overflowed" message at some point in the "make bootstrap" log, maybe a very long time before we crash. 2. GC problem. One possible problem is that Emacs currently relies on __builtin_unwind_init to do the right thing. If __builtin_unwind_init isn't implemented on s390, but is necessary (the second part is very likely), we'll fail to mark some objects on the stack. (2) seems more likely. > Backtrace: > ../src/bootstrap-emacs(emacs_backtrace+0x46) [0x2aa1c2f12f6] > ../src/bootstrap-emacs(terminate_due_to_signal+0x9e) [0x2aa1c18fb76] > ../src/bootstrap-emacs(+0x8fdde) [0x2aa1c18fdde] > ../src/bootstrap-emacs(+0x1ef45a) [0x2aa1c2ef45a] > ../src/bootstrap-emacs(+0x1ef4a2) [0x2aa1c2ef4a2] > linux-vdso64.so.1(__kernel_rt_sigreturn+0x0) [0x3ffdc0e5480] > ../src/bootstrap-emacs(+0x2433a4) [0x2aa1c3433a4] > ../src/bootstrap-emacs(visit_static_gc_roots+0x196) [0x2aa1c342dae] > ../src/bootstrap-emacs(garbage_collect+0x1e6) [0x2aa1c3445d6] > ../src/bootstrap-emacs(eval_sub+0x54c) [0x2aa1c370244] > ../src/bootstrap-emacs(eval_sub+0x4ac) [0x2aa1c3701a4] > ../src/bootstrap-emacs(Fcond+0x84) [0x2aa1c3711f4] > ../src/bootstrap-emacs(eval_sub+0x8d2) [0x2aa1c3705ca] > ../src/bootstrap-emacs(Fwhile+0x6e) [0x2aa1c370fb6] Can you disassemble the Fwhile, eval_sub, and visit_static_gc_roots functions? I assume s390 disassembled code isn't too hard to read... Random aside: is 0x2aa1c3705ca a likely S390 program counter? The number looks familiar because it looks similar to a Lisp_Object representing a symbol on x86-64 without ASLR (an example would be 0x2aaa8dac00e8). I guess it's just a coincidence though. Thanks! Pip