← Back to team overview

ubuntu-x-swat team mailing list archive

[Bug 98783] Re: MASTER: memory leak

 

After skimming through this 1300 page document with okular:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf
Memory usage went up and it did not go back down:

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND            
28137 root      20   0  379m 240m  14m S  0.3 24.4   3:22.85 Xorg      

I paged down through several hundred pages, some fast enough for the
pages to be fully rendered, others not.   Memory use went up early and
then seemed to stabilize.

Leading me to suspect that the bugs in okular are exciting the bugs in
X.

Someone else mentioned another document from this site and okular.
Perhaps certain document excite the bugs in okular.

This is a document I had been reading earlier.

I opened the document again, and a curious thing happened.    Resident
memory went down while virtual memory went up.   The resident portion
then climbed back up again.   When I exited okular the second time, the
X server freed the memory.

Restarted okular again.     It resumed at the page I was at when I exited the last time.    Virtual memory used by the X server almost instantly doubled from 200MB to 400MB, I think.   Went back down again to near its initial value, then climbed back up to 368MB/230MB as a paged down.    Went back down to 200MB when I exited the program.     Rinse, lather, repeat.   X virtual memory usage goes up to about 360MB when actively using okular on this document.    Frequently goes down to normal when I exit.   Loaded n1256.pdf from the same website.  X Virtual memory climbed to 366MB.    After page down about 40 pages, it suddenly dropped to around 200MB.   But then it climbed again to 366Mb.    So, okular likes to use about 160MB of server memory when it is running.   
I then opened both documents simultaneously in two instances of okular.    X virtual memory went up to about 379MB, then stayed there, even actively paging through both documents.    So okular seems to share its memory allocation between instances (two separate processes).    Exited both and the memory usage did not go back down much, it stayed at 342MB virtual/201MB resident.   Reloaded both documents individually and memory didn't go back down.   Even after exiting the program again.     But memory didn't go up much paging the documents, indicating that okular is still reusing the memory.   xrestop, incorrectly shows that okular is using about 40MB.

It seems like okular does some peculiar sharing of pixmap usage between
processes.    And when more than one is running, it may get a little
confused about freeing it when it exits.

http://www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf
These documents are the C99 and C++ standards drafts.


So, looks like the problem is somewhat reproducible.

-- 
MASTER: memory leak
https://bugs.launchpad.net/bugs/98783
You received this bug notification because you are a member of Ubuntu-X,
which is subscribed to xorg-server in ubuntu.