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

 
 

bug #18892: loading debugging information sometimes freezes

Submitter:  Taylor R. Campbell <riastradh>
Submitted:  Sat 27 Jan 2007 09:49:12 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect behavior
Status:  Fixed Privacy:  Public
Assigned to:  riastradh Originator Name: 
Open/Closed:  Closed
Keywords: 
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group Member
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>
Group Member
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>
Group Member
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>
Group Member
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>
Group 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>
Group Member

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-03-09 riastradh StatusNone Fixed
        Open/ClosedOpen Closed
    2007-02-10 riastradh Assigned tocph riastradh
    2007-01-27 cph Assigned toNone cph

    Back to the top

    Powered by Savane 3.13-bb6a.
    Corresponding source code