emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bootstrap error


From: Alexander Klimov
Subject: Re: bootstrap error
Date: Thu, 26 Jan 2006 12:21:01 +0200 (IST)

On Wed, 25 Jan 2006, Eli Zaretskii wrote:
> > ./temacs --batch --load loadup bootstrap
> > Loading loadup.el (source)...
> > [...]
> > Loading language/utf-8-lang (source)...
> > Loading language/georgian (source)...
> > Loading international/ucs-tables (source)...
> > mv -f emacs.exe bootstrap-emacs.exe
> > mv: cannot stat `emacs.exe': No such file or directory
> > make: *** [bootstrap-emacs.exe] Error 1
>
> ??? Is this the exact and full fragment of what you see?  Did the
> build indeed try to "mv -f emacs.exe" right after loading
> ucs-tables/el?

Yes, that is way I guessed that it is the same problem as with
indian.el.

> it looks like Emacs died in the middle of loadup--is that true?

Yes and the newest file in the src directory is temacs.exe (that is
there is no core dump).

> > May be it is related to the `indian.el' bug problem you are working at...
> If it is, then try resyncing with the CVS, because that problem is
> already solved there.

I always update it and ChangeLog has your 2006-01-20 record.

I made the following experiments: in loadup.el I commented out

;;(load "international/ucs-tables")

and temacs starts to silently die at font-lock

;;(update-coding-systems-internal)

same result (font-lock)

;;(load "font-lock")

and it goes to

Loading mouse (source)...
mv -f emacs.exe bootstrap-emacs.exe

removing mouse

      ;;(load "mouse")
and

Loading language/georgian (source)...
Loading indent (source)...
Loading window (source)...
Loading frame (source)...
Loading term/tty-colors (source)...
Loading font-core (source)...
Loading facemenu (source)...
Loading emacs-lisp/syntax (source)...
Loading jit-lock (source)...
Loading scroll-bar (source)...
mv -f emacs.exe bootstrap-emacs.exe
mv: cannot stat `emacs.exe': No such file or directory
make: *** [bootstrap-emacs.exe] Error 1

I tried to use gdb:

$ gdb ./temacs.exe
GNU gdb 6.3.50_2004-12-28-cvs (cygwin-special)
[...]
DISPLAY = 127.0.0.1:0.0
TERM = xterm
.gdbinit:784: Error in sourced command file:
Cannot access memory at address 0x20000004
(gdb) run --batch --load loadup bootstrap
[...]
Loading language/georgian (source)...
Loading international/ucs-tables (source)...
Program received signal SIGSEGV, Segmentation fault.
0x610f285f in done () from /usr/bin/cygwin1.dll
(gdb) where
#0  0x610f285f in done () from /usr/bin/cygwin1.dll
#1  0x20ac0000 in bss_sbrk_buffer ()
#2  0x610db690 in _vfprintf_r () from /usr/bin/cygwin1.dll
#3  0x610deb48 in vfprintf () from /usr/bin/cygwin1.dll
#4  0x610e81a5 in printf () from /usr/bin/cygwin1.dll
#5  0x6108dd7f in _sigfe () from /usr/bin/cygwin1.dll
#6  0x007e9f20 in ?? ()
#7  0x00040000 in ?? ()
#8  0x20aa0000 in bss_sbrk_buffer ()
#9  0x00040000 in ?? ()
#10 0x000343c8 in ?? ()
#11 0x2014bab1 in obtain (address=0x202999cc, size=548143104) at
ralloc.c:315
#12 0x2014bab1 in obtain (address=0x202999cc, size=548012032) at
ralloc.c:315
#13 0x2014c7ac in r_alloc_sbrk (size=135168) at ralloc.c:840
#14 0x2014a63b in align (size=3084) at gmalloc.c:461
#15 0x2014b167 in _malloc_internal (size=4096) at gmalloc.c:588
#16 0x2014b1e1 in _malloc_internal (size=1024) at gmalloc.c:763
#17 0x6105340c in malloc () from /usr/bin/cygwin1.dll
#18 0x00000400 in ?? ()
#19 0x00000000 in ?? () from
Lisp Backtrace:
"make-char-table"
"let"
"make-translation-table"
"set"
"let*"
"while"
"let"
"catch"
"cl-block-wrapper"
"block"
"dolist"
"let"
"eval-buffer"
"let"
"unwind-protect"
"let*"
"if"
"load-with-code-conversion"
"load"
"load"

548 Megs seems too large so I take a look on #11:

#11 0x2014bab1 in obtain (address=0x202999cc, size=548143104) at ralloc.c:315
315           if ((*real_morecore) (get) != last_heap->end)
(gdb) p get
$2 = 548143104
(gdb) p last_heap->end
$3 = 0x20ac0000
(gdb) p real_morecore
$5 = (POINTER (*)()) 0x2014b840 <__default_morecore>
(gdb) up
#12 0x2014bab1 in obtain (address=0x202999cc, size=548012032) at
ralloc.c:315
315           if ((*real_morecore) (get) != last_heap->end)
[...]
(gdb) up
#13 0x2014c7ac in r_alloc_sbrk (size=135168) at ralloc.c:840
840               if (! obtain (address, get))
(gdb) p get
$8 = 327680
(gdb) p address
$9 = 0x20aa0000

Something is wrong with this: #13 calls obtain(0x20aa0000,327680) but
#12 is in obtain(0x202999cc,548012032)

I inserted to r_alloc_sbrk

  get += extra_bytes + page_size;
+ static unsigned cnt = 0;
+ fprintf(stderr, "* not found (%d), obtain more space: %d\n", ++cnt, get);
  if (! obtain (address, get))
    return 0;
+ fprintf(stderr, "* OK\n");

and get the following:

Loading language/thai (source)...
Loading language/tibetan (source)...
* not found (16), obtain more space: 327680
* OK
Loading language/vietnamese (source)...
Loading language/misc-lang (source)...
Loading language/utf-8-lang (source)...
Loading language/georgian (source)...
Loading international/ucs-tables (source)...
* not found (17), obtain more space: 327680
* not found (18), obtain more space: 327680
* not found (19), obtain more space: 327680
[...]
* not found (277), obtain more space: 327680
* not found (278), obtain more space: 327680
mv -f emacs.exe bootstrap-emacs.exe

Note that there is no real shortage of memory -- the first time there
is no `* OK' temacs uses only 13 Mb (accorting to task manager), and
there are another ~300 Mb free. Another observation is that even if
obtain does not return anything the memory usage in task manager
increases after each call (up to 16 Mb after `not found' number 278,
that is 10 Kb on average).

I also inserted a debug print into obtain():

+ fprintf(stderr, "* obtain(%d, %d)\n", address, size);

and it is consistent with what was asked:

[...]
Loading language/tibetan (source)...
* not found (16), obtain more space: 327680
* obtain(547815424, 327680)
* OK
* obtain(548012032, 31552)
* obtain(548017880, 24)
Loading language/vietnamese (source)...
* obtain(548018120, 24)
Loading language/misc-lang (source)...
* obtain(548018120, 24)
Loading language/utf-8-lang (source)...
* obtain(548018120, 24)
Loading language/georgian (source)...
* obtain(548018120, 24)
Loading international/ucs-tables (source)...
* not found (17), obtain more space: 327680
* obtain(548012032, 327680)
* not found (18), obtain more space: 327680
* obtain(548012032, 327680)
[...]

so the backtrace was screwed up.

I made yet another experiment -- add printout to each return in
obtain() to check what is the reason of no `* OK' and it looks like
obtain just not return at all. This is what I added:

obtain (address, size)
[...]
+ fprintf(stderr, "* obtain(%d, %d), heap = %d\n", address, size, heap);
  if (! heap)
    abort ();
[...]
  if ((*real_morecore) ((char *) bloc_start - (char *) new) != new){
+   fprintf(stderr, "* cannot make a new heap: %d - %d\n", bloc_start, new);
    return 0;
  }
[...]
  if ((*real_morecore) (get) != last_heap->end){
+    fprintf(stderr, "* cannot get some extra %d\n", get);
     return 0;
+ }
[...]
+ fprintf(stderr, "* obtain() returns %d\n", address);
  return address;

and this is what I get:

Loading language/tibetan (source)...
* not found (16), obtain more space: 327680
* obtain(547815424, 327680), heap = 539798416
* obtain() returns 547815424
* OK
* obtain(548012032, 31552), heap = 539798416
* obtain() returns 548012032
* obtain(548017880, 24), heap = 539798416
* obtain() returns 548017880
Loading language/vietnamese (source)...
* obtain(548018120, 24), heap = 539798416
* obtain() returns 548018120
Loading language/misc-lang (source)...
* obtain(548018120, 24), heap = 539798416
* obtain() returns 548018120
Loading language/utf-8-lang (source)...
* obtain(548018120, 24), heap = 539798416
* obtain() returns 548018120
Loading language/georgian (source)...
* obtain(548018120, 24), heap = 539798416
* obtain() returns 548018120
Loading international/ucs-tables (source)...
* not found (17), obtain more space: 327680
* obtain(548012032, 327680), heap = 539798416
* not found (18), obtain more space: 327680
* obtain(548012032, 327680), heap = 539798416
[...]
* not found (277), obtain more space: 327680
* obtain(548012032, 327680), heap = 539798416
* not found (278), obtain more space: 327680
* obtain(548012032, 327680), heap = 539798416
mv -f emacs.exe bootstrap-emacs.exe
mv: cannot stat `emacs.exe': No such file or directory
make: *** [bootstrap-emacs.exe] Error 1

Any ideas? BTW, this host has cygwin1.dll 1.5.19-4 (build date
2006-01-20 13:28), gcc 3.4.4, and Win2K.

-- 
Regards,
ASK




reply via email to

[Prev in Thread] Current Thread [Next in Thread]