Subject: Random crashes during garbage collection

From: Juanma Barranquero <[email-masked]>
Date: Thu, 26 Aug 2010 14:56:48 +0200

Version: 24.0.50
Package: emacs,w32

This is a compilation of the trunk, configured with --no-opt, on
Windows, built with the Twilight Dragon Media release of MinGW:

C:\...\src> gcc.exe  --version
gcc.exe (TDM-2 mingw32) 4.4.1-dw2

I update from the trunk, recompile with

cd lisp
make update-subdirs
make cvs-update
make install

and I get random crashes during garbage collection (two examples
follow). It has not happened so far with an optimized build from the
same sources.

I cannot repeat the crash at will, so this is just for informational purposes.

    Juanma

Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 2140.0xc7c]
0x762322a2 in KERNELBASE!DeleteAce () from C:\Windows\syswow64\KernelBase.dll
(gdb) bt
#0  0x762322a2 in KERNELBASE!DeleteAce () from
C:\Windows\syswow64\KernelBase.dll
#1  0x0131eae3 in w32_abort () at w32fns.c:7237
#2  0x012cad19 in relinquish () at ralloc.c:343
#3  0x012cb8c9 in r_alloc_sbrk (size=-372736) at ralloc.c:885
#4  0x011035b3 in _free_internal_nolock (ptr=0x34e2000) at gmalloc.c:1261
#5  0x0110393d in _free_internal (ptr=0x34e2000) at gmalloc.c:1354
#6  0x0110396b in e_free (ptr=0x34e2000) at gmalloc.c:1369
#7  0x01041c2f in emacs_blocked_free (ptr=0x34e2000, ptr2=0x33edd00)
at alloc.c:1178
#8  0x0110395e in e_free (ptr=0x34e2000) at gmalloc.c:1367
#9  0x0104162c in lisp_free (block=0x34e2000) at alloc.c:865
#10 0x0104285c in compact_small_strings () at alloc.c:2218
#11 0x01042677 in sweep_strings () at alloc.c:2098
#12 0x01049594 in gc_sweep () at alloc.c:5703
#13 0x01047885 in Fgarbage_collect () at alloc.c:5060
[...etc...]

Lisp Backtrace:
"require" (0x88a654)
"read-kbd-macro" (0x88add4)
0x1344f5d PVEC_COMPILED
0x133848d PVEC_SUBR
"macroexpand" (0x88b4c8)
"byte-optimize-form-code-walker" (0x88b784)
"byte-optimize-form" (0x88ba4c)
"mapcar" (0x88bbe4)
"byte-optimize-form-code-walker" (0x88bea4)
"byte-optimize-form" (0x88c164)
"byte-optimize-body" (0x88c424)
"byte-optimize-form-code-walker" (0x88c6e4)
"byte-optimize-form" (0x88c9ac)
"byte-optimize-form-code-walker" (0x88cc64)
"byte-optimize-form" (0x88cf24)
"byte-optimize-form-code-walker" (0x88d1e4)
"byte-optimize-form" (0x88d4a4)
"byte-compile-top-level" (0x88d764)
"byte-compile-lambda" (0x88da24)
"byte-compile-file-form-defmumble" (0x88dce4)
"byte-compile-file-form-defun" (0x88df94)
"byte-compile-file-form" (0x88e244)
0x2f3b705 PVEC_COMPILED
"funcall" (0x88e500)
"byte-compile-from-buffer" (0x88e994)
"byte-compile-file" (0x88ebb0)
"batch-byte-compile-file" (0x88f094)
"batch-byte-compile" (0x88f354)
"command-line-1" (0x88f624)
"command-line" (0x88f8e4)
"normal-top-level" (0x88fb00)
(gdb)

Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 2852.0x428]
0x762322a2 in KERNELBASE!DeleteAce () from C:\Windows\syswow64\KernelBase.dll
(gdb) bt
#0  0x762322a2 in KERNELBASE!DeleteAce () from
C:\Windows\syswow64\KernelBase.dll
#1  0x0131eae3 in w32_abort () at w32fns.c:7237
#2  0x012cad19 in relinquish () at ralloc.c:343
#3  0x012cb8c9 in r_alloc_sbrk (size=-450560) at ralloc.c:885
#4  0x011035b3 in _free_internal_nolock (ptr=0x348e000) at gmalloc.c:1261
#5  0x0110393d in _free_internal (ptr=0x348e000) at gmalloc.c:1354
#6  0x0110396b in e_free (ptr=0x348e000) at gmalloc.c:1369
#7  0x01041c2f in emacs_blocked_free (ptr=0x348e000, ptr2=0x2edcc08)
at alloc.c:1178
#8  0x0110395e in e_free (ptr=0x348e000) at gmalloc.c:1367
#9  0x0104162c in lisp_free (block=0x348e000) at alloc.c:865
#10 0x01049f84 in gc_sweep () at alloc.c:6042
#11 0x01047885 in Fgarbage_collect () at alloc.c:5060
[...etc...]

Lisp Backtrace:
"eval-buffer" (0x88e104)
"load-with-code-conversion" (0x88e3d0)
"load" (0x88ea14)
"byte-code" (0x88ec24)
"load" (0x88f354)
"command-line-1" (0x88f624)
"command-line" (0x88f8e4)
"normal-top-level" (0x88fb00)
(gdb)