Subject: Re: bug#45603: 28.0.50; feature_native-comp: Fatal error 11: Segmentation fault

From: Andrea Corallo <[email-masked]>
Date: Sat, 02 Jan 2021 11:21:24 +0000

Gregor Zattler <[email-masked]> writes:

> Hallo Andrea, emacs developers,
>
> I built emacs-feature-native_comp from a fresh checkout and
> in buffer *Async-native-compile-log* I see:
>
> Compiling /home/grfz/src/emacs-feature_native-comp/lisp/emacs-lisp/cl-macs.el...
> Fatal error 11: Segmentation fault
> Backtrace:
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x58bed0]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x428a3b]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x589f2b]
> /lib/x86_64-linux-gnu/libpthread.so.0(+0x12730)[0x7fa69d971730]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x7aace1)[0x7fa69c80fce1]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x7afacb)[0x7fa69c814acb]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x7b49b6)[0x7fa69c8199b6]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x7b6c02)[0x7fa69c81bc02]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x7b6ef8)[0x7fa69c81bef8]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0xd297c2)[0x7fa69cd8e7c2]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x7b7900)[0x7fa69c81c900]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x7b808b)[0x7fa69c81d08b]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x575423)[0x7fa69c5da423]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x575b28)[0x7fa69c5dab28]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x575b3a)[0x7fa69c5dab3a]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x575b81)[0x7fa69c5dab81]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x57404e)[0x7fa69c5d904e]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x57614a)[0x7fa69c5db14a]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x2cd739)[0x7fa69c332739]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x2cf5a2)[0x7fa69c3345a2]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x6368cd)[0x7fa69c69b8cd]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x218b21)[0x7fa69c27db21]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x23c751)[0x7fa69c2a1751]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x232fce)[0x7fa69c297fce]
> /lib/x86_64-linux-gnu/libgccjit.so.0(gcc_jit_context_compile_to_file+0x85)[0x7fa69c28cbb5]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x6633d1]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x60d9c6]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x60bbde]
> /home/grfz/src/emacs-feature_native-comp/native-lisp/28.0.50-x86_64-pc-linux-gnu-461e0aa6bc5d3e0280977b4fa8ba5039/comp-7672a6edbf71d09a366871fc269b52a4-fbea1fae46c22432f098e5964ffb2ec8.eln(F636f6d702d636f6d70696c652d637478742d746f2d66696c65_comp_compile_ctxt_to_file_0+0x17a)[0x7fa695f9186a]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x60d9c6]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x60bbde]
> /home/grfz/src/emacs-feature_native-comp/native-lisp/28.0.50-x86_64-pc-linux-gnu-461e0aa6bc5d3e0280977b4fa8ba5039/comp-7672a6edbf71d09a366871fc269b52a4-fbea1fae46c22432f098e5964ffb2ec8.eln(F636f6d702d66696e616c31_comp_final1_0+0x117)[0x7fa695f91a87]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x60bbde]
> /home/grfz/src/emacs-feature_native-comp/native-lisp/28.0.50-x86_64-pc-linux-gnu-461e0aa6bc5d3e0280977b4fa8ba5039/comp-7672a6edbf71d09a366871fc269b52a4-fbea1fae46c22432f098e5964ffb2ec8.eln(F636f6d702d66696e616c_comp_final_0+0xe0)[0x7fa695f91c60]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x60d9c6]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x60bbde]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x65735d]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x60babe]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x60bcca]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x61889c]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x61b011]
> ...
> Compiling /home/grfz/.emacs.d/elpa-28.0/helm-20201231.1707/helm-files.el...
> Compiling /home/grfz/.emacs.d/elpa-28.0/helm-core-20201225.1456/helm-lib.el...
> Fatal error 11: Segmentation fault
> Backtrace:
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x58bed0]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x428a3b]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x589f2b]
> /lib/x86_64-linux-gnu/libpthread.so.0(+0x12730)[0x7f2890a71730]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x7aace1)[0x7f288f90fce1]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x7afacb)[0x7f288f914acb]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x7b49b6)[0x7f288f9199b6]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x7b6c02)[0x7f288f91bc02]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x7b6ef8)[0x7f288f91bef8]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0xd297c2)[0x7f288fe8e7c2]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x7b7900)[0x7f288f91c900]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x7b808b)[0x7f288f91d08b]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x575423)[0x7f288f6da423]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x575b28)[0x7f288f6dab28]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x575b3a)[0x7f288f6dab3a]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x575b81)[0x7f288f6dab81]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x57404e)[0x7f288f6d904e]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x57614a)[0x7f288f6db14a]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x2cd739)[0x7f288f432739]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x2cf5a2)[0x7f288f4345a2]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x6368cd)[0x7f288f79b8cd]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x218b21)[0x7f288f37db21]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x23c751)[0x7f288f3a1751]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x232fce)[0x7f288f397fce]
> /lib/x86_64-linux-gnu/libgccjit.so.0(gcc_jit_context_compile_to_file+0x85)[0x7f288f38cbb5]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x6633d1]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x60d9c6]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x60bbde]
> /home/grfz/src/emacs-feature_native-comp/native-lisp/28.0.50-x86_64-pc-linux-gnu-461e0aa6bc5d3e0280977b4fa8ba5039/comp-7672a6edbf71d09a366871fc269b52a4-fbea1fae46c22432f098e5964ffb2ec8.eln(F636f6d702d636f6d70696c652d637478742d746f2d66696c65_comp_compile_ctxt_to_file_0+0x17a)[0x7f288909186a]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x60d9c6]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x60bbde]
> /home/grfz/src/emacs-feature_native-comp/native-lisp/28.0.50-x86_64-pc-linux-gnu-461e0aa6bc5d3e0280977b4fa8ba5039/comp-7672a6edbf71d09a366871fc269b52a4-fbea1fae46c22432f098e5964ffb2ec8.eln(F636f6d702d66696e616c31_comp_final1_0+0x117)[0x7f2889091a87]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x60bbde]
> /home/grfz/src/emacs-feature_native-comp/native-lisp/28.0.50-x86_64-pc-linux-gnu-461e0aa6bc5d3e0280977b4fa8ba5039/comp-7672a6edbf71d09a366871fc269b52a4-fbea1fae46c22432f098e5964ffb2ec8.eln(F636f6d702d66696e616c_comp_final_0+0xe0)[0x7f2889091c60]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x60d9c6]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x60bbde]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x65735d]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x60babe]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x60bcca]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x61889c]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x61b011]
> ...
> Compiling /home/grfz/src/emacs-feature_native-comp/lisp/emacs-lisp/edebug.el...
> Fatal error 11: Segmentation fault
> Backtrace:
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x58bed0]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x428a3b]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x589f2b]
> /lib/x86_64-linux-gnu/libpthread.so.0(+0x12730)[0x7f8c4221b730]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x7aace1)[0x7f8c410b9ce1]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x7afacb)[0x7f8c410beacb]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x7b49b6)[0x7f8c410c39b6]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x7b6c02)[0x7f8c410c5c02]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x7b6ef8)[0x7f8c410c5ef8]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0xd297c2)[0x7f8c416387c2]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x7b7900)[0x7f8c410c6900]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x7b808b)[0x7f8c410c708b]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x575423)[0x7f8c40e84423]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x575b28)[0x7f8c40e84b28]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x575b3a)[0x7f8c40e84b3a]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x575b81)[0x7f8c40e84b81]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x57404e)[0x7f8c40e8304e]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x57614a)[0x7f8c40e8514a]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x2cd739)[0x7f8c40bdc739]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x2cf5a2)[0x7f8c40bde5a2]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x6368cd)[0x7f8c40f458cd]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x218b21)[0x7f8c40b27b21]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x23c751)[0x7f8c40b4b751]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x232fce)[0x7f8c40b41fce]
> /lib/x86_64-linux-gnu/libgccjit.so.0(gcc_jit_context_compile_to_file+0x85)[0x7f8c40b36bb5]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x6633d1]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x60d9c6]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x60bbde]
> /home/grfz/src/emacs-feature_native-comp/native-lisp/28.0.50-x86_64-pc-linux-gnu-461e0aa6bc5d3e0280977b4fa8ba5039/comp-7672a6edbf71d09a366871fc269b52a4-fbea1fae46c22432f098e5964ffb2ec8.eln(F636f6d702d636f6d70696c652d637478742d746f2d66696c65_comp_compile_ctxt_to_file_0+0x17a)[0x7f8c3a83b86a]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x60d9c6]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x60bbde]
> /home/grfz/src/emacs-feature_native-comp/native-lisp/28.0.50-x86_64-pc-linux-gnu-461e0aa6bc5d3e0280977b4fa8ba5039/comp-7672a6edbf71d09a366871fc269b52a4-fbea1fae46c22432f098e5964ffb2ec8.eln(F636f6d702d66696e616c31_comp_final1_0+0x117)[0x7f8c3a83ba87]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x60bbde]
> /home/grfz/src/emacs-feature_native-comp/native-lisp/28.0.50-x86_64-pc-linux-gnu-461e0aa6bc5d3e0280977b4fa8ba5039/comp-7672a6edbf71d09a366871fc269b52a4-fbea1fae46c22432f098e5964ffb2ec8.eln(F636f6d702d66696e616c_comp_final_0+0xe0)[0x7f8c3a83bc60]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x60d9c6]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x60bbde]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x65735d]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x60babe]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x60bcca]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x61889c]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x61b011]
> ...
> Fatal error 11: Segmentation fault
> Backtrace:
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x58bed0]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x428a3b]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x589f2b]
> /lib/x86_64-linux-gnu/libpthread.so.0(+0x12730)[0x7fdae28e3730]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x7aace1)[0x7fdae1781ce1]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x7afacb)[0x7fdae1786acb]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x7b49b6)[0x7fdae178b9b6]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x7b6c02)[0x7fdae178dc02]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x7b6ef8)[0x7fdae178def8]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0xd297c2)[0x7fdae1d007c2]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x7b7900)[0x7fdae178e900]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x7b808b)[0x7fdae178f08b]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x575423)[0x7fdae154c423]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x575b28)[0x7fdae154cb28]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x575b3a)[0x7fdae154cb3a]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x575b81)[0x7fdae154cb81]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x57404e)[0x7fdae154b04e]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x57614a)[0x7fdae154d14a]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x2cd739)[0x7fdae12a4739]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x2cf5a2)[0x7fdae12a65a2]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x6368cd)[0x7fdae160d8cd]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x218b21)[0x7fdae11efb21]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x23c751)[0x7fdae1213751]
> /lib/x86_64-linux-gnu/libgccjit.so.0(+0x232fce)[0x7fdae1209fce]
> /lib/x86_64-linux-gnu/libgccjit.so.0(gcc_jit_context_compile_to_file+0x85)[0x7fdae11febb5]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x6633d1]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x60d9c6]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x60bbde]
> /home/grfz/src/emacs-feature_native-comp/native-lisp/28.0.50-x86_64-pc-linux-gnu-461e0aa6bc5d3e0280977b4fa8ba5039/comp-7672a6edbf71d09a366871fc269b52a4-fbea1fae46c22432f098e5964ffb2ec8.eln(F636f6d702d636f6d70696c652d637478742d746f2d66696c65_comp_compile_ctxt_to_file_0+0x17a)[0x7fdadaf0386a]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x60d9c6]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x60bbde]
> /home/grfz/src/emacs-feature_native-comp/native-lisp/28.0.50-x86_64-pc-linux-gnu-461e0aa6bc5d3e0280977b4fa8ba5039/comp-7672a6edbf71d09a366871fc269b52a4-fbea1fae46c22432f098e5964ffb2ec8.eln(F636f6d702d66696e616c31_comp_final1_0+0x117)[0x7fdadaf03a87]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x60bbde]
> /home/grfz/src/emacs-feature_native-comp/native-lisp/28.0.50-x86_64-pc-linux-gnu-461e0aa6bc5d3e0280977b4fa8ba5039/comp-7672a6edbf71d09a366871fc269b52a4-fbea1fae46c22432f098e5964ffb2ec8.eln(F636f6d702d66696e616c_comp_final_0+0xe0)[0x7fdadaf03c60]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x60d9c6]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x60bbde]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x65735d]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x60babe]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x60bcca]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x61889c]
> /home/grfz/src/emacs-feature_native-comp/src/emacs[0x61b011]
> ...
> Compilation finished.
> Compiling /home/grfz/src/emacs-feature_native-comp/lisp/mail/sendmail.el...
> Compiling /home/grfz/src/emacs-feature_native-comp/lisp/mail/emacsbug.el...
> Compilation finished.
> Compiling /home/grfz/src/emacs-feature_native-comp/lisp/mail/mail-extr.el...
> Compiling /home/grfz/src/emacs-feature_native-comp/lisp/ecomplete.el...
> Compiling /home/grfz/.emacs.d/elpa-28.0/orgalist-1.13/orgalist.el...
> Compiling /home/grfz/.emacs.d/elpa-28.0/bbdb-20200928.1749/bbdb-message.el...
> Compiling /home/grfz/src/emacs-feature_native-comp/lisp/sort.el...
> Compiling /home/grfz/src/emacs-feature_native-comp/lisp/emacs-lisp/shadow.el...
> Compilation finished.
>
> This is with CFLAGS -g -O3 and comp-speed = 3.
>
>
> Ciao; Gregor

Hi Gregor,

Uhmm... Was the repo in a clean state?

Also have you tried a regular bootstrap at speed 2?  Speed 3 bootstrap
is typically untested.

Thanks

  Andrea