Bug 104340 - Memory leak with GEM objects
Summary: Memory leak with GEM objects
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/nouveau (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Nouveau Project
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-19 18:53 UTC by S. Gilles
Modified: 2017-12-19 23:29 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
dmesg (up to last nouveau messages) (33.73 KB, text/plain)
2017-12-19 18:53 UTC, S. Gilles
no flags Details
first few lines of /sys/kernel/debug/kmemleak (12.66 KB, text/plain)
2017-12-19 18:54 UTC, S. Gilles
no flags Details
contents of /proc/meminfo after running X for a few weeks, then killing it (1012 bytes, text/plain)
2017-12-19 18:55 UTC, S. Gilles
no flags Details
output of slabtop after running X for a few weeks (3.77 KB, text/plain)
2017-12-19 18:55 UTC, S. Gilles
no flags Details

Description S. Gilles 2017-12-19 18:53:31 UTC
Created attachment 136291 [details]
dmesg (up to last nouveau messages)

I have a gk106, current versions of libdrm, mesa, kernel (observed both with -mainline and https://github.com/skeggsb/linux branch linux-4.15 as of a few minutes ago), and there appears to be a memory leak with nouveau that eats up about .5 GB every day. Killing X does nothing.

Attached is output of dmesg from the most recent boot of this machine. I've also attached (in case it matters) dumps of /proc/meminfo and output of slabtop after I ran X for about two weeks, then exited and killed all major daemons.  More importantly, I've attached a few hundred lines of /sys/kernel/debug/kmemleak (from the most recent boot). After the first few entries, they all start looking the same (except for the address and age).
Comment 1 S. Gilles 2017-12-19 18:54:16 UTC
Created attachment 136292 [details]
first few lines of /sys/kernel/debug/kmemleak
Comment 2 S. Gilles 2017-12-19 18:55:18 UTC
Created attachment 136294 [details]
contents of /proc/meminfo after running X for a few weeks, then killing it
Comment 3 S. Gilles 2017-12-19 18:55:46 UTC
Created attachment 136295 [details]
output of slabtop after running X for a few weeks
Comment 4 Ben Skeggs 2017-12-19 22:47:51 UTC
I've pushed a fix for a rather stupid memory leak bug that's likely the cause of what you're seeing.
Comment 5 S. Gilles 2017-12-19 23:29:19 UTC
This appears to fix it. I've been testing the fix for about 30 minutes, and kmemleak is no longer complaining about X.  Thanks for looking into this!


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.