GNU bug report logs -
#13759
24.3.50; bootstrap failed; bootstrap-emacs segfaults
Previous Next
Reported by: Katsumi Yamaoka <yamaoka <at> jpl.org>
Date: Tue, 19 Feb 2013 16:21:02 UTC
Severity: normal
Found in version 24.3.50
Done: Katsumi Yamaoka <yamaoka <at> jpl.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 13759 in the body.
You can then email your comments to 13759 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13759
; Package
emacs
.
(Tue, 19 Feb 2013 16:21:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Katsumi Yamaoka <yamaoka <at> jpl.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 19 Feb 2013 16:21:04 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
In GNU Emacs 24.3.50.1 (i686-pc-cygwin, X toolkit, Xaw3d scroll bars)
of 2013-02-15 on localhost
(Bzr revision: 111784 jan.h.d <at> swipnet.se-20130214190112-35htkvic2zp1bwr2)
Windowing system distributor `The Cygwin/X Project', version 11.0.11302000
Configured using:
`configure --verbose --with-x-toolkit=lucid --without-imagemagick
--without-dbus --without-gconf --without-gsettings'
Can't build Emacs trunk on Cygwin (daily updated) on Windows 7:
[...]
Static heap usage: 9541024 of 13631488 bytes
43466 pure bytes used
cd ../lisp; make -w compile-first EMACS=/Work/emacs/src/bootstrap-emacs.exe
make[3]: Entering directory `/Work/emacs/lisp'
Compiling /Work/emacs/lisp/emacs-lisp/macroexp.el
Fatal error 11: Segmentation faultMakefile:243:\
recipe for target `/Work/emacs/lisp/emacs-lisp/macroexp.elc' failed
Here's a backtrace:
% gdb src/bootstrap-emacs.exe
GNU gdb (GDB) 7.5.50.20120815-cvs (cygwin-special)
[...]
Reading symbols from /Work/emacs/src/bootstrap-emacs.exe...done.
(gdb) r
Starting program: /Work/emacs/src/bootstrap-emacs.exe
[New Thread 9364.0x1a3c]
[New Thread 9364.0x1d18]
Program received signal SIGSEGV, Segmentation fault.
mmap_alloc (var=0xf26d18, nbytes=15273) at buffer.c:4906
4906 r->next->prev = r;
(gdb) bt
#0 mmap_alloc (var=0xf26d18, nbytes=15273) at buffer.c:4906
#1 0x004d07b9 in mmap_realloc (nbytes=15273, var=0xf26d18) at buffer.c:4945
#2 enlarge_buffer_text (b=0xf26c00, delta=0) at buffer.c:5053
#3 0x004d1e16 in init_buffer () at buffer.c:5301
#4 0x004af6dd in main (argc=1, argv=0x22ac40) at emacs.c:1305
(gdb)
Is any other information required? Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13759
; Package
emacs
.
(Wed, 20 Feb 2013 05:14:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 13759 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 2/18/2013 4:06 PM, Katsumi Yamaoka wrote:
> Program received signal SIGSEGV, Segmentation fault.
> mmap_alloc (var=0xf26d18, nbytes=15273) at buffer.c:4906
> 4906 r->next->prev = r;
> (gdb) bt
> #0 mmap_alloc (var=0xf26d18, nbytes=15273) at buffer.c:4906
> #1 0x004d07b9 in mmap_realloc (nbytes=15273, var=0xf26d18) at buffer.c:4945
> #2 enlarge_buffer_text (b=0xf26c00, delta=0) at buffer.c:5053
> #3 0x004d1e16 in init_buffer () at buffer.c:5301
> #4 0x004af6dd in main (argc=1, argv=0x22ac40) at emacs.c:1305
> (gdb)
>
> Is any other information required? Thanks.
The problem is that mmap_regions, the head of a linked list of memory
allocations we've made for buffers, is non-NULL in the dumped Emacs, but
obviously points to garbage that was valid only before Emacs was dumped. The
call to mmap_set_vars in Fdump_emacs is supposed to zero these variables before
we dump Emacs, but mmap_regions becomes non-NULL inside Fdump_emacs:
gdb) where
#0 mmap_alloc (var=0x7ca918, nbytes=6389) at buffer.c:4909
#1 0x004b0039 in mmap_realloc (nbytes=6389, var=0x7ca918) at buffer.c:4945
#2 enlarge_buffer_text (b=0x7ca800, delta=0) at buffer.c:5053
#3 0x004b0148 in set_buffer_internal_1 (b=0x7ca800) at buffer.c:2104
#4 0x004b068b in set_buffer_internal (b=<optimized out>) at buffer.h:1090
#5 Fset_buffer (buffer_or_name=8169477) at buffer.c:2195
#6 0x0041e47c in message_dolog (m=0x287110 "Static heap usage: 11072128 of
13631488 bytes\rC", nbytes=45, nlflag=true,
multibyte=false) at xdisp.c:9389
#7 0x00430d50 in message3 (m=17698433) at xdisp.c:9598
#8 0x0054da7e in report_sheap_usage (die_if_pure_storage_exceeded=1) at sheap.c:94
#9 0x0052ec2a in unexec (outfile=0x121f934 "/users/dancol/edev/cyg/src/emacs",
infile=0x121f968 "/users/dancol/edev/cyg/src/temacs")
at unexcw.c:287
#10 0x0048de13 in Fdump_emacs (filename=17698561, symfile=17698449) at emacs.c:2056
#11 0x004fb913 in eval_sub (form=11000526) at eval.c:2043
#12 0x004fbc8e in Fprogn (args=11000262) at eval.c:359
#13 0x004fba80 in eval_sub (form=10618670) at eval.c:1988
#14 0x004fba80 in eval_sub (form=10273462) at eval.c:1988
#15 0x0051cbd6 in readevalloop (readcharfun=10344786, stream=0x7ca60c,
sourcename=10459185, printflag=false, unibyte=10283034,
readfun=10283034, start=10283034, end=10283034) at lread.c:1855
#16 0x0051d8c4 in Fload (file=10400673, noerror=10283034, nomessage=10283034,
nosuffix=10283034, must_suffix=10283034) at lread.c:1326
#17 0x004fb8b9 in eval_sub (form=10268918) at eval.c:2054
#18 0x004fd8b2 in Feval (form=10268918, lexical=10283034) at eval.c:1902
#19 0x0049240c in top_level_2 () at keyboard.c:1182
#20 0x004faac4 in internal_condition_case (bfun=0x4923f0 <top_level_2>,
handlers=10325114, hfun=0x493c90 <cmd_error>) at eval.c:1193
#21 0x00492c30 in top_level_1 (ignore=10283034) at keyboard.c:1190
#22 0x004fa9ea in internal_catch (tag=10314994, func=0x492bd0 <top_level_1>,
arg=10283034) at eval.c:964
#23 0x004937a8 in command_loop () at keyboard.c:1151
#24 recursive_edit_1 () at keyboard.c:785
#25 0x00493ab1 in Frecursive_edit () at keyboard.c:849
#26 0x0048f662 in main (argc=<optimized out>, argv=0x28ac20) at emacs.c:1556
I don't know why we suddenly started seeing this behavior.
[signature.asc (application/pgp-signature, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13759
; Package
emacs
.
(Wed, 20 Feb 2013 05:59:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 13759 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 2/19/2013 9:12 PM, Daniel Colascione wrote:
> I don't know why we suddenly started seeing this behavior.
Revision 111820, "Prefer `message1' over `message'.", caused us to start calling
message1 instead of message in sheap.c. message1 ends up calling message_dolog,
which tries to allocate a *Messages* buffer. Maybe Fdump_emacs should bind
Vmessage_max_log?
Anyway, I've installed the following patch to trunk, which fixes the problem. If
we want to go back to using message1, let's somehow make sure it doesn't log.
revno: 111830
committer: Daniel Colascione <dancol <at> dancol.org>
branch nick: cyg
timestamp: Tue 2013-02-19 21:43:53 -0800
message:
2013-02-19 Daniel Colascione <dancol <at> dancol.org>
* sheap.c (report_sheap_usage): Use message, not message1, so
that we don't try to create a buffer while we're in the middle
of dumping Emacs. Explain why.
diff:
=== modified file 'src/ChangeLog'
--- src/ChangeLog 2013-02-19 03:29:28 +0000
+++ src/ChangeLog 2013-02-20 05:43:53 +0000
@@ -1,3 +1,9 @@
+2013-02-19 Daniel Colascione <dancol <at> dancol.org>
+
+ * sheap.c (report_sheap_usage): Use message, not message1, so
+ that we don't try to create a buffer while we're in the middle
+ of dumping Emacs. Explain why.
+
2013-02-19 Eli Zaretskii <eliz <at> gnu.org>
* w32proc.c (new_child): Avoid leaking handles if the subprocess
=== modified file 'src/sheap.c'
--- src/sheap.c 2013-02-17 16:49:27 +0000
+++ src/sheap.c 2013-02-20 05:43:53 +0000
@@ -91,5 +91,8 @@
char buf[200];
sprintf (buf, "Static heap usage: %d of %d bytes",
bss_sbrk_ptr - bss_sbrk_buffer, STATIC_HEAP_SIZE);
- message1 (buf);
+ /* Don't change this call to message1! message1 can log
+ messages, and at this point, we're not allowed to create
+ buffers. */
+ message ("%s", buf);
}
[signature.asc (application/pgp-signature, attachment)]
Reply sent
to
Katsumi Yamaoka <yamaoka <at> jpl.org>
:
You have taken responsibility.
(Wed, 20 Feb 2013 10:21:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Katsumi Yamaoka <yamaoka <at> jpl.org>
:
bug acknowledged by developer.
(Wed, 20 Feb 2013 10:21:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 13759-done <at> debbugs.gnu.org (full text, mbox):
Daniel Colascione wrote:
[...]
> Anyway, I've installed the following patch to trunk, which
> fixes the problem. If we want to go back to using message1,
> let's somehow make sure it doesn't log.
Thanks a lot! It enables me to play with ELisp again.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13759
; Package
emacs
.
(Wed, 20 Feb 2013 23:39:03 GMT)
Full text and
rfc822 format available.
Message #19 received at 13759 <at> debbugs.gnu.org (full text, mbox):
Katsumi Yamaoka wrote:
> Daniel Colascione wrote:
> [...]
>> Anyway, I've installed the following patch to trunk, which
>> fixes the problem. If we want to go back to using message1,
>> let's somehow make sure it doesn't log.
> Thanks a lot! It enables me to play with ELisp again.
Stefan Monnier wrote:
> + * sheap.c (report_sheap_usage): Prefer message1_nolog.
Bootstrap fails again on Cygwin/Windows7:
[...]
gcc -std=gnu99 -c -Demacs -I. -I/Work/emacs/src -I../lib\
-I/Work/emacs/src/../lib -I/usr/include/freetype2 -D_REENTRANT\
-I/usr/include/librsvg-2.0 -I/usr/include/glib-2.0\
-I/usr/lib/glib-2.0/include -I/usr/include/gdk-pixbuf-2.0\
-I/usr/include/cairo -I/usr/include/libpng15 -I/usr/include/pixman-1\
-I/usr/include/freetype2 -I/usr/include/libxml2 -I/usr/include/freetype2\
-MMD -MF deps/sheap.d -MP -I/usr/include/p11-kit-1 -g3 -O2 sheap.c
sheap.c: In function 'report_sheap_usage':
sheap.c:96:3: error: too many arguments to function 'message1_nolog'
What additional info should I provide? Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13759
; Package
emacs
.
(Thu, 21 Feb 2013 02:41:01 GMT)
Full text and
rfc822 format available.
Message #22 received at 13759 <at> debbugs.gnu.org (full text, mbox):
On 2/20/2013 6:37 PM, Katsumi Yamaoka wrote:
> Stefan Monnier wrote:
>> + * sheap.c (report_sheap_usage): Prefer message1_nolog.
>
> Bootstrap fails again on Cygwin/Windows7:
>
> [...]
> gcc -std=gnu99 -c -Demacs -I. -I/Work/emacs/src -I../lib\
> -I/Work/emacs/src/../lib -I/usr/include/freetype2 -D_REENTRANT\
> -I/usr/include/librsvg-2.0 -I/usr/include/glib-2.0\
> -I/usr/lib/glib-2.0/include -I/usr/include/gdk-pixbuf-2.0\
> -I/usr/include/cairo -I/usr/include/libpng15 -I/usr/include/pixman-1\
> -I/usr/include/freetype2 -I/usr/include/libxml2 -I/usr/include/freetype2\
> -MMD -MF deps/sheap.d -MP -I/usr/include/p11-kit-1 -g3 -O2 sheap.c
> sheap.c: In function 'report_sheap_usage':
> sheap.c:96:3: error: too many arguments to function 'message1_nolog'
I've fixed this in bzr revision 111839.
Ken
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13759
; Package
emacs
.
(Thu, 21 Feb 2013 05:03:01 GMT)
Full text and
rfc822 format available.
Message #25 received at 13759 <at> debbugs.gnu.org (full text, mbox):
Ken Brown wrote:
> On 2/20/2013 6:37 PM, Katsumi Yamaoka wrote:
>> Stefan Monnier wrote:
>>> + * sheap.c (report_sheap_usage): Prefer message1_nolog.
>>
>> Bootstrap fails again on Cygwin/Windows7:
>>
>> [...]
>> gcc -std=gnu99 -c -Demacs -I. -I/Work/emacs/src -I../lib\
>> -I/Work/emacs/src/../lib -I/usr/include/freetype2 -D_REENTRANT\
>> -I/usr/include/librsvg-2.0 -I/usr/include/glib-2.0\
>> -I/usr/lib/glib-2.0/include -I/usr/include/gdk-pixbuf-2.0\
>> -I/usr/include/cairo -I/usr/include/libpng15 -I/usr/include/pixman-1\
>> -I/usr/include/freetype2 -I/usr/include/libxml2 -I/usr/include/freetype2\
>> -MMD -MF deps/sheap.d -MP -I/usr/include/p11-kit-1 -g3 -O2 sheap.c
>> sheap.c: In function 'report_sheap_usage':
>> sheap.c:96:3: error: too many arguments to function 'message1_nolog'
> I've fixed this in bzr revision 111839.
Confirmed. Thank you so much.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 21 Mar 2013 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 12 years and 94 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.