Subject: Re: bug#58226: 29.0.50; multisession-tests.el fails to finish on macOS (10.13.6)

From: Stefan Kangas <[email-masked]>
Date: Tue, 4 Oct 2022 19:15:42 +0200

Lars Ingebrigtsen <[email-masked]> writes:
>
> Stefan Kangas <[email-masked]> writes:
>
> >    passed  1/5  multi-test-files-busy (1.110505 sec)
> >    passed  2/5  multi-test-files-simple (0.344866 sec)
> >    passed  3/5  multi-test-files-some-values (0.008406 sec)
> > Test multi-test-sqlite-busy backtrace:
> > make[3]: *** [lisp/emacs-lisp/multisession-tests.log] Error 134
>
> No backtrace?  Did the testing Emacs segfault or something?

Indeed, there is a crash (SIGABRT).  Emacs exits with this output:

    Abort trap: 6

Running the tests interactively gives me the following output in the ert buffer:

Selector: t
Passed:  3
Failed:  2 (2 unexpected)
Skipped: 0
Total:   5/5

Started at:   2022-10-04 19:07:17+0200
Finished.
Finished at:  2022-10-04 19:07:20+0200

...FF

F multi-test-sqlite-busy
    (error "near \"on\": syntax error")

F multi-test-sqlite-simple
    (error "near \"on\": syntax error")

If I try to get the ELisp backtrace from ert with "b", Emacs crashes
with the below rather unhelpful backtrace. Any ideas for how to debug
further from here are welcome.

Thread 2 received signal SIGABRT, Aborted.
0x00007fff6d8a3b66 in ?? () from /usr/lib/system/libsystem_kernel.dylib
(gdb) bt
#0  0x00007fff6d8a3b66 in ?? () from /usr/lib/system/libsystem_kernel.dylib
#1  0x00007fff6da6e080 in pthread_kill () from
/usr/lib/system/libsystem_pthread.dylib
#2  0x00007fff6d7ff24d in __abort () from /usr/lib/system/libsystem_c.dylib
#3  0x0032000000000015 in ?? ()
#4  0x0000000000000000 in ?? ()

Lisp Backtrace:
"prin1" (0x6a00830)
0x70faa28 PVEC_COMPILED
"apply" (0x6a007e8)
0x5e4acb0 PVEC_COMPILED
0x5db99d0 PVEC_COMPILED
"apply" (0x6a00740)
0x5e4a198 PVEC_COMPILED
"apply" (0x6a006a0)
"cl-print-object" (0x6a00650)
0x70fac48 PVEC_COMPILED
"apply" (0x6a005f8)
0x5e4ac00 PVEC_COMPILED
0x5db99d0 PVEC_COMPILED
"apply" (0x6a00550)
0x5e4abb0 PVEC_COMPILED
"apply" (0x6a004b0)
"cl-print-object" (0x6a00460)
"cl-prin1" (0x6a00410)
"backtrace--print" (0x6a003b0)
"cl-print-to-string-with-limit" (0x6a00338)
"backtrace--print-to-string" (0x6a00298)
"backtrace--print-func-and-args" (0x6a00200)
"backtrace-print-frame" (0x6a00198)
"backtrace-print" (0x6a00110)
"ert-results-pop-to-backtrace-for-test-at-point" (0xefbfd420)
"funcall-interactively" (0xefbfd418)
"call-interactively" (0x6a00060)
"command-execute" (0xefbfeae0)
(gdb) bt full
#0  0x00007fff6d8a3b66 in ?? () from /usr/lib/system/libsystem_kernel.dylib
No symbol table info available.
#1  0x00007fff6da6e080 in pthread_kill () from
/usr/lib/system/libsystem_pthread.dylib
No symbol table info available.
#2  0x00007fff6d7ff24d in __abort () from /usr/lib/system/libsystem_c.dylib
No symbol table info available.
#3  0x0032000000000015 in ?? ()
No symbol table info available.
#4  0x0000000000000000 in ?? ()
No symbol table info available.
[New Thread 0x5117 of process 5165]

Lisp Backtrace:
"prin1" (0x6a00830)
0x70faa28 PVEC_COMPILED
"apply" (0x6a007e8)
0x5e4acb0 PVEC_COMPILED
0x5db99d0 PVEC_COMPILED
"apply" (0x6a00740)
0x5e4a198 PVEC_COMPILED
"apply" (0x6a006a0)
"cl-print-object" (0x6a00650)
0x70fac48 PVEC_COMPILED
"apply" (0x6a005f8)
0x5e4ac00 PVEC_COMPILED
0x5db99d0 PVEC_COMPILED
"apply" (0x6a00550)
0x5e4abb0 PVEC_COMPILED
"apply" (0x6a004b0)
"cl-print-object" (0x6a00460)
"cl-prin1" (0x6a00410)
"backtrace--print" (0x6a003b0)
"cl-print-to-string-with-limit" (0x6a00338)
"backtrace--print-to-string" (0x6a00298)
"backtrace--print-func-and-args" (0x6a00200)
"backtrace-print-frame" (0x6a00198)
"backtrace-print" (0x6a00110)
"ert-results-pop-to-backtrace-for-test-at-point" (0xefbfd420)
"funcall-interactively" (0xefbfd418)
"call-interactively" (0x6a00060)
"command-execute" (0xefbfeae0)
(gdb)

In GNU Emacs 29.0.50 (build 1, x86_64-apple-darwin17.7.0, NS
 appkit-1561.61 Version 10.13.6 (Build 17G14042)) of 2022-10-04 built on
 SK-MacBook-Pro
Repository revision: 0f1aabcbaa3d50b81bea7bedaa33c9351644c130
Repository branch: master
Windowing system distributor 'Apple', version 10.3.1561
System Description:  Mac OS X 10.13.6

Configured using:
 'configure --enable-checking=yes,glyphs --enable-check-lisp-object-type
 'CFLAGS=-O0 -g3''

Configured features:
ACL GIF GLIB GMP GNUTLS JPEG JSON LCMS2 LIBXML2 MODULES NOTIFY KQUEUE NS
PDUMPER PNG RSVG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP XIM ZLIB