bugGNU Octave - Bugs: bug #34431, pager consumes memory

 
 

bug #34431: pager consumes memory

Submitted by:  None
Submitted on:  Thu 29 Sep 2011 02:47:16 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Segfault, Bus Error, etc.
Status: FixedAssigned to: Jordi Gutiérrez Hermoso <jordigh>
Originator Name: DirkOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.4.2
Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Mon 03 Oct 2011 03:18:55 PM UTC, comment #4:

I don't think it was a leak in the sense that the memory was lost, but if you ever buffered a lot of output, Octave was only seeking back to the beginning of the buffer used for the pager reusing it. So you'd end up holding on to and using the large buffer for the rest of the session even if you never needed that much output buffer space again.

I checked in the following change as an attempt to avoid that problem. It seems to work for me. While watching with top, I can generate a lot of output and the memory use goes up, then when I interrupt and do something that sends a smaller amount of data to the pager, Octave's memory use is lower than for the first time with the large amount of data. So the memory use seems to be better and I'm closing this report.

http://hg.savannah.gnu.org/hgweb/octave/rev/c053740eb2aa

John W. Eaton <jwe>
Project Administrator
Fri 30 Sep 2011 12:16:36 AM UTC, comment #3:

Well, the thing is that I do think we have a memory leak here. When you interrupt the huge pager, it looks like memory the pager was using is never reclaimed.

I don't think turning off the pager is the right default. I will add a note to the documentation about how paging tons of output will eat memory and will investigate why it isn't getting freed.

Jordi Gutiérrez Hermoso <jordigh>
Project AdministratorIn charge of this item.
Thu 29 Sep 2011 11:59:50 PM UTC, comment #2:

Changing pager options seems to fix this immediately, thank you very much for your help Jordi. Please pardon me if this is a newbie suggestion but would the options below be better defaults (ie for a future version)?

Anonymous
Thu 29 Sep 2011 05:44:48 AM UTC, comment #1:

I don't think this has anything to do with mkoctfiles.

Can you please try the following two modified attachments to your problem and report? I don't see a memory leak with memtest1 but I do with memtest2. Can you confirm?

(file #24042, file #24043)

Jordi Gutiérrez Hermoso <jordigh>
Project AdministratorIn charge of this item.
Thu 29 Sep 2011 02:47:16 AM UTC, original submission:

Repeated .oct file calls causes octave process to accumulate memory and (eventually) crash, on both a Dell M4400 Win7 using v3.2 sourceforge binary and Toshiba Satellite Ubuntu 10/v3.4.2 compiled from source.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #24053:  memtest3_ok.m added by None (309B - text/plain - memtest2.m also hogged down my Win7 machine, but changing pager options (memtest3_ok.m) appears to a clean fix for my issue? hope so - and thanks, Jordi! )
file #24042:  memtest1.m added by jordigh (630B - text/x-objcsrc - Fixing a hole where the mem leaks out and stops my mind from wandering.)
file #24043:  memtest2.m added by jordigh (108B - text/x-objcsrc - Fixing a hole where the mem leaks out and stops my mind from wandering.)
file #24041:  OctaveMemUseTest.m added by None (604B - text/x-objcsrc - thanks very much for this great tool! )

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by jordigh (Updated the item)
  • -unavailable- added by None (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 project members can vote.

     

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

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 03 Oct 2011 03:18:55 PM UTCjweStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Fri 30 Sep 2011 12:16:36 AM UTCjordighSummaryprocess memory grows without bounds w/repeated .oct calls=>pager consumes memory
    Thu 29 Sep 2011 11:53:55 PM UTCNoneAttached File-=>Added memtest3_ok.m, #24053
    Thu 29 Sep 2011 05:44:48 AM UTCjordighAttached File-=>Added memtest1.m, #24042
      Attached File-=>Added memtest2.m, #24043
      Assigned toNone=>jordigh
    Thu 29 Sep 2011 02:47:16 AM UTCNoneAttached File-=>Added OctaveMemUseTest.m, #24041

    Back to the top


    Powered by Savane 3.1-cleanup1