bugKawa - Bugs: bug #36917, Memory leak

 
 

bug #36917: Memory leak

Submitted by:  Helmut Eller <ellerh>
Submitted on:  Sun 22 Jul 2012 03:18:35 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: Run-time exceptionStatus: Fixed
Privacy: PublicAssigned to: Per Bothner <bothner>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

Tue 21 Aug 2012 02:27:52 PM UTC, comment #6:

I think the problem is the ~/.kawarc.scm on my machine. The file only
contains comments but even an empty file causes the leak (also on
other machines).

A command line switch that disables loading of init files, something
like emacs -q, would be quite useful for testing.

Helmut Eller <ellerh>
Tue 21 Aug 2012 08:10:33 AM UTC, comment #5:

I don't understand this: the test fails consistently on my machine (an
old P4 running Debian/Squeeze) but it seems to work fine on all other
machines that I tried (with the same kawa.jar).

Helmut Eller <ellerh>
Mon 20 Aug 2012 11:09:54 PM UTC, comment #4:

I can't reproduce the problem in comment #3.

I tried: java -Xmx50m kawa.repl sva36917b.scm
with this sva36917b.scm:

(define-variable n 1)
(let ((lambda '(lambda (x1)
(lambda (x2)
(+ x1 42)))))
(let loop ((i 0))
(when (= (mod i 1000) 0)
(format #t "~d: ~:d\n" i ((java.lang.Runtime:getRuntime):totalMemory))
(force-output))
(eval lambda)
(if (< i 100000)
(loop (+ i 1)))))
(format #t "Done ~d.~%" n)

and it worked fine.

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Thu 02 Aug 2012 06:21:34 AM UTC, comment #3:

Repeatedly evaling this
still seems to leak.

Helmut Eller <ellerh>
Thu 02 Aug 2012 05:54:04 AM UTC, comment #2:

I checked in a fix to another similar leak.
I also checked in a test-case.

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Sat 28 Jul 2012 08:08:25 AM UTC, comment #1:

I checked a fix which I believe should fix this.
However, while working on a test-case, I came upon another leak, which is harder to fix: It relates to declarations persisting between "modules". (What makes a fix tricky is the combination of
dealing with macro hygiene and import/require.) Still working on the other problem.

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Sun 22 Jul 2012 03:18:35 PM UTC, original submission:

Memory leak in compiler

This loop:

eats up all memory quite quickly:

If lambda is replaced with something like

the needed memory grows much slower:

Helmut Eller <ellerh>

 

(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 bothner (Posted a comment)
  • -unavailable- added by ellerh (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
    Thu 02 Aug 2012 05:54:04 AM UTCbothnerOpen/ClosedOpen=>Closed
    Sat 28 Jul 2012 08:08:25 AM UTCbothnerItem GroupNone=>Run-time exception
      StatusNone=>Fixed
      Assigned toNone=>bothner

    Back to the top


    Powered by Savane 3.1-cleanup1