* bug#13759: 24.3.50; bootstrap failed; bootstrap-emacs segfaults @ 2013-02-19 0:06 Katsumi Yamaoka 2013-02-20 5:12 ` Daniel Colascione 0 siblings, 1 reply; 7+ messages in thread From: Katsumi Yamaoka @ 2013-02-19 0:06 UTC (permalink / raw To: 13759 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@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. ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#13759: 24.3.50; bootstrap failed; bootstrap-emacs segfaults 2013-02-19 0:06 bug#13759: 24.3.50; bootstrap failed; bootstrap-emacs segfaults Katsumi Yamaoka @ 2013-02-20 5:12 ` Daniel Colascione 2013-02-20 5:57 ` Daniel Colascione 0 siblings, 1 reply; 7+ messages in thread From: Daniel Colascione @ 2013-02-20 5:12 UTC (permalink / raw To: Katsumi Yamaoka; +Cc: 13759 [-- Attachment #1: Type: text/plain, Size: 3303 bytes --] 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. [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 260 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#13759: 24.3.50; bootstrap failed; bootstrap-emacs segfaults 2013-02-20 5:12 ` Daniel Colascione @ 2013-02-20 5:57 ` Daniel Colascione 2013-02-20 10:19 ` Katsumi Yamaoka 0 siblings, 1 reply; 7+ messages in thread From: Daniel Colascione @ 2013-02-20 5:57 UTC (permalink / raw To: Katsumi Yamaoka; +Cc: 13759 [-- Attachment #1: Type: text/plain, Size: 1910 bytes --] 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@dancol.org> branch nick: cyg timestamp: Tue 2013-02-19 21:43:53 -0800 message: 2013-02-19 Daniel Colascione <dancol@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@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@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); } [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 260 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#13759: 24.3.50; bootstrap failed; bootstrap-emacs segfaults 2013-02-20 5:57 ` Daniel Colascione @ 2013-02-20 10:19 ` Katsumi Yamaoka 2013-02-20 23:37 ` Katsumi Yamaoka 0 siblings, 1 reply; 7+ messages in thread From: Katsumi Yamaoka @ 2013-02-20 10:19 UTC (permalink / raw To: Daniel Colascione; +Cc: 13759-done 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. ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#13759: 24.3.50; bootstrap failed; bootstrap-emacs segfaults 2013-02-20 10:19 ` Katsumi Yamaoka @ 2013-02-20 23:37 ` Katsumi Yamaoka 2013-02-21 2:39 ` Ken Brown 0 siblings, 1 reply; 7+ messages in thread From: Katsumi Yamaoka @ 2013-02-20 23:37 UTC (permalink / raw To: Stefan Monnier; +Cc: 13759 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. ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#13759: 24.3.50; bootstrap failed; bootstrap-emacs segfaults 2013-02-20 23:37 ` Katsumi Yamaoka @ 2013-02-21 2:39 ` Ken Brown 2013-02-21 5:01 ` Katsumi Yamaoka 0 siblings, 1 reply; 7+ messages in thread From: Ken Brown @ 2013-02-21 2:39 UTC (permalink / raw To: Katsumi Yamaoka; +Cc: 13759 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#13759: 24.3.50; bootstrap failed; bootstrap-emacs segfaults 2013-02-21 2:39 ` Ken Brown @ 2013-02-21 5:01 ` Katsumi Yamaoka 0 siblings, 0 replies; 7+ messages in thread From: Katsumi Yamaoka @ 2013-02-21 5:01 UTC (permalink / raw To: kbrown; +Cc: 13759 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. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-02-21 5:01 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-02-19 0:06 bug#13759: 24.3.50; bootstrap failed; bootstrap-emacs segfaults Katsumi Yamaoka 2013-02-20 5:12 ` Daniel Colascione 2013-02-20 5:57 ` Daniel Colascione 2013-02-20 10:19 ` Katsumi Yamaoka 2013-02-20 23:37 ` Katsumi Yamaoka 2013-02-21 2:39 ` Ken Brown 2013-02-21 5:01 ` Katsumi Yamaoka
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.