[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Calling out to C causing hang
From: |
Chris Double |
Subject: |
Re: [Chicken-users] Calling out to C causing hang |
Date: |
Mon, 7 Apr 2003 13:00:22 +1200 |
User-agent: |
KMail/1.4.3 |
On Mon, 07 Apr 2003 09:40, felix wrote:
> handle_interrupt is only called by C_raise_interrupt. C_raise_interrupt is
> either called by C_check_for_interrupt(in chicken.h) or by UNIX signal-
> handlers.
handle_interrupt is only called by C_reclaim I think. C_raise_interrupt sets a
flag (interrupt_reason) that gets checked in C_reclaim to then process it. Is
that right?
> Are you using finalizers? Or multithreading?
No to both.
> The best way of tackling this seems to be to walk through the whole
> thing with gdb, setting breakpoints in handle_interrupt and
> C_raise_interrupt (and C_reclaim). It would be nice if you could send me
> the gdb output starting from the point where handle_interrupt is called and
> up to the minor GC loop.
Unfortunately I haven't been using gdb. What's the easiest way of getting a
debug build of chicken? Is there something I pass to configure or make to set
the '-g' flag to gcc?
What I've been doing is putting lots of 'printf' debugging in runtime.c and
doing a make of everything. It's slow to build though! When I run my test
case I redirect the debug output to a file. It gets to about 58MB or so
before I manage to kill it while it's looping.
I'm not sure what you what to see but if you let me know I can produce it.
Currently it looks something like:
handle_interrupt called from C_reclaim (interrupt_reason 255)
c_save_and_reclaim before call to C_reclaim
C_reclaim, handle_interrupt not called, tgc is 360
C_fromspace_top: 1078298468
C_fromspace_limit: 1078333760
We are not jumping to full_gc
Before line of code labeled /* Clear the mutated slot stack: */
Completed /* Mark live values: */ loop
After heap_scan loop, gc_mode is GC_MINOR
Setting tgc to new value (milliseconds - tgc)
Performing longjmp to C_restart with value of 1.
c_save_and_reclaim before call to C_reclaim
C_reclaim, handle_interrupt not called, tgc is 360
C_fromspace_top: 1078298512
C_fromspace_limit: 1078333760
Not full gc
We are not jumping to full_gc
Before line of code labeled /* Clear the mutated slot stack: */
Completed /* Mark live values: */ loop
After heap_scan loop, gc_mode is GC_MINOR
Setting tgc to new value (milliseconds - tgc)
Performing longjmp to C_restart with value of 1.
[...The following loops for thousands of times with the exact same data...]
c_save_and_reclaim before call to C_reclaim
C_reclaim, handle_interrupt not called, tgc is 360
C_fromspace_top: 1078298512
C_fromspace_limit: 1078333760
Not full gc
We are not jumping to full_gc
Before line of code labeled /* Clear the mutated slot stack: */
Completed /* Mark live values: */ loop
After heap_scan loop, gc_mode is GC_MINOR
Setting tgc to new value (milliseconds - tgc)
Performing longjmp to C_restart with value of 1.
[...Then a slight change, the tgc is now 400, but again repeated thousands of
times...]
c_save_and_reclaim before call to C_reclaim
C_reclaim, handle_interrupt not called, tgc is 400
C_fromspace_top: 1078298512
C_fromspace_limit: 1078333760
Not full gc
We are not jumping to full_gc
Before line of code labeled /* Clear the mutated slot stack: */
Completed /* Mark live values: */ loop
After heap_scan loop, gc_mode is GC_MINOR
Setting tgc to new value (milliseconds - tgc)
Performing longjmp to C_restart with value of 1.
And so on forever with only the tgc value changing. Any pointers to other
places to put debug info? How can I find out where that longjump is going to?
Eventually it gets to C_save_and_reclaim but I'd like to find out the trace
for where that gets called. If I get chicken built with debug so gdb works on
it I'll get a backtrace.
Chris.
- [Chicken-users] Calling out to C causing hang, Chris Double, 2003/04/05
- Re: [Chicken-users] Calling out to C causing hang, Joerg F. Wittenberger, 2003/04/05
- Re: [Chicken-users] Calling out to C causing hang, tonyg, 2003/04/05
- Re: [Chicken-users] Calling out to C causing hang, Chris Double, 2003/04/05
- Re: [Chicken-users] Calling out to C causing hang, Chris Double, 2003/04/06
- Re: [Chicken-users] Calling out to C causing hang, felix, 2003/04/06
- Re: [Chicken-users] Calling out to C causing hang,
Chris Double <=
- Re: [Chicken-users] Calling out to C causing hang, Tony Garnock-Jones, 2003/04/07
- Re: [Chicken-users] Calling out to C causing hang, Chris Double, 2003/04/07
- Re: [Chicken-users] Calling out to C causing hang, Felix Winkelmann, 2003/04/07
- Re: [Chicken-users] Calling out to C causing hang, Chris Double, 2003/04/07
- Re: [Chicken-users] Calling out to C causing hang, Felix Winkelmann, 2003/04/07
- Re: [Chicken-users] Calling out to C causing hang, Chris Double, 2003/04/07
- Re: [Chicken-users] Calling out to C causing hang, Felix Winkelmann, 2003/04/07
- Re: [Chicken-users] Calling out to C causing hang, Chris Double, 2003/04/07
- [Chicken-users] C hang Solved (was Re: Calling out to C causing hang), Chris Double, 2003/04/07
- [Chicken-users] Re: C hang Solved (was Re: Calling out to C causing hang), Felix Winkelmann, 2003/04/07