jupyter icon indicating copy to clipboard operation
jupyter copied to clipboard

emacs 30.1 seg faults on Fedora 41

Open logexp1 opened this issue 9 months ago • 0 comments

In org-mode, when I run org-babel-execute-src-block, emacs crashes. This is the message from dmesg | grep emacs

[ 3552.608878] emacs[78444]: segfault at 738ed0 ip 00007fe8fc9b4948 sp 00007fff2f8076c0 error 7 in emacs-zmq.so[a948,7fe8fc9ab000+b000] likely on CPU 5 (core 8, socket 0)

which seemed to be exactly same errors in https://github.com/emacs-jupyter/jupyter/issues/212#issuecomment-1312309618 (I built emacs from source of version 30.1, though)

I tried to troubleshoot emacs-zmq (my zeromq version is 4.3.5) based on this https://github.com/nnicandro/emacs-zmq/issues/14, and I am getting similar debug messages under gdb (my gcc version is gcc (GCC) 14.2.1 20250110 (Red Hat 14.2.1-7))

(gdb) run  -nw -Q -batch -L . -l ert -l zmq-tests.el --eval "(ert-run-tests-batch-and-exit)"
Starting program: /usr/bin/emacs -nw -Q -batch -L . -l ert -l zmq-tests.el --eval "(ert-run-tests-batch-and-exit)"

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff09cf948 in emacs_module_init (ert=<optimized out>) at emacs-zmq.c:286
286         Qt = GLOBREF(INTERN("t"));

with the following backtrace:

(gdb) bt
#0  0x00007ffff09cf948 in emacs_module_init (ert=<optimized out>) at emacs-zmq.c:286
#1  0x00000000005fcce0 in Fmodule_load (file=0xfe07c4) at {PATH}/build/emacs/src/emacs-module.c:1240
#2  0x00000000005f4456 in Fload (file=<optimized out>, noerror=<optimized out>, nomessage=<optimized out>, nosuffix=<optimized out>, must_suffix=<optimized out>)
    at {PATH}/build/emacs/src/lread.c:1706
#3  0x00000000006112ca in exec_byte_code (fun=<optimized out>, args_template=<optimized out>, nargs=<optimized out>, args=<optimized out>)
    at {PATH}/build/emacs/src/lisp.h:2243
#4  0x00000000005be0b9 in apply_lambda (fun=<optimized out>, args=<optimized out>, count=count@entry=...) at {PATH}/build/emacs/src/eval.c:3215
#5  0x00000000005be425 in eval_sub (form=<optimized out>) at {PATH}/build/emacs/src/eval.c:2687
#6  0x00000000005bebf4 in eval_sub (form=<optimized out>) at {PATH}/build/emacs/src/eval.c:2565
#7  0x00000000006b3f9a in readevalloop_eager_expand_eval.constprop.0 (val=<optimized out>, macroexpand=0xafe0) at {PATH}/build/emacs/src/lread.c:2359
#8  0x00000000005f35dc in readevalloop
    (readcharfun=0xfbff05, infile0=0x0, sourcename=0xe78ff4, printflag=false, unibyte=<optimized out>, readfun=0x0, start=0x0, end=<optimized out>)
    at {PATH}/build/emacs/src/lread.c:2541
#9  0x00000000005f4c30 in Feval_buffer (buffer=<optimized out>, printflag=0x0, filename=0xe78ff4, unibyte=0x0, do_allow_print=<optimized out>)
    at {PATH}/build/emacs/src/lread.c:2616
#10 0x00007ffff0f0b3e4 in F6c6f61642d776974682d636f64652d636f6e76657273696f6e_load_with_code_conversion_0 ()
    at /usr/bin/../lib64/emacs/30.1/native-lisp/30.1-737c8ebf/preloaded/mule-3352613d-d3b3728f.eln
#11 0x00000000005bcdad in Ffuncall (nargs=5, args=0x7fffffffd390) at {PATH}/build/emacs/src/eval.c:3093
#12 0x00000000005f4618 in Fload (file=0xe74814, noerror=<optimized out>, nomessage=0x30, nosuffix=<optimized out>, must_suffix=<optimized out>)
    at {PATH}/build/emacs/src/lread.c:1619
#13 0x00007ffff0e38311 in F636f6d6d616e642d6c696e652d31_command_line_1_0 () at /usr/bin/../lib64/emacs/30.1/native-lisp/30.1-737c8ebf/preloaded/startup-bbc6ea72-bc20aae4.eln
#14 0x00000000005bcdad in Ffuncall (nargs=2, args=0x7fffffffd8b0) at {PATH}/build/emacs/src/eval.c:3093
#15 0x00007ffff0e2ee14 in F636f6d6d616e642d6c696e65_command_line_0 () at /usr/bin/../lib64/emacs/30.1/native-lisp/30.1-737c8ebf/preloaded/startup-bbc6ea72-bc20aae4.eln
#16 0x00000000005bcdad in Ffuncall (nargs=1, args=0x7fffffffd988) at {PATH}/build/emacs/src/eval.c:3093
#17 0x00007ffff0e2b3f0 in F6e6f726d616c2d746f702d6c6576656c_normal_top_level_0 () at /usr/bin/../lib64/emacs/30.1/native-lisp/30.1-737c8ebf/preloaded/startup-bbc6ea72-bc20aae4.eln
#18 0x00000000005bea04 in eval_sub (form=<optimized out>) at {PATH}/build/emacs/src/eval.c:2595
#19 0x00000000005180c2 in Feval (form=0x7ffff196172b, lexical=0x30) at {PATH}/build/emacs/src/eval.c:2462
#20 top_level_2 () at {PATH}/build/emacs/src/keyboard.c:1184
#21 0x00000000005ba50e in internal_condition_case (bfun=0x518000 <top_level_2>, handlers=<optimized out>, hfun=0x517d70 <cmd_error>) at {PATH}/build/emacs/src/eval.c:1613
#22 0x000000000051812a in top_level_1 (ignore=ignore@entry=0x0) at {PATH}/build/emacs/src/keyboard.c:1196
#23 0x00000000005ba417 in internal_catch (tag=<optimized out>, func=0x518100 <top_level_1>, arg=0x0) at {PATH}/build/emacs/src/eval.c:1292
#24 0x000000000051849d in command_loop () at {PATH}/build/emacs/src/keyboard.c:1145
#25 0x00000000005185af in recursive_edit_1 () at {PATH}/build/emacs/src/keyboard.c:754
#26 0x00000000005187ad in Frecursive_edit () at {PATH}/build/emacs/src/keyboard.c:837
#27 0x00000000004225c4 in main (argc=<optimized out>, argv=0x7fffffffde58) at {PATH}/build/emacs/src/emacs.c:2635

from https://github.com/nnicandro/emacs-zmq/issues/14#issuecomment-1493311040, it is said build without xwidget support had a success, but that's not my case.

can anyone help me?

Thanks.

logexp1 avatar Mar 01 '25 12:03 logexp1