Bug 13294 - i915: drm: xorg leaks drm objects massively
i915: drm: xorg leaks drm objects massively
Status: CLOSED CODE_FIX
Product: Drivers
Classification: Unclassified
Component: Video(DRI - non Intel)
All Linux
: P1 normal
Assigned To: drivers_video-dri
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-13 09:48 UTC by Rafael J. Wysocki
Modified: 2010-06-18 14:29 UTC (History)
4 users (show)

See Also:
Kernel Version: 2.6.30-rc4
Tree: Mainline
Regression: No


Attachments

Description Rafael J. Wysocki 2009-05-13 09:48:24 UTC
Subject    : [BUG] i915: drm: xorg leaks drm objects massively: linux-2.6.30-rc{4,5}
Submitter  : Sergei Trofimovich <slyich@gmail.com>
Date       : 2009-05-10 19:56
References : http://marc.info/?l=linux-kernel&m=124198547027903&w=4

This entry is being used for tracking a regression from 2.6.29.  Please don't
close it until the problem is fixed in the mainline.
Comment 1 Sergei Trofimovich 2009-05-17 11:36:52 UTC
Sorry, it's not a 2.6.29 regression.
Retested with 2.6.29{, .2} - same problem.
Many deleted objects in pmap `pidof X`
Comment 2 Rafael J. Wysocki 2009-05-17 12:46:30 UTC
I'm assuming that 2.6.28 was fine, then.
Comment 3 Sergei Trofimovich 2009-05-17 14:00:42 UTC
No, i just didn't notice this problem before.
Maybe I did not hold weekly uptimes or 2.6.29 didn't leak so fast.
2.6.29 is actually first kernel i managed to start Xorg on this hardware.
2.6.28 didn't work at all (maybe, i had (and still have) stale buggy userspace)

So, I don't know working kernel without this problem.

P.S.
2.6.30-rc6:

$ dmesg  | grep drm
[    0.549722] [drm] Initialized drm 1.1.0 20060810
[    0.567066] [drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 0
[  648.278242] [drm:i915_get_vblank_counter] *ERROR* trying to get vblank count for disabled pipe 1

$ uptime
 ..  2:40 ...

$ sudo pmap `pidof X` | wc -l
13050

Right after Xorg startup I had 834 entries in pmap.
Comment 4 Sergei Trofimovich 2009-05-22 19:11:01 UTC
Looks like it's my case: https://bugs.freedesktop.org/show_bug.cgi?id=20766
Comment 5 Sergei Trofimovich 2009-05-27 18:15:28 UTC
> [  648.278242] [drm:i915_get_vblank_counter] *ERROR* trying to get vblank count
for disabled pipe 1

This message is gone in 2.6.30-rc7. The rest does not look as kernel bug.
Comment 6 Sergei Trofimovich 2009-05-27 18:17:26 UTC
(In reply to comment #5)
> > [  648.278242] [drm:i915_get_vblank_counter] *ERROR* trying to get vblank count
> for disabled pipe 1
> 
> This message is gone in 2.6.30-rc7. The rest does not look as kernel bug.

Sorry. Don't know how i checked, but it still presents.
[    0.554499] [drm] Initialized drm 1.1.0 20060810
[    0.571565] [drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 0
[ 3340.712201] [drm:i915_get_vblank_counter] *ERROR* trying to get vblank count for disabled pipe 0

Sorry again.
Comment 7 Rafael J. Wysocki 2009-06-07 20:57:13 UTC
On Sunday 07 June 2009, you wrote:
> On Sun,  7 Jun 2009 12:06:23 +0200 (CEST)
> "Rafael J. Wysocki" <rjw@sisk.pl> wrote:
> 
> > This message has been generated automatically as a part of a report
> > of regressions introduced between 2.6.28 and 2.6.29.
> > 
> > The following bug entry is on the current list of known regressions
> > introduced between 2.6.28 and 2.6.29.  Please verify if it still should
> > be listed and let me know (either way).
> > 
> > 
> > Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=13294
> > Subject		: i915: drm: xorg leaks drm objects massively
> > Submitter	: Sergei Trofimovich <slyich@gmail.com>
> > Date		: 2009-05-10 19:56 (29 days old)
> > References	: http://marc.info/?l=linux-kernel&m=124198547027903&w=4
> > 
> > 
> Rafael, please remove it from regression list. I haven't found kernel working
> the other way. It's a bug(set of bugs) being around "forever". Many people
> confirm it on various laptops/kernel versions. It's just not very noticeable.
Comment 8 Rafael J. Wysocki 2009-06-07 20:59:15 UTC
Dropping from the list of recent regressions.
Comment 9 Sergei Trofimovich 2009-06-08 19:47:18 UTC
All problems disappear when I enable i915 KMS.
Xorg VSIZE reduces from 500M to 200M, VT switch does not cause any warnings.
So, bug only appears in non-KMS mode.
Comment 10 Maxim Levitsky 2009-07-05 19:11:25 UTC
I use i965 + kms + everything -git.

The /sys/kernel/debug/dri/0/gem_objects never decreases
I mean the number of objects.

Or more correctly it does, but only when application that created them is closed.
This includes compiz, Xorg, 3d games, and Google earth.

It especially bad with GE, in few minutes of use the number of gem objects pitches up, and number of bytes is more that a gigabyte, system swaps, and GE becames very slow. once I close it, everything is freed.
Comment 11 Maxim Levitsky 2009-09-10 01:47:04 UTC
I think this is fixed.
I don't see any leaks now
Comment 12 Gordon Jin 2009-09-17 03:29:25 UTC
closing according to comment#9 and #11.
Comment 13 Maxim Levitsky 2010-04-03 13:42:55 UTC
This bug is fixed long time ago.
could somebody with permissions mark it as CLOSED?
Comment 14 Maxim Levitsky 2010-06-18 00:25:30 UTC
+1
Comment 15 Rafael J. Wysocki 2010-06-18 14:29:02 UTC
Done.

Note You need to log in before you can comment on or make changes to this bug.