Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Memory leak in X or ati-drivers
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Dekalog
n00b
n00b


Joined: 08 Sep 2005
Posts: 27
Location: Germany

PostPosted: Wed Feb 25, 2015 1:47 pm    Post subject: Memory leak in X or ati-drivers Reply with quote

A recent update installed both a newer version of the ATI drivers (closed source) and the X server, so I don't know which of these is causing my problem.

After running for several hours, I notice that X seems to use up the major part of my RAM. A while later, the system becomes completely unresponsive, then X gets killed (after swap is also completely filled), and the cycle repeats.
The system has 8GB of RAM and 4GB of swap, an intel cpu (not sure if relevant) and an AMD 6870 graphics card.
I'm using amd64 arch with a very few ~amd64 packages (none of the ~amd64 prorgammes were running when this happended, so probably not relevant).
Relevant excerpts from dmesg after the fact:
Code:

[79842.036128] pool invoked oom-killer: gfp_mask=0x280da, order=0, oom_score_adj=0
[79842.036132] CPU: 3 PID: 10408 Comm: pool Tainted: P           O   3.18.7-gentoo #1
[79842.036133] Hardware name: Gigabyte Technology Co., Ltd. Z68AP-D3/Z68AP-D3, BIOS F2 06/03/2011
[79842.036134]  0000000000000000 0000000000000000 ffffffff814df5c0 ffff880087f10f00
[79842.036136]  ffffffff814dd7a3 0000000000000000 ffff880223953b38 0000000000000400
[79842.036138]  ffff880053123c00 0000000000000531 ffffffff810f6ef8 0000000000000000
[79842.036139] Call Trace:
[79842.036144]  [<ffffffff814df5c0>] ? dump_stack+0x49/0x6a
[79842.036146]  [<ffffffff814dd7a3>] ? dump_header.isra.10+0x69/0x1dc
[79842.036149]  [<ffffffff810f6ef8>] ? shrink_slab_node+0x38/0x1b0
[79842.036151]  [<ffffffff810ecc0e>] ? oom_kill_process+0x25e/0x3e0
[79842.036153]  [<ffffffff810ec763>] ? find_lock_task_mm+0x53/0xa0
[79842.036155]  [<ffffffff8107329c>] ? has_ns_capability_noaudit+0x2c/0x40
[79842.036156]  [<ffffffff810ed2ff>] ? out_of_memory+0x3bf/0x400
[79842.036158]  [<ffffffff810f1986>] ? __alloc_pages_nodemask+0x756/0x770
[79842.036161]  [<ffffffff8112781a>] ? alloc_pages_vma+0x5a/0x110
[79842.036163]  [<ffffffff8110d32c>] ? handle_mm_fault+0x74c/0xa00
[79842.036166]  [<ffffffff8103684a>] ? __do_page_fault+0x13a/0x460
[79842.036168]  [<ffffffff812856ae>] ? blkdev_ioctl+0x20e/0x7b0
[79842.036170]  [<ffffffff81161ffc>] ? block_ioctl+0x3c/0x50
[79842.036172]  [<ffffffff81143c67>] ? do_vfs_ioctl+0x2d7/0x4b0
[79842.036174]  [<ffffffff8114d2a3>] ? __fget+0x63/0xa0
[79842.036177]  [<ffffffff814e5cf2>] ? page_fault+0x22/0x30
[79842.036178] Mem-Info:
[79842.036179] Node 0 DMA per-cpu:
[79842.036181] CPU    0: hi:    0, btch:   1 usd:   0
[79842.036181] CPU    1: hi:    0, btch:   1 usd:   0
[79842.036182] CPU    2: hi:    0, btch:   1 usd:   0
[79842.036183] CPU    3: hi:    0, btch:   1 usd:   0
[79842.036184] Node 0 DMA32 per-cpu:
[79842.036185] CPU    0: hi:  186, btch:  31 usd: 103
[79842.036186] CPU    1: hi:  186, btch:  31 usd:  49
[79842.036187] CPU    2: hi:  186, btch:  31 usd:  50
[79842.036188] CPU    3: hi:  186, btch:  31 usd: 104
[79842.036188] Node 0 Normal per-cpu:
[79842.036189] CPU    0: hi:  186, btch:  31 usd: 111
[79842.036190] CPU    1: hi:  186, btch:  31 usd: 126
[79842.036191] CPU    2: hi:  186, btch:  31 usd:  97
[79842.036192] CPU    3: hi:  186, btch:  31 usd: 170
[79842.036194] active_anon:1557465 inactive_anon:280024 isolated_anon:0
 active_file:583 inactive_file:746 isolated_file:0
 unevictable:3681 dirty:0 writeback:0 unstable:0
 free:11380 slab_reclaimable:6362 slab_unreclaimable:6102
 mapped:110691 shmem:11858 pagetables:11943 bounce:0
 free_cma:0
[79842.036197] Node 0 DMA free:15352kB min:20kB low:24kB high:28kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15984kB managed:15360kB mlocked:0kB dirty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:0kB slab_unreclaimable:8kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? yes
[79842.036200] lowmem_reserve[]: 0 3158 7891 7891
[79842.036202] Node 0 DMA32 free:23456kB min:4544kB low:5680kB high:6816kB active_anon:2441992kB inactive_anon:488512kB active_file:540kB inactive_file:1528kB unevictable:5596kB isolated(anon):0kB isolated(file):0kB present:3309056kB managed:3235552kB mlocked:5596kB dirty:0kB writeback:0kB mapped:174320kB shmem:20072kB slab_reclaimable:10336kB slab_unreclaimable:9288kB kernel_stack:2224kB pagetables:20808kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:13500 all_unreclaimable? yes
[79842.036205] lowmem_reserve[]: 0 0 4732 4732
[79842.036206] Node 0 Normal free:6712kB min:6808kB low:8508kB high:10212kB active_anon:3787868kB inactive_anon:631584kB active_file:1792kB inactive_file:1456kB unevictable:9128kB isolated(anon):0kB isolated(file):0kB present:4978688kB managed:4846508kB mlocked:9128kB dirty:0kB writeback:0kB mapped:268444kB shmem:27360kB slab_reclaimable:15112kB slab_unreclaimable:15112kB kernel_stack:3712kB pagetables:26964kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:25360 all_unreclaimable? yes
[79842.036209] lowmem_reserve[]: 0 0 0 0
[79842.036211] Node 0 DMA: 0*4kB 1*8kB (U) 1*16kB (U) 1*32kB (U) 1*64kB (U) 1*128kB (U) 1*256kB (U) 1*512kB (U) 0*1024kB 1*2048kB (R) 3*4096kB (M) = 15352kB
[79842.036218] Node 0 DMA32: 511*4kB (UE) 147*8kB (UEM) 211*16kB (UER) 129*32kB (UER) 55*64kB (UEMR) 15*128kB (UMR) 6*256kB (UER) 3*512kB (UR) 2*1024kB (UR) 1*2048kB (R) 0*4096kB = 23332kB
[79842.036226] Node 0 Normal: 744*4kB (U) 0*8kB 2*16kB (R) 2*32kB (R) 4*64kB (R) 3*128kB (R) 2*256kB (R) 3*512kB (R) 1*1024kB (R) 0*2048kB 0*4096kB = 6784kB
[79842.036233] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB
[79842.036234] 15311 total pagecache pages
[79842.036235] 592 pages in swap cache
[79842.036236] Swap cache stats: add 1294479, delete 1293887, find 131745/177267
[79842.036237] Free swap  = 0kB
[79842.036237] Total swap = 4202236kB
[79842.036238] 2075932 pages RAM
[79842.036239] 0 pages HighMem/MovableOnly
[79842.036239] 51577 pages reserved
[79842.036240] [ pid ]   uid  tgid total_vm      rss nr_ptes swapents oom_score_adj name
[79842.036242] [ 1181]     0  1181     9297      449      21      174         -1000 systemd-udevd
[79842.036244] [ 1936]     0  1936     1056      238       8       18             0 acpid

[... several more entries like this...]

79842.036329] Out of memory: Kill process 2345 (X) score 768 or sacrifice child
[79842.036331] Killed process 2345 (X) total-vm:10132608kB, anon-rss:5447448kB, file-rss:436152kB


Does anyone else see this?
Back to top
View user's profile Send private message
Dekalog
n00b
n00b


Joined: 08 Sep 2005
Posts: 27
Location: Germany

PostPosted: Wed Mar 11, 2015 11:06 pm    Post subject: Reply with quote

Doesn't anyone else have this problem? Or any clue as to what is going on? It's quite annoying having to restart X every 15-20 hours or so (and makes suspend to RAM quite useless...).
Back to top
View user's profile Send private message
Apheus
Guru
Guru


Joined: 12 Jul 2008
Posts: 420

PostPosted: Thu Mar 12, 2015 8:24 am    Post subject: Reply with quote

I noticed this too since the last Xorg update. I use nvidia-drivers. I'm pretty sure the leak is in X. Gentoo stable amd64, xorg-server-1.16.4. I don't care too much - I restart nearly daily - but I noticed the numbers in system monitor - it is unusual if firefox is not #1 ;-)
Back to top
View user's profile Send private message
Dekalog
n00b
n00b


Joined: 08 Sep 2005
Posts: 27
Location: Germany

PostPosted: Thu Mar 12, 2015 11:03 am    Post subject: Reply with quote

Good to know I'm not alone... I suppose sending a bugreport won't help a lot, since we use the CS drivers.
Back to top
View user's profile Send private message
v_andal
Guru
Guru


Joined: 26 Aug 2008
Posts: 524
Location: Germany

PostPosted: Mon Mar 16, 2015 8:06 am    Post subject: Reply with quote

Hm. I don't see any problem. AMD64, xorg-server-1.16.4, VIDEO_CARDS="intel i965". My session runs weeks and no memory problem. But I'll keep an eye on it. Maybe it just grows slowly.
Back to top
View user's profile Send private message
Pistos
Apprentice
Apprentice


Joined: 29 Jul 2003
Posts: 175
Location: Canada

PostPosted: Wed Apr 15, 2015 2:03 am    Post subject: Reply with quote

Same problem here. I noticed it start maybe a week or two ago. Current versions:

[I] x11-drivers/ati-drivers (14.12-r3(1)@16/03/15): Ati precompiled drivers for Radeon Evergreen (HD5000 Series) and newer chipsets
[I] x11-drivers/xf86-video-ati (7.5.0@09/04/15): ATI video driver
[I] x11-base/xorg-server (1.16.4@14/04/15): X.Org X servers
[I] kde-base/kdebase-meta (4.14.3(4)@11/01/15): Merge this to pull in all kdebase-derived packages

I thought updating xorg-server, etc. today would help, but it hasn't.

An Ubuntu bug that is tracking this: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1272338

Gentoo bug: https://bugs.gentoo.org/show_bug.cgi?id=538866
Back to top
View user's profile Send private message
Pistos
Apprentice
Apprentice


Joined: 29 Jul 2003
Posts: 175
Location: Canada

PostPosted: Thu Apr 23, 2015 4:19 am    Post subject: Reply with quote

I solved my problem my changing over to the open-source drivers. Steps to do so [for me] are below. Currently X is using scarely 57 MB RAM, a sharp contrast to the memory hog it used to be with the proprietary drivers!

-----------

Consult https://wiki.gentoo.org/wiki/Radeon .

Code:
# lspci | grep -i vga
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Juniper XT [Radeon HD 5770]


Edit /etc/make.conf:
Code:
VIDEO_CARDS="radeon r600"  # change to suit your ATI card

Edit /etc/X11/xorg.conf: Empty it or comment out everything

Code:
eselect opengl set xorg-x11


If necessary:
Code:
emerge -actv glamor xf86-video-ati


Then:
Code:
emerge -1atv xorg-server xorg-drivers


Check for packages that need updating to use the new VIDEO_CARDS setting:

Code:
eix -I | grep -B 4 VIDEO_CARDS


Rebuild those. For example:
Code:
emerge -1atv libdrm pm-utils llvm mesa libva xorg-drivers


Reboot and check if everything works. If so, then clean out the proprietary drivers:

Code:
emerge -actv ati-drivers


Reboot again if desired, to ensure the system in memory is clean.

While trying to work through all this, you may need to clean out or rebuild some packages.
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Mon Apr 27, 2015 8:02 am    Post subject: Reply with quote

Does not surprise me one bit. ATI could never write proper drivers for their hardware, even for Windoze.

The nice thing about writing closed source software is that no one gets to see what a mess your code is. ;)
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum