gcl-devel
[Top][All Lists]
Advanced

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

[Gcl-devel] Windows - Start again.


From: Mike Thomas
Subject: [Gcl-devel] Windows - Start again.
Date: Mon, 29 Mar 2004 17:30:29 +1000

Hi Camm.


| Greetings, and thanks!  Unfortunately, we've had a bit of confusion
| again -- I thought we were debugging the stable branch.  What you show
| below is an error I can completely reproduce on the unstable branch,
| and so does not reveal any windows specific problem.  We changed
| no_package so that it raised a package error instead of the old
| generic error, the former of which is continuable, but without
| providing any code for the continuation.  Simple fix is to change
| no_package to return object and call and return make_package after the
| package error call.  I'll try to fix this once we put stable to bed.

OK.

|
| Just for clarity, as there are so many moving parts, perhaps we ought
| to specify in each thread the exact executable run, how it was
| produced, and an input file inhaled via (load....) that shows the
| error.  Copying and pasting in gdb can also be hard to reproduce at
| times.
|
| My apologies for the confusion.

Likewise - I appreciate your help and dislike wasting your time.

Would you prefer to continue on Stable or Head?  It looks as though stable
might be best.   Either way I had better update my build as I haven't for
the past week and we'll need to be in sync with one another if we operate in
parallel.

Note that the stable branch won't build on Windows as the randomised sbrk()
test in configure fails because there is no sbrk() on Windows.

I've left this change to you so that it works the way you want it; I believe
that the  test just needs to be bypassed on Windows unless I've
misunderstood something.

Getting back to the question of the C stack and your reminder that the
apparently garbled stack may simply be the result of gdb having trouble when
compiled object files are involved I noticed that the stack on one of
Magnus' OpenBSD emails had a similar appearance.

This led me to wonder whether this happens to you on Linux?

Today I moved to the stable branch, set a break point on GBC, loaded
"gclload.lsp", ignored the first 23 passes on GBC, typed "finish" 6 times
and got this mess:

----------------------------------------------------------------------
.....
(gdb) finish
Run till exit from #0  0x0041f7b0 in Leval () at eval.c:1171
Warning:
Cannot insert breakpoint 0.
Error accessing memory address 0x104bfe66: Input/output error.

(gdb) bt
#0  0x0041f7b0 in Leval () at eval.c:1171
#1  0x104bfe66 in ?? ()
#2  0x10b212c4 in ?? ()
#3  0x0065bfa0 in sKinvalid_form ()
#4  0x00000001 in ?? ()
#5  0x10b212f4 in ?? ()
#6  0x0000001c in ?? ()
#7  0x10b21318 in ?? ()
#8  0x0065bf40 in sKoverwrite ()
#9  0x104bf0a5 in ?? ()
#10 0x006cba20 in value_stack ()
#11 0x0065bf40 in sKoverwrite ()
#12 0x10b212e8 in ?? ()
#13 0x00430cfc in Lformat () at format.c:2194
#14 0x1010a4a4 in ?? ()
#15 0x0065bf40 in sKoverwrite ()
#16 0x10b21318 in ?? ()
#17 0x10b2130c in ?? ()
#18 0x10b21300 in ?? ()
#19 0x10b212c4 in ?? ()
#20 0x10324ea0 in ?? ()
#21 0x006c0498 in small_fixnum_table ()
#22 0x10b21324 in ?? ()
---Type <return> to continue, or q <return> to quit---q
Quit (expect signal SIGINT when the program is resumed)
(gdb) p core_end
$5 = 0x14c6c000 <Address 0x14c6c000 out of bounds>
(gdb) p heap_end
$6 = 0x10b52000 ""
(gdb) p core_end-1
$7 = 0x14c6bfff ""

----------------------------------------------------------------------

What do you think?  Feel free to dissuade me!

I'm swayed by the fact that when the ANSI build/linker bug was fixed the
stack miraculously cleaned itself up.

I see this as a neat way of zeroing in on the problem (ie proceed until the
stack looks bad).

The reason I'm considering this approach is that I can't find a way to break
into the debugger at appropriate ANSI test invocations.  For example,
breaking in "unwind" doesn't seem appropriate as it seems to be called
hundreds of times.

Perhaps we need to introduce one or two special debugging noop instructions
in SI (eg si::break1, si::break2 etc) which would allow us to put unique
lisp functions in strategic locations during debuggin sessions which allow a
clean break to the debugger?

A more complete transcript of the above stable branch debugging session are
included below.

I'm also thinking we should put a deadline on this problem; say a fortnight?
If we review the situation then and it looks like I still have a long way to
go than maybe we should put out 2.6.2.

Cheers

Mike Thomas.




======================================================================
.... elided ..
 SYMBOL-WITH-COMPILATION-UNIT SYMBOL-WITH-CONDITION-RESTARTS
 SYMBOL-WITH-HASH-TABLE-ITERATOR SYMBOL-WITH-INPUT-FROM-STRING
 SYMBOL-WITH-OPEN-FILE SYMBOL-WITH-OPEN-STREAM
 SYMBOL-WITH-OUTPUT-TO-STRING SYMBOL-WITH-PACKAGE-ITERATOR
 SYMBOL-WITH-SIMPLE-RESTART SYMBOL-WITH-SLOTS
 SYMBOL-WITH-STANDARD-IO-SYNTAX SYMBOL-WRITE SYMBOL-WRITE-BYTE
 SYMBOL-WRITE-CHAR SYMBOL-WRITE-LINE SYMBOL-WRITE-SEQUENCE
 SYMBOL-WRITE-STRING SYMBOL-WRITE-TO-STRING SYMBOL-Y-OR-N-P
 SYMBOL-YES-OR-NO-P SYMBOL-ZEROP KEYWORD-BEHAVIOR
Test SPECIAL-OPERATOR-P.1 failed
Form: (LOOP
        FOR
        S
        IN
        +SPECIAL-OPERATORS+
        UNLESS
        (SPECIAL-OPERATOR-P S)
        COLLECT
        S)
Expected value: NIL
Actual value: (LOAD-TIME-VALUE SYMBOL-MACROLET).
[GC for 108 STRING pages..(T=3).GC finished]
[GC for 108 STRING pages..(T=3).GC finished]

Breakpoint 1, GBC (t=t_string) at gbc.c:1070
1070      int tm=0;
(gdb) finish
Run till exit from #0  GBC (t=t_string) at gbc.c:1070
[GC for 108 STRING pages..(T=3).GC finished]
0x00404859 in alloc_object (t=t_string) at alloc.c:286
286             GBC(tm->tm_type);
(gdb) bt
#0  0x00404859 in alloc_object (t=t_string) at alloc.c:286
#1  0x00470e10 in alloc_simple_string (l=4) at string.d:42
#2  0x004711d1 in coerce_to_string (x=0x10117894) at string.d:170
#3  0x0047162d in Lstring_eq () at string.d:271
#4  0x0041d37a in funcall (fun=0x10115820) at eval.c:173
#5  0x0041eb25 in super_funcall (fun=0x10115820) at eval.c:743
#6  0x0041fe1a in ifuncall2 (fun=0x10115820, arg1=0x1064d270,
arg2=0x10117894)
    at eval.c:1315
#7  0x0043fb3a in test_compare (x=0x10117894) at list.d:73
#8  0x0044426a in Lmember () at list.d:1165
#9  0x0041f317 in eval (form=0x65bf40) at eval.c:1090
#10 0x00459e20 in For (args=0x105752ac) at predicate.c:752
#11 0x0041f0a7 in eval (form=0x1057530c) at eval.c:1037
#12 0x0041f29a in eval (form=0x10b22ed0) at eval.c:1077
#13 0x004196b2 in Fif (form=0x10b22eb8) at conditional.c:43
#14 0x0041f0a7 in eval (form=0x10b22ec4) at eval.c:1037
#15 0x0046054f in Ftagbody (body=0x10b22b34) at prog.c:95
#16 0x0041f0a7 in eval (form=0x10b22b10) at eval.c:1037
#17 0x0046115a in Fprogn (body=0x10b22b04) at prog.c:248
#18 0x0043e0db in FletA (form=0x10b22cd8) at let.c:110
#19 0x0041f0a7 in eval (form=0x10b22ce4) at eval.c:1037
#20 0x0046115a in Fprogn (body=0x10b22ccc) at prog.c:248
#21 0x0043df3b in Flet (form=0x10b22dbc) at let.c:82
---Type <return> to continue, or q <return> to quit---frame 11
#22 0x0041f0a7 in eval (form=0x10b22dc8) at eval.c:1037
#23 0x00414507 in Fblock (args=0x10b22da4) at block.c:58
#24 0x0041f0a7 in eval (form=0x10b22db0) at eval.c:1037
#25 0x0046115a in Fprogn (body=0x10b22d8c) at prog.c:248
#26 0x0043df3b in Flet (form=0x10575360) at let.c:82
#27 0x0041f0a7 in eval (form=0x105753a8) at eval.c:1037
#28 0x0041f811 in fLeval (x0=0x105753a8) at eval.c:1178
#29 0x00431c66 in c_apply_n (fn=0x41f7b5 <fLeval>, n=1, x=0x22e920)
    at funlink.c:271
#30 0x0044a821 in Iinvoke_c_function_from_value_stack (f=0x41f7b5 <fLeval>,
    fargd=513) at nfunlink.c:293
#31 0x0041f7b0 in Leval () at eval.c:1171
#32 0x104bfe66 in ?? ()
#33 0x10b212c4 in ?? ()
#34 0x0065bfa0 in sKinvalid_form ()
#35 0x00000001 in ?? ()
#36 0x10b212f4 in ?? ()
#37 0x0000001c in ?? ()
#38 0x10b21318 in ?? ()
#39 0x0065bf40 in sKoverwrite ()
#40 0x104bf0a5 in ?? ()
#41 0x006cba20 in value_stack ()
#42 0x0065bf40 in sKoverwrite ()
---Type <return> to continue, or q <return> to quit---
#43 0x10b212e8 in ?? ()
#44 0x00430cfc in Lformat () at format.c:2194
#45 0x1010a4a4 in ?? ()
#46 0x0065bf40 in sKoverwrite ()
#47 0x10b21318 in ?? ()
#48 0x10b2130c in ?? ()
#49 0x10b21300 in ?? ()
#50 0x10b212c4 in ?? ()
#51 0x10324ea0 in ?? ()
#52 0x006c0498 in small_fixnum_table ()
#53 0x10b21324 in ?? ()
#54 0x10b21e04 in ?? ()
#55 0x105753e4 in ?? ()
#56 0x105753a8 in ?? ()
#57 0x0065bf40 in sKoverwrite ()
#58 0x0065bf40 in sKoverwrite ()
#59 0x0065bf40 in sKoverwrite ()
#60 0x10b22d68 in ?? ()
#61 0x0065bf40 in sKoverwrite ()
#62 0x0065bf40 in sKoverwrite ()
#63 0x10b22d8c in ?? ()
#64 0x10b22d68 in ?? ()
#65 0x0065bf40 in sKoverwrite ()
---Type <return> to continue, or q <return> to quit---
#66 0x10b22d38 in ?? ()
#67 0x10b22c84 in ?? ()
#68 0x0065bf40 in sKoverwrite ()
#69 0x10b22d38 in ?? ()
#70 0x10b22ccc in ?? ()
#71 0x10b22ab0 in ?? ()
#72 0x0065bf40 in sKoverwrite ()
#73 0x10b22d38 in ?? ()
#74 0x10b22b04 in ?? ()
#75 0x1073ea78 in ?? ()
#76 0x10b22ab0 in ?? ()
#77 0x0065bf40 in sKoverwrite ()
#78 0x10b22a50 in ?? ()
#79 0x101c8f54 in ?? ()
#80 0x10b22b58 in ?? ()
#81 0x101c8f30 in ?? ()
#82 0x10b22b70 in ?? ()
#83 0x10107dd4 in ?? ()
#84 0x10115f90 in ?? ()
#85 0x1064d270 in ?? ()
#86 0x105756fc in ?? ()
#87 0x10115820 in ?? ()
#88 0x0065bf40 in sKoverwrite ()
---Type <return> to continue, or q <return> to quit---
#89 0x0065bf40 in sKoverwrite ()
#90 0x006c28f0 in sLAprint_baseA ()
#91 0x0065bf40 in sKoverwrite ()
#92 0x0065bf40 in sKoverwrite ()
#93 0x10117894 in ?? ()
#94 0x1064d270 in ?? ()
#95 0x10117894 in ?? ()
#96 0x0065bf40 in sKoverwrite ()
#97 0x0065bf40 in sKoverwrite ()
#98 0x0065bf40 in sKoverwrite ()
#99 0x0065bf40 in sKoverwrite ()
#100 0x0065bf40 in sKoverwrite ()
#101 0x0065bf40 in sKoverwrite ()
#102 0x0065bf40 in sKoverwrite ()
#103 0x0065bf40 in sKoverwrite ()
#104 0x1013c6f0 in ?? ()
(gdb) frame 11
#11 0x0041f0a7 in eval (form=0x1057530c) at eval.c:1037
1037                    (*fun->s.s_sfdef)(MMcdr(form));
(gdb) p pp(form)
(OR (MEMBER NAME +SPECIAL-OPERATORS+ TEST #'STRING=)
    (LET ((SYM (FIND-SYMBOL NAME P)))
      (OR (NOT (SPECIAL-OPERATOR-P SYM)) (MACRO-FUNCTION SYM))))$1 = void
(gdb) frame 27
#27 0x0041f0a7 in eval (form=0x105753a8) at eval.c:1037
1037                    (*fun->s.s_sfdef)(MMcdr(form));
(gdb) p pp(form)
(LET
                                                                 ((P

(FIND-PACKAGE

                                                                    CL)))
                                                                  (LOOP
                                                                    FOR
                                                                    NAME
                                                                    IN

*CL-SYMBOL-N
AMES*
                                                                    UNLESS
                                                                    (OR
                                                                     (MEMBER
                                                                      NAME

+SPECIAL-O
PERATORS+
                                                                      TEST

#'STRING=)

                                                                     (LET
                                                                      ((SYM

(FIND-SY
MBOL

NAME

P)))
                                                                       (OR
                                                                        (NOT

(SPECIA
L-OPERATOR-P

SYM))

(MACRO-F
UNCTION

SYM))))

                                                                    COLLECT
                                                                    NAME))$2
= v
oid
(gdb) bt
#0  0x00404859 in alloc_object (t=t_string) at alloc.c:286
#1  0x00470e10 in alloc_simple_string (l=4) at string.d:42
#2  0x004711d1 in coerce_to_string (x=0x10117894) at string.d:170
#3  0x0047162d in Lstring_eq () at string.d:271
#4  0x0041d37a in funcall (fun=0x10115820) at eval.c:173
#5  0x0041eb25 in super_funcall (fun=0x10115820) at eval.c:743
#6  0x0041fe1a in ifuncall2 (fun=0x10115820, arg1=0x1064d270,
arg2=0x10117894)
    at eval.c:1315
#7  0x0043fb3a in test_compare (x=0x10117894) at list.d:73
#8  0x0044426a in Lmember () at list.d:1165
#9  0x0041f317 in eval (form=0x65bf40) at eval.c:1090
#10 0x00459e20 in For (args=0x105752ac) at predicate.c:752
#11 0x0041f0a7 in eval (form=0x1057530c) at eval.c:1037
#12 0x0041f29a in eval (form=0x10b22ed0) at eval.c:1077
#13 0x004196b2 in Fif (form=0x10b22eb8) at conditional.c:43
#14 0x0041f0a7 in eval (form=0x10b22ec4) at eval.c:1037
#15 0x0046054f in Ftagbody (body=0x10b22b34) at prog.c:95
#16 0x0041f0a7 in eval (form=0x10b22b10) at eval.c:1037
#17 0x0046115a in Fprogn (body=0x10b22b04) at prog.c:248
#18 0x0043e0db in FletA (form=0x10b22cd8) at let.c:110
#19 0x0041f0a7 in eval (form=0x10b22ce4) at eval.c:1037
#20 0x0046115a in Fprogn (body=0x10b22ccc) at prog.c:248
#21 0x0043df3b in Flet (form=0x10b22dbc) at let.c:82
---Type <return> to continue, or q <return> to quit---q
Quit (expect signal SIGINT when the program is resumed)
(gdb) finish
Run till exit from #27 0x0041f0a7 in eval (form=0x105753a8) at eval.c:1037
0x0041f811 in fLeval (x0=0x105753a8) at eval.c:1178
1178            eval(x0);
(gdb) finish
Run till exit from #0  0x0041f811 in fLeval (x0=0x105753a8) at eval.c:1178
0x00431c66 in c_apply_n (fn=0x41f7b5 <fLeval>, n=1, x=0x22e920)
    at funlink.c:271
271         case 1:  res=LCAST(fn)(x[0]);break;
Value returned is $3 = 0x10b4eedc
(gdb) finish
Run till exit from #0  0x00431c66 in c_apply_n (fn=0x41f7b5 <fLeval>, n=1,
    x=0x22e920) at funlink.c:271
0x0044a821 in Iinvoke_c_function_from_value_stack (f=0x41f7b5 <fLeval>,
    fargd=513) at nfunlink.c:293
293       res = c_apply_n(f,nargs,x);
Value returned is $4 = 0x10b4eedc
(gdb) finish
Run till exit from #0  0x0044a821 in Iinvoke_c_function_from_value_stack (
    f=0x41f7b5 <fLeval>, fargd=513) at nfunlink.c:293
0x0041f7b0 in Leval () at eval.c:1171
1171           ,1,1,NONE,OO,OO,OO,OO,void,Leval,(object x0),"")
(gdb) bt
#0  0x0041f7b0 in Leval () at eval.c:1171
#1  0x104bfe66 in ?? ()
#2  0x10b212c4 in ?? ()
#3  0x0065bfa0 in sKinvalid_form ()
#4  0x00000001 in ?? ()
#5  0x10b212f4 in ?? ()
#6  0x0000001c in ?? ()
#7  0x10b21318 in ?? ()
#8  0x0065bf40 in sKoverwrite ()
#9  0x104bf0a5 in ?? ()
#10 0x006cba20 in value_stack ()
#11 0x0065bf40 in sKoverwrite ()
#12 0x10b212e8 in ?? ()
#13 0x00430cfc in Lformat () at format.c:2194
#14 0x1010a4a4 in ?? ()
#15 0x0065bf40 in sKoverwrite ()
#16 0x10b21318 in ?? ()
#17 0x10b2130c in ?? ()
#18 0x10b21300 in ?? ()
#19 0x10b212c4 in ?? ()
#20 0x10324ea0 in ?? ()
#21 0x006c0498 in small_fixnum_table ()
#22 0x10b21324 in ?? ()
---Type <return> to continue, or q <return> to quit---q
Quit (expect signal SIGINT when the program is resumed)
(gdb) finish
Run till exit from #0  0x0041f7b0 in Leval () at eval.c:1171
Warning:
Cannot insert breakpoint 0.
Error accessing memory address 0x104bfe66: Input/output error.

(gdb) bt
#0  0x0041f7b0 in Leval () at eval.c:1171
#1  0x104bfe66 in ?? ()
#2  0x10b212c4 in ?? ()
#3  0x0065bfa0 in sKinvalid_form ()
#4  0x00000001 in ?? ()
#5  0x10b212f4 in ?? ()
#6  0x0000001c in ?? ()
#7  0x10b21318 in ?? ()
#8  0x0065bf40 in sKoverwrite ()
#9  0x104bf0a5 in ?? ()
#10 0x006cba20 in value_stack ()
#11 0x0065bf40 in sKoverwrite ()
#12 0x10b212e8 in ?? ()
#13 0x00430cfc in Lformat () at format.c:2194
#14 0x1010a4a4 in ?? ()
#15 0x0065bf40 in sKoverwrite ()
#16 0x10b21318 in ?? ()
#17 0x10b2130c in ?? ()
#18 0x10b21300 in ?? ()
#19 0x10b212c4 in ?? ()
#20 0x10324ea0 in ?? ()
#21 0x006c0498 in small_fixnum_table ()
#22 0x10b21324 in ?? ()
---Type <return> to continue, or q <return> to quit---q
Quit (expect signal SIGINT when the program is resumed)
(gdb) p core_end
$5 = 0x14c6c000 <Address 0x14c6c000 out of bounds>
(gdb) p heap_end
$6 = 0x10b52000 ""
(gdb) p core_end-1
$7 = 0x14c6bfff ""
(gdb)






reply via email to

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