bugMIT/GNU Scheme - Bugs: bug #18892, loading debugging information...

 
 

bug #18892: loading debugging information sometimes freezes

Submitted by:  Taylor R. Campbell <riastradh>
Submitted on:  Sat 27 Jan 2007 09:49:12 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect behavior
Status: FixedPrivacy: Public
Assigned to: Taylor R. Campbell <riastradh>Originator Name: 
Open/Closed: Closed
Keywords: 

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 09 Mar 2009 09:49:56 PM UTC, comment #5:

Scheme no longer wedges in this situation, since the changes that were made.

Taylor R. Campbell <riastradh>
Project MemberIn charge of this item.
Sat 10 Feb 2007 07:56:58 PM UTC, comment #4:

I've committed the change to the GARBAGE-COLLECT primitive. This provisional fix doesn't help the original problem much, however, although it did help to improve robustness and to track the issue down. The real problem is that uncompression code is trying to allocate a buffer that won't fit in the heap for hashtb.bci. (The uncompressed hashtb.bif can be loaded with no trouble.) But I don't understand the uncompression code well enough to find a workaround; perhaps I'll look into it more thoroughly some time.

It would be nice to report what primitive was unable to allocate adequate memory, also, instead of just spitting out an `Aborting!: out of memory' message.

Taylor R. Campbell <riastradh>
Project MemberIn charge of this item.
Sat 10 Feb 2007 05:58:09 AM UTC, comment #3:

Actually, I just thought of a much simpler way to do it: simply return (HEAP_AVAILABLE - gc_space_needed) instead of HEAP_AVAILABLE from the GARBAGE-COLLECT primitive. Then the situation is handled trivially in Scheme, without even needing to modify GC-FINISH in runtime/gc.scm. I think this does not even really qualify as an incompatible change to the microcode's interface, since after all the GARBAGE-COLLECT primitive is meant to return a measure of the remaining space.

I'll commit this tomorrow if no other problems arise. (Of course, it still doesn't fix the problem that loading hashtb.bci overflows the heap, but at least it doesn't freeze the system.)

Taylor R. Campbell <riastradh>
Project MemberIn charge of this item.
Sat 10 Feb 2007 03:16:31 AM UTC, comment #2:

Calling MAKE-VECTOR with a sufficiently large length also exhibits the problem. I believe that we keep restarting the primitive VECTOR-CONS even though there is not enough space. This happens because, after the primitive invokes the GC and the GC returns, the heap space check (GC_NEEDED_P (gc_space_needed)) in the interpreter's handler for the RC_NORMAL_GC_DONE return code is ignored, since interrupts are disabled before the GC interrupt handler is called, and not re-enabled until after the GC returns (and transitively after the heap space is checked again). Thus, the microcode never notices that we really are out of space, and restarts the VECTOR-CONS primitive, which happily tries another GC, and so ad infinitum.

I think the conceptually simplest way to fix the problem would be to put the post-GC heap space check after interrupts are re-enabled, but I'm not sure how to effect that change in the code; there's an abstraction barrier in the way.

Incidentally, while investigating this, I noticed a number of bugs in the debugging flag code, which has probably bitrotted over the years.

Taylor R. Campbell <riastradh>
Project MemberIn charge of this item.
Sat 27 Jan 2007 10:11:38 PM UTC, comment #1:

On my system it fails if I don't specify the heap size, but given --heap 6000 it works fine. This looks like a problem with recovery from a low-memory situation.

Chris Hanson <cph>
Project Administrator
Sat 27 Jan 2007 09:49:12 PM UTC, original submission:

Type (PA HASH-TABLE/GET) in a recent version of Scheme.
The system freezes for me, and `C-c t' causes a segfault during GC.

Taylor R. Campbell <riastradh>
Project MemberIn charge of this item.

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by cph (Updated the item)
  • -unavailable- added by riastradh (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 09 Mar 2009 09:49:56 PM UTCriastradhStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Sat 10 Feb 2007 07:56:58 PM UTCriastradhAssigned tocph=>riastradh
    Sat 27 Jan 2007 10:10:23 PM UTCcphAssigned toNone=>cph

    Back to the top


    Powered by Savane 3.1-cleanup1