← Back to team overview

ubuntustudio-bugs team mailing list archive

[Bug 1194871] Re: Huge Memory consumption by extension and pipe not closed

 

Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: inkscape (Ubuntu)
       Status: New => Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Studio Bugs, which is subscribed to inkscape in Ubuntu.
Matching subscriptions: Ubuntu Studio Bugs
https://bugs.launchpad.net/bugs/1194871

Title:
  Huge Memory consumption by extension and pipe not closed

Status in Inkscape:
  Triaged
Status in inkscape package in Ubuntu:
  Confirmed
Status in inkscape package in Arch Linux:
  New
Status in Mandriva:
  New

Bug description:
  Hi,

  I was just playing around the different extension and I come to know a
  strange result.

  As per my understanding about Inkscape extension is as below.

  When any extesnion apply it creates temp. file in /tmp folder (in
  Linux) with extension effect and copy the temp. file using copy_doc
  function (in script.cpp_ file.

  Now to just play around I just comment the line
  copy_doc(doc->doc()->rroot, mydoc->rroot);
  from script.cpp file, now this will not display extension result on the screen but open pipes(fifo) to run the script, now every time pipes open to run the script as child process, but this pipes are not closed hence after some time it will give error as
  Can't Spawn!!! spawn returns: Failed to create pipe for communicating with child process (Too many open files
  which is why max. file descriptor limit reached. 

  So this is one thing about pipes.

  Now second thing is huge memory consumption, to generate the scenario please do the steps as below.
  Open Inkscape
  Go to extension->Render->Gear
  Now Just click Apply

  Now if you just applying the same plugin again and again inkscape
  memory will keep increasing, and If we delete the resulting effect by
  extension then also it is not getting free.

  You can also apply different extension to generate the same memory
  issue. I did it on inkscape version 0.84.4 on Ubuntu 10.04  and Ubuntu
  12.04 and results are same.

  Now I have debug the things and I found that when extension create new
  file and it is copied using copy_doc into original doc at that time
  inkscape also create Root, Metadata, namedview element, which is I
  think inkscape default, that creates when inkscape start and they will
  remain in memory until inkscape exit.

  So I think when new svg copied to the original at that time it start
  eating memory.

  I was behind this from last 2 days and while searching for memory leak
  issue when applying extension, I found this.

  I don't know how to contact developer, But If you give me more hints I
  can give you better testing feedback. In this bug If you require
  further details, please let me know. Also please let me know If there
  is any quick work around are possible to reduce memory usage.

To manage notifications about this bug go to:
https://bugs.launchpad.net/inkscape/+bug/1194871/+subscriptions