Bug 64978 - [sna] drm mm object leaks
Summary: [sna] drm mm object leaks
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Chris Wilson
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-25 11:19 UTC by Jiri Slaby
Modified: 2013-05-25 15:18 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
xorg log (28.56 KB, text/plain)
2013-05-25 11:19 UTC, Jiri Slaby
no flags Details

Description Jiri Slaby 2013-05-25 11:19:20 UTC
Created attachment 79783 [details]
xorg log

After some time my system is unusable because I have 3.5G of active/unreclaimable shmem. So I put a printout to shmem_file_setup and shm_destroy and I see only:
  shmem_file_setup: Xorg drm mm object
pretty often without shm files being destroyed afterwards.

This is exploitable by browsing maps in a browser very quickly. A minute ago I had
  Cached:           695024 kB
browsed a map in firefox and now I see:
  Cached:           759500 kB

(This is output of "sync;echo 3 > /proc/sys/vm/drop_caches ;grep Cached /proc/meminfo".)

Didn't you change something in the ddx lately? This started happening like a week or two ago...

This happens both on ivb and g33.
Comment 1 Jiri Slaby 2013-05-25 12:06:43 UTC
I disable COW, let's see.
Comment 2 David Gow 2013-05-25 14:05:08 UTC
I've been getting this (or something very similar) for the last few days (with ubuntu 12.10's xorg-edgers repository, kernel 3.7.0-7-generic) on Ivybridge. It keeps triggering the OOM killer even though the machine has 8 GB of RAM (admittedly, there's no swap either).

Notably, GL apps seem to be more prone to this: I've been in the situation where Mesa/GL applications will OOM practically instantly, whereas other programs will last much longer.

/proc/meminfo shows Shmem as 6910536 kB, which seems a bit excessive. :)

Let me know if there's any info I can provide that'd help.

Cheers,
-- David
Comment 3 Chris Wilson 2013-05-25 14:56:27 UTC
Yikes, spotted a trivial leak when undoing the COW:

commit 51103d8637ba34a0d5f3507e196f54333aa765bb
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sat May 25 15:53:11 2013 +0100

    sna: Free the released COW reference when uncloning
    
    Reported-by: Jiri Slaby <jirislaby@gmail.com>
    Reported-by: David Gow <david@ingeniumdigital.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64978
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

I can't believe I didn't trip over that during testing.
Comment 4 Jiri Slaby 2013-05-25 15:18:36 UTC
Looks good so far.


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.