Bug 97482 - Xvfb using 5.6 gigs of memory - memory leak?
Summary: Xvfb using 5.6 gigs of memory - memory leak?
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/DDX/Xvfb (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-25 17:54 UTC by Darxus
Modified: 2018-12-13 18:31 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Darxus 2016-08-25 17:54:46 UTC
From top:

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
19121 darxus    20   0 5666220 1.537g   9468 S   0.0 19.7 105:20.43 Xvfb
23684 darxus    20   0  212908  37372  23372 S   0.0  0.5   0:00.02 Xvfb

The second line is an identically run instance for comparison, run for a minute.

Run as:  Xvfb -screen 0 1680x1024x24 -ac -nolisten tcp :5

I'm using this to run cairo's make check once every four hours.  No clients currently connected:

darxus@dancer:~$ DISPLAY=:5 xlsclients
darxus@dancer:~$ 

For thoroughness, the (only) command I'm running against this display, from cairo's git, is:
DISPLAY=:5 CAIRO_REF_DIR=$HOME/source/cairo-ref.xcb-image.xvfb.script CAIRO_TEST_TARGET=xcb,image,image16 make test

Xvfb has been running for almost five days.
Comment 1 Darxus 2016-08-25 18:08:52 UTC
Version 1.18.3, running on Ubuntu 16.04.
Comment 2 Darxus 2016-09-12 16:00:55 UTC
I ran Xvfb through valgrind as: 
valgrind --leak-check=full --log-file=xvfbvalgrind.log --leak-check=yes Xvfb -screen 0 1680x1024x24 -ac -nolisten tcp :6

Verified that the kill command successfully got it to exit with output.

Ran cairo's make check for about 37 hours (a single run), then ran kill on it, waited three days for it to exit, then had to shut it down so I could move, with no output.

I went back to just using Xvfb normally, problem is still there:

 5903 darxus    20   0 6141480 3.046g   9348 S   0.0 39.1 128:20.84 Xvfb        

I wanted to mention in an older bug, a workaround was to run Xvfb with -noreset
I haven't tested it.
https://bugzilla.redhat.com/show_bug.cgi?id=498357
(Since it took three years for that workaround to get mentioned there.)
Comment 3 GitLab Migration User 2018-12-13 18:31:17 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/xserver/issues/195.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.