Subject: 24.4.91; sigsegv when compiling shr.el

From: Nicolas Richard <[email-masked]>
Date: Mon, 30 Mar 2015 09:53:51 +0200

I was bootstrapping and ran into an error (shown below).

The error shows a command that "make" is trying to run -- but when I run
that manually (from the lisp/ subdir), I don't get the error:

EMACSLOADPATH= '../src/emacs' -batch --no-site-file --no-site-lisp --eval "(setq max-lisp-eval-depth 2200)" --eval '(setq load-prefer-newer t)' -f batch-byte-compile net/shr.el

If I remove net/shr.elc and do "make" again, I get the error again. So I
can reliably reproduce the error, but not in a way that I can run under
gdb...

I include hereafter the compilation error, a backtrace (from the core
file) and a possible fix/workaround.


Compilation error :

~/sources/emacs/emacs-new-repo/lisp $ make
make -C ../leim all EMACS="../src/emacs"
make[1]: Entering directory '/home/youngfrog/sources/emacs/emacs-new-repo/leim'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/youngfrog/sources/emacs/emacs-new-repo/leim'
make -C ../admin/grammars all EMACS="../../src/emacs"
make[1]: Entering directory '/home/youngfrog/sources/emacs/emacs-new-repo/admin/grammars'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/youngfrog/sources/emacs/emacs-new-repo/admin/grammars'
make[1]: Entering directory '/home/youngfrog/sources/emacs/emacs-new-repo/lisp'
  ELC      net/shr.elc
../gnus/auth-source.el: Obsolete name arg "Empty" to constructor auth-source-backend

Backtrace:
../src/emacs[0x8230105]
../src/emacs[0x81f3d2c]
../src/emacs[0x822fa07]
../src/emacs[0x822f9de]
../src/emacs[0x822fa3b]
../src/emacs[0x822fb43]
../src/emacs[0x830749d]
../src/emacs[0x8309023]
../src/emacs[0x83056be]
../src/emacs[0x8302ecc]
../src/emacs[0x82bbcc0]
../src/emacs[0x82ce6d6]
../src/emacs[0x832dd07]
../src/emacs[0x82cf7cc]
../src/emacs[0x82cee71]
../src/emacs[0x832dd07]
../src/emacs[0x82cf7cc]
../src/emacs[0x82cee71]
../src/emacs[0x82cd6c5]
../src/emacs[0x82cdf03]
../src/emacs[0x82c8356]
../src/emacs[0x82ce889]
../src/emacs[0x832dd07]
../src/emacs[0x82cf7cc]
../src/emacs[0x82cee71]
../src/emacs[0x82cdfd8]
../src/emacs[0x831144d]
../src/emacs[0x8311fe7]
../src/emacs[0x83124bc]
../src/emacs[0x82cea57]
../src/emacs[0x832dd07]
../src/emacs[0x82cfe14]
../src/emacs[0x82cee71]
../src/emacs[0x82ce0e6]
../src/emacs[0x830f5b5]
../src/emacs[0x82e1167]
../src/emacs[0x82ce8f5]
../src/emacs[0x832dd07]
../src/emacs[0x832ccb1]
../src/emacs[0x82cc887]
...
/bin/sh : ligne 1 : 30368 Erreur de segmentation  (core dumped)EMACSLOADPATH= '../src/emacs' -batch --no-site-file --no-site-lisp --eval "(setq max-lisp-eval-depth 2200)" --eval '(setq load-prefer-newer t)' -f batch-byte-compile net/shr.el
Makefile:287: recipe for target 'net/shr.elc' failed
make[1]: *** [net/shr.elc] Error 139
make[1]: Leaving directory '/home/youngfrog/sources/emacs/emacs-new-repo/lisp'
Makefile:310: recipe for target 'compile-main' failed
make: *** [compile-main] Error 2


backtrace from the core file :

Core was generated by `../src/emacs -batch --no-site-file --no-site-lisp --eval (setq max-lisp-eval-de'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0xffffe424 in ?? ()
(gdb) bt
#0  0xffffe424 in ?? ()
#1  0x0876a888 in ?? ()
#2  0x0822fa07 in handle_fatal_signal (sig=11) at sysdep.c:1604
#3  0x0822f9de in deliver_thread_signal (sig=11, handler=0x822f9ee <handle_fatal_signal>) at sysdep.c:1578
#4  0x0822fa3b in deliver_fatal_thread_signal (sig=11) at sysdep.c:1616
#5  0x0822fb43 in handle_sigsegv (sig=11, siginfo=0x876a94c, arg=0x876a9cc) at sysdep.c:1667
#6  0xffffe40c in ?? ()
#7  0x0000000b in ?? ()
#8  0x0876a94c in ?? ()
#9  0x08309023 in print_object (obj=-4611686018284995424, printcharfun=0, escapeflag=true) at print.c:1677
#10 0x083056be in print (obj=-4611686018284996208, printcharfun=0, escapeflag=true) at print.c:1124
#11 0x08302ecc in Fprin1_to_string (object=-4611686018284996208, noescape=0) at print.c:611
#12 0x082bbcc0 in Fformat (nargs=2, args=0xbfb10f00) at editfns.c:3920
#13 0x082ce6d6 in Ffuncall (nargs=3, args=0xbfb10ef8) at eval.c:2698
#14 0x0832dd07 in exec_byte_code (bytestr=-9223372036709571352, vector=-6917529027493147080, maxdepth=4611686018427387924, 
    args_template=4611686018427388418, nargs=2, args=0xbfb114d8) at bytecode.c:919
#15 0x082cf7cc in funcall_lambda (fun=-6917529027493422848, nargs=2, arg_vector=0xbfb114c8) at eval.c:2885
#16 0x082cee71 in Ffuncall (nargs=3, args=0xbfb114c0) at eval.c:2767
#17 0x0832dd07 in exec_byte_code (bytestr=-9223372036704484016, vector=-6917529027492912904, maxdepth=4611686018427387912, 
    args_template=4611686018427388546, nargs=3, args=0xbfb11a58) at bytecode.c:919
#18 0x082cf7cc in funcall_lambda (fun=-6917529027493422800, nargs=3, arg_vector=0xbfb11a48) at eval.c:2885
#19 0x082cee71 in Ffuncall (nargs=4, args=0xbfb11a40) at eval.c:2767
#20 0x082cd6c5 in Fapply (nargs=2, args=0xbfb11af0) at eval.c:2337
#21 0x082cdf03 in apply1 (fn=-6917529027493422800, arg=-4611686018283958224) at eval.c:2558
#22 0x082c8356 in Fmacroexpand (form=-4611686018283958240, environment=0) at eval.c:1056
#23 0x082ce889 in Ffuncall (nargs=2, args=0xbfb11ce8) at eval.c:2721
#24 0x0832dd07 in exec_byte_code (bytestr=-9223372036715655652, vector=-6917529027501961684, maxdepth=4611686018427387915, 
    args_template=4611686018427388418, nargs=2, args=0xbfb122b0) at bytecode.c:919
#25 0x082cf7cc in funcall_lambda (fun=-6917529027501961748, nargs=2, arg_vector=0xbfb122a0) at eval.c:2885
#26 0x082cee71 in Ffuncall (nargs=3, args=0xbfb12298) at eval.c:2767
#27 0x082cdfd8 in call2 (fn=44027, arg1=-4611686018283958240, arg2=0) at eval.c:2581
#28 0x0831144d in readevalloop_eager_expand_eval (val=-4611686018283958240, macroexpand=44027) at lread.c:1743
#29 0x08311fe7 in readevalloop (readcharfun=-6917529027490654704, stream=0x0, sourcename=-9223372036704344392, printflag=false, unibyte=0, readfun=0, 
    start=0, end=0) at lread.c:1927
#30 0x083124bc in Feval_buffer (buffer=-6917529027490654704, printflag=0, filename=-9223372036704331624, unibyte=0, do_allow_print=4740) at lread.c:1990
#31 0x082cea57 in Ffuncall (nargs=6, args=0xbfb125e8) at eval.c:2734
#32 0x0832dd07 in exec_byte_code (bytestr=-9223372036715869300, vector=-6917529027502175332, maxdepth=4611686018427387910, args_template=0, nargs=0, 
    args=0x0) at bytecode.c:919
#33 0x082cfe14 in funcall_lambda (fun=-6917529027502175476, nargs=4, arg_vector=0xbfb12ba0) at eval.c:2951
#34 0x082cee71 in Ffuncall (nargs=5, args=0xbfb12b98) at eval.c:2767
#35 0x082ce0e6 in call4 (fn=434940, arg1=-9223372036704331624, arg2=-9223372036704331624, arg3=0, arg4=4740) at eval.c:2598
#36 0x0830f5b5 in Fload (file=-9223372036704329608, noerror=0, nomessage=4740, nosuffix=0, must_suffix=4740) at lread.c:1268
#37 0x082e1167 in Frequire (feature=1016056, filename=0, noerror=0) at fns.c:2894
#38 0x082ce8f5 in Ffuncall (nargs=2, args=0xbfb12fa8) at eval.c:2725
#39 0x0832dd07 in exec_byte_code (bytestr=-9223372036704329560, vector=-6917529027493435464, maxdepth=4611686018427387907, args_template=0, nargs=0, 
    args=0x0) at bytecode.c:919
#40 0x0832ccb1 in Fbyte_code (bytestr=-9223372036704329560, vector=-6917529027493435464, maxdepth=4611686018427387907) at bytecode.c:485
#41 0x082cc887 in eval_sub (form=-4611686018281080672) at eval.c:2187
#42 0x08311ff9 in readevalloop (readcharfun=2655, stream=0x8f43430, sourcename=-9223372036704329496, printflag=false, unibyte=0, readfun=0, start=0, end=0)
    at lread.c:1929
#43 0x0830f9aa in Fload (file=-9223372036709761832, noerror=0, nomessage=4740, nosuffix=0, must_suffix=4740) at lread.c:1326
#44 0x082e1167 in Frequire (feature=361359, filename=0, noerror=0) at fns.c:2894
#52 0x082ce8f5 in Ffuncall (nargs=2, args=0xbfb14368) at eval.c:2725
#53 0x0832dd07 in exec_byte_code (bytestr=-9223372036704311904, vector=-6917529027493357128, maxdepth=4611686018427387914, args_template=0, nargs=0, 
    args=0x0) at bytecode.c:919
#54 0x0832ccb1 in Fbyte_code (bytestr=-9223372036704311904, vector=-6917529027493357128, maxdepth=4611686018427387914) at bytecode.c:485
#55 0x082cc887 in eval_sub (form=-4611686018281350112) at eval.c:2187
#56 0x08311ff9 in readevalloop (readcharfun=2655, stream=0x8f15ac8, sourcename=-9223372036704311824, printflag=false, unibyte=0, readfun=0, start=0, end=0)
    at lread.c:1929
#57 0x0830f9aa in Fload (file=-9223372036709761928, noerror=0, nomessage=4740, nosuffix=0, must_suffix=4740) at lread.c:1326
#58 0x082e1167 in Frequire (feature=361329, filename=0, noerror=0) at fns.c:2894
#59 0x082ce8f5 in Ffuncall (nargs=2, args=0xbfb14d88) at eval.c:2725
#60 0x0832dd07 in exec_byte_code (bytestr=-9223372036709762008, vector=-6917529027493721792, maxdepth=4611686018427387912, args_template=0, nargs=0, 
    args=0x0) at bytecode.c:919
#61 0x0832ccb1 in Fbyte_code (bytestr=-9223372036709762008, vector=-6917529027493721792, maxdepth=4611686018427387912) at bytecode.c:485
#62 0x082cc887 in eval_sub (form=-4611686018278187424) at eval.c:2187
#63 0x08311ff9 in readevalloop (readcharfun=2655, stream=0x8f6ba48, sourcename=-9223372036709762072, printflag=false, unibyte=0, readfun=0, start=0, end=0)
    at lread.c:1929
#64 0x0830f9aa in Fload (file=-9223372036715427700, noerror=0, nomessage=4740, nosuffix=0, must_suffix=4740) at lread.c:1326
#65 0x082e1167 in Frequire (feature=996996, filename=0, noerror=0) at fns.c:2894
#66 0x082ce8f5 in Ffuncall (nargs=2, args=0xbfb15798) at eval.c:2725
#67 0x0832dd07 in exec_byte_code (bytestr=-9223372036709771880, vector=-6917529027493721888, maxdepth=4611686018427387906, args_template=0, nargs=0, 
    args=0x0) at bytecode.c:919
#68 0x0832ccb1 in Fbyte_code (bytestr=-9223372036709771880, vector=-6917529027493721888, maxdepth=4611686018427387906) at bytecode.c:485
#69 0x082cc887 in eval_sub (form=-4611686018278183680) at eval.c:2187
#70 0x082cbad4 in Feval (form=-4611686018278183680, lexical=0) at eval.c:1996
#71 0x082ce889 in Ffuncall (nargs=3, args=0xbfb15e80) at eval.c:2721
#72 0x0832dd07 in exec_byte_code (bytestr=-9223372036704688456, vector=-6917529027493484000, maxdepth=4611686018427387916, 
    args_template=4611686018427388161, nargs=1, args=0xbfb16458) at bytecode.c:919
#73 0x082cf7cc in funcall_lambda (fun=-6917529027494109176, nargs=1, arg_vector=0xbfb16450) at eval.c:2885
#74 0x082cee71 in Ffuncall (nargs=2, args=0xbfb16448) at eval.c:2767
#75 0x0832dd07 in exec_byte_code (bytestr=-9223372036704311568, vector=-6917529027493733736, maxdepth=4611686018427387910, 
    args_template=4611686018427388161, nargs=1, args=0xbfb169f8) at bytecode.c:919
#76 0x082cf7cc in funcall_lambda (fun=-6917529027493721936, nargs=1, arg_vector=0xbfb169f0) at eval.c:2885
#77 0x082cee71 in Ffuncall (nargs=2, args=0xbfb169e8) at eval.c:2767
#78 0x0832dd07 in exec_byte_code (bytestr=-9223372036704311936, vector=-6917529027493488248, maxdepth=4611686018427387914, 
    args_template=4611686018427388418, nargs=2, args=0xbfb16fc0) at bytecode.c:919
#79 0x082cf7cc in funcall_lambda (fun=-6917529027493488144, nargs=2, arg_vector=0xbfb16fb0) at eval.c:2885
#80 0x082cee71 in Ffuncall (nargs=3, args=0xbfb16fa8) at eval.c:2767
#81 0x0832dd07 in exec_byte_code (bytestr=-9223372036704311648, vector=-6917529027493488064, maxdepth=4611686018427387914, 
    args_template=4611686018427388032, nargs=1, args=0xbfb175c8) at bytecode.c:919
#82 0x082cf7cc in funcall_lambda (fun=-6917529027493484808, nargs=1, arg_vector=0xbfb175c8) at eval.c:2885
#83 0x082cee71 in Ffuncall (nargs=2, args=0xbfb175c0) at eval.c:2767
#84 0x082cd24b in Fapply (nargs=2, args=0xbfb175c0) at eval.c:2293
#85 0x082cdf03 in apply1 (fn=-6917529027493484808, arg=-4611686018278181136) at eval.c:2558
#86 0x082c8356 in Fmacroexpand (form=-4611686018278180992, environment=-4611686018280757552) at eval.c:1056
#87 0x082ce889 in Ffuncall (nargs=3, args=0xbfb177b8) at eval.c:2721
#88 0x0832dd07 in exec_byte_code (bytestr=-9223372036715659308, vector=-6917529027501965340, maxdepth=4611686018427387914, 
    args_template=4611686018427388418, nargs=2, args=0xbfb17d90) at bytecode.c:919
#89 0x082cf7cc in funcall_lambda (fun=-6917529027501965404, nargs=2, arg_vector=0xbfb17d80) at eval.c:2885
#90 0x082cee71 in Ffuncall (nargs=3, args=0xbfb17d78) at eval.c:2767
#91 0x0832dd07 in exec_byte_code (bytestr=-9223372036704311936, vector=-6917529027493488248, maxdepth=4611686018427387914, 
    args_template=4611686018427388418, nargs=2, args=0xbfb18348) at bytecode.c:919
#92 0x082cf7cc in funcall_lambda (fun=-6917529027493488144, nargs=2, arg_vector=0xbfb18338) at eval.c:2885
#93 0x082cee71 in Ffuncall (nargs=3, args=0xbfb18330) at eval.c:2767
#94 0x0832dd07 in exec_byte_code (bytestr=-9223372036707889896, vector=-6917529027493883040, maxdepth=4611686018427387908, 
    args_template=4611686018427388161, nargs=1, args=0xbfb188d8) at bytecode.c:919
#95 0x082cf7cc in funcall_lambda (fun=-6917529027493868936, nargs=1, arg_vector=0xbfb188d0) at eval.c:2885
#96 0x082cee71 in Ffuncall (nargs=2, args=0xbfb188c8) at eval.c:2767
#97 0x0832dd07 in exec_byte_code (bytestr=-9223372036707957672, vector=-6917529027494104824, maxdepth=4611686018427387909, 
    args_template=4611686018427388161, nargs=1, args=0xbfb18e70) at bytecode.c:919
#98 0x082cf7cc in funcall_lambda (fun=-6917529027493796296, nargs=1, arg_vector=0xbfb18e68) at eval.c:2885
#99 0x082cee71 in Ffuncall (nargs=2, args=0xbfb18e60) at eval.c:2767
#100 0x0832dd07 in exec_byte_code (bytestr=-9223372036707957400, vector=-6917529027494042928, maxdepth=4611686018427387920, 
    args_template=4611686018427388161, nargs=1, args=0xbfb19488) at bytecode.c:919
#101 0x082cf7cc in funcall_lambda (fun=-6917529027493791176, nargs=1, arg_vector=0xbfb19480) at eval.c:2885
#102 0x082cee71 in Ffuncall (nargs=2, args=0xbfb19478) at eval.c:2767
#103 0x0832dd07 in exec_byte_code (bytestr=-9223372036709362528, vector=-6917529027494047024, maxdepth=4611686018427387920, 
    args_template=4611686018427388417, nargs=1, args=0xbfb19a40) at bytecode.c:919
#104 0x082cf7cc in funcall_lambda (fun=-6917529027494096592, nargs=1, arg_vector=0xbfb19a38) at eval.c:2885
#105 0x082cee71 in Ffuncall (nargs=2, args=0xbfb19a30) at eval.c:2767
#106 0x0832dd07 in exec_byte_code (bytestr=-9223372036710022968, vector=-6917529027493389808, maxdepth=4611686018427387912, 
    args_template=4611686018427388161, nargs=1, args=0xbfb19ff8) at bytecode.c:919
#107 0x082cf7cc in funcall_lambda (fun=-6917529027493389680, nargs=1, arg_vector=0xbfb19ff0) at eval.c:2885
#108 0x082cee71 in Ffuncall (nargs=2, args=0xbfb19fe8) at eval.c:2767
#109 0x0832dd07 in exec_byte_code (bytestr=-9223372036710025624, vector=-6917529027493389968, maxdepth=4611686018427387914, 
    args_template=4611686018427388160, nargs=0, args=0xbfb1a610) at bytecode.c:919
#110 0x082cf7cc in funcall_lambda (fun=-6917529027493393840, nargs=0, arg_vector=0xbfb1a610) at eval.c:2885
#111 0x082cee71 in Ffuncall (nargs=1, args=0xbfb1a608) at eval.c:2767
#112 0x0832dd07 in exec_byte_code (bytestr=-9223372036715103172, vector=-6917529027501409204, maxdepth=4611686018427387927, 
    args_template=4611686018427388161, nargs=1, args=0xbfb1abc8) at bytecode.c:919
#113 0x082cf7cc in funcall_lambda (fun=-6917529027501409268, nargs=1, arg_vector=0xbfb1abc0) at eval.c:2885
#114 0x082cee71 in Ffuncall (nargs=2, args=0xbfb1abb8) at eval.c:2767
#115 0x0832dd07 in exec_byte_code (bytestr=-9223372036715122260, vector=-6917529027501428292, maxdepth=4611686018427387922, 
    args_template=4611686018427387904, nargs=0, args=0xbfb1b1c8) at bytecode.c:919
#116 0x082cf7cc in funcall_lambda (fun=-6917529027501428356, nargs=0, arg_vector=0xbfb1b1c8) at eval.c:2885
#117 0x082cee71 in Ffuncall (nargs=1, args=0xbfb1b1c0) at eval.c:2767
#118 0x0832dd07 in exec_byte_code (bytestr=-9223372036715124652, vector=-6917529027501430684, maxdepth=4611686018427387916, 
    args_template=4611686018427387904, nargs=0, args=0xbfb1b650) at bytecode.c:919
#119 0x082cf7cc in funcall_lambda (fun=-6917529027501430748, nargs=0, arg_vector=0xbfb1b650) at eval.c:2885
#120 0x082cf304 in apply_lambda (fun=-6917529027501430748, args=0, count=3) at eval.c:2826
#121 0x082ccd1a in eval_sub (form=-4611686018281010336) at eval.c:2226
#122 0x082cbad4 in Feval (form=-4611686018281010336, lexical=0) at eval.c:1996
#123 0x081f8f84 in top_level_2 () at keyboard.c:1148
#124 0x082c956e in internal_condition_case (bfun=0x81f8f51 <top_level_2>, handlers=2060, hfun=0x81f86cc <cmd_error>) at eval.c:1348
#125 0x081f8fea in top_level_1 (ignore=0) at keyboard.c:1156
#126 0x082c85ba in internal_catch (tag=4885, func=0x81f8f8a <top_level_1>, arg=0) at eval.c:1108
#127 0x081f8e68 in command_loop () at keyboard.c:1117
#128 0x081f80df in recursive_edit_1 () at keyboard.c:728
#129 0x081f83a0 in Frecursive_edit () at keyboard.c:799
#130 0x081f599d in main (argc=11, argv=0xbfb1bb34) at emacs.c:1626
(gdb) 


The following patch fixes the problem for me. I don't know if that's a
full fix or if it hides an underlying different problem...

modified   lisp/gnus/auth-source.el
@@ -1644,7 +1644,7 @@ (defun* auth-source-secrets-create (&rest
                                     &allow-other-keys)
   ;; TODO
   ;; (apply 'secrets-create-item (auth-get-source entry) name passwd spec)
-  (debug spec))
+  (debug nil spec))
 
 ;;; Backend specific parsing: Mac OS Keychain (using /usr/bin/security) backend


In GNU Emacs 24.4.91.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2015-03-24 on localhost
Repository revision: 1291ce180ee0a8e8fcbc57975b55968f9e7162bc
Windowing system distributor `The X.Org Foundation', version 11.0.11500000
System Description:	Gentoo Base System release 2.2

Configured using:
 `configure --with-x-toolkit=lucid --enable-checking --with-wide-int
 'CFLAGS= -O0 -g3''

Important settings:
  value of $LANG: fr_FR.UTF-8
  locale-coding-system: utf-8-unix

-- 
Nicolas Richard