Bug 50670 - [uxa] bo leak when pageflipping
Summary: [uxa] bo leak when pageflipping
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Chris Wilson
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-04 02:39 UTC by Andreas Lampersperger
Modified: 2012-06-06 04:58 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Xserver log file (18.92 KB, text/plain)
2012-06-06 04:40 UTC, Andreas Lampersperger
no flags Details

Description Andreas Lampersperger 2012-06-04 02:39:56 UTC
Im using:
Xorg 1.10.4
pixman 0.24.2
xf86-video-intel 2.16.0
Mesa 7.11
Linux 3.2.0
(OpenSuse Factory Version)

But I used also newer versions (e.g. xf86-video-intel 2.19.0 and Mesa 8.03) and there is also this bug.

Symptom:
Got OutOfMemory-Killer after running some time xscreensaver with gl screensavers

How to immediately provoke the bug:
(1) Install xscreensaver and configure it with random mode and some gl screensavers like fliptext or glText
(2) activate xscreensaver: xscreensaver-command -activate
(3) cycle xscreensaver:    xscreensaver-command -cycle

-> With every cycle (Step 3) the number of items listed in /proc/dri/0/gem_names increases by 1

I used a ssh-console to execute the steps 2-3.

When not using tiling (e.g. Option SwapbuffersWait "false" in xorg.conf) there is no gem object leak.

I figured out, that the gl screensavers like fliptext use DoubleBuffering and they where simply killed with every xscreensaver-command -cycle. When stopping Xorg all the items in /proc/dri/0/gem_names where freed. 

With xf86-video-intel 2.15.0, kernel 2.6.33 and Mesa 7.9 I did not have this gem object leak.
Comment 1 Chris Wilson 2012-06-06 04:25:16 UTC
You don't say what hardware you are using, so please attach your Xorg.log
Comment 2 Chris Wilson 2012-06-06 04:39:36 UTC
w/a: Option "TripleBuffer" "false"
Comment 3 Andreas Lampersperger 2012-06-06 04:40:15 UTC
Created attachment 62667 [details]
Xserver log file

This is taken from Xorg V 1.9.5, but I got this bug also V 1.11.4
Comment 4 Andreas Lampersperger 2012-06-06 04:53:35 UTC
When adding Option "TripleBuffer" "false" there is no leak.
Comment 5 Chris Wilson 2012-06-06 04:58:17 UTC
commit 1675f441049d559d891fe378e437c12db21df9e7
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Jun 6 12:55:13 2012 +0100

    uxa/dri: Transfer reference of the new_back buffer to the flip_chain
    
    In order to prevent a leak of the bo when the chain is eventually
    torn-down when the client exits.
    
    Reported-by: Andreas Lampersperger <lampersperger.andreas@heidenhain.de>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50670
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>


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.