[Bug 348719] New: X.org leaks a lot of memory (nv driver?)
https://bugzilla.novell.com/show_bug.cgi?id=348719 User jensseidel@users.sf.net added comment https://bugzilla.novell.com/show_bug.cgi?id=348719#c1 Summary: X.org leaks a lot of memory (nv driver?) Product: openSUSE 10.2 Version: Final Platform: 64bit OS/Version: openSUSE 10.2 Status: NEW Severity: Normal Priority: P5 - None Component: X.Org AssignedTo: sndirsch@novell.com ReportedBy: jensseidel@users.sf.net QAContact: xorg-maintainer-bugs@forge.provo.novell.com Found By: --- Hi, Xorg leaks a lot of memory. Top reports PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 4070 root 15 0 7331m 2.9g 7872 R 2 42.7 122:49.30 Xorg and the value (currently 2.9 GB) increases. xrestop reports that no application is responsible: xrestop - Display: localhost:0 Monitoring 31 clients. XErrors: 0 Pixmaps: 51034K total, Other: 304K total, All: 51339K total res-base Wins GCs Fnts Pxms Misc Pxm mem Other Total PID Identifier 1c00000 2558 128 1 3267 1744 42625K 104K 42729K 5647 Novell Customer Center - Validate Email - Konqueror 1600000 71 123 1 101 162 4206K 9K 4215K 5633 KDE Desktop Details: $ uptime 1:09pm up 34 days 21:10, 13 users, load average: 3.24, 1.54, 1.24 $ rpm -q xorg-x11-server xorg-x11-driver-video xorg-x11-server-7.2-30.8 xorg-x11-driver-video-7.2-33 $ uname -a Linux imkf-pc073 2.6.18-xen #1 SMP Tue Oct 2 16:31:51 CEST 2007 x86_64 x86_64 x86_64 GNU/Linux (xen-3.0-x86_64 self compiled) $ /usr/sbin/hwinfo --gfx 27: PCI 100.0: 0300 VGA compatible controller (VGA) [Created at pci.286] UDI: /org/freedesktop/Hal/devices/pci_10de_391 Unique ID: VCu0.v2eJ1zq6Pz0 Parent ID: vSkL.cutpr6XtQiF SysFS ID: /devices/pci0000:00/0000:00:01.0/0000:01:00.0 SysFS BusID: 0000:01:00.0 Hardware Class: graphics card Model: "Giga-byte GeForce 7600 GT" Vendor: pci 0x10de "nVidia Corporation" Device: pci 0x0391 "GeForce 7600 GT" SubVendor: pci 0x1458 "Giga-byte Technology" SubDevice: pci 0x3417 Revision: 0xa1 Memory Range: 0xf4000000-0xf4ffffff (rw,non-prefetchable) Memory Range: 0xe0000000-0xefffffff (rw,prefetchable) Memory Range: 0xf5000000-0xf5ffffff (rw,non-prefetchable) I/O Ports: 0x7000-0x7fff (rw) Memory Range: 0xf6000000-0xf601ffff (ro,prefetchable,disabled) IRQ: 10 (no events) I/O Ports: 0x3c0-0x3df (rw) Module Alias: "pci:v000010DEd00000391sv00001458sd00003417bc03sc00i00" Driver Info #0: XFree86 v4 Server Module: nv Driver Info #1: XFree86 v4 Server Module: nvidia 3D Support: yes Config Status: cfg=no, avail=yes, need=no, active=unknown Attached to: #10 (PCI bridge) Primary display adapter: #27 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=348719 User jensseidel@users.sf.net added comment https://bugzilla.novell.com/show_bug.cgi?id=348719#c1 --- Comment #1 from Jens Seidel <jensseidel@users.sf.net> 2007-12-14 05:47:02 MST --- Created an attachment (id=187632) --> (https://bugzilla.novell.com/attachment.cgi?id=187632) Xorg config Added Xorg config file -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=348719 User sndirsch@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=348719#c2 Stefan Dirsch <sndirsch@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|sndirsch@novell.com |eich@novell.com --- Comment #2 from Stefan Dirsch <sndirsch@novell.com> 2007-12-14 07:02:54 MST --- Egbert, do you have a standard text for this? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=348719 User eich@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=348719#c3 Egbert Eich <eich@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO Info Provider| |jensseidel@users.sf.net --- Comment #3 from Egbert Eich <eich@novell.com> 2008-03-31 12:02:33 MST --- Stefan, did we have any other reports like that? To trace it we would have to be able to reproduce it. Jens, do you still get this? So is this reproducible for you? I don't think it is the driver (especially not the nv driver as drivers usually don't allocate anything at runtime). Have you tried with a different driver (ie fbdev)? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=348719 User jensseidel@users.sf.net added comment https://bugzilla.novell.com/show_bug.cgi?id=348719#c7 Jens Seidel <jensseidel@users.sf.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jensseidel@users.sf.net --- Comment #7 from Jens Seidel <jensseidel@users.sf.net> 2008-04-01 07:58:29 MST --- (In reply to comment #3 from Egbert Eich)
Jens, do you still get this?
No, current uptime is 31 days and top reports: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 3789 root 15 0 9982m 879m 10m S 0 12.5 58:43.67 Xorg Nevertheless it was in the past reproducable. What changed? Two things: * I applied security updates * I updated Xen from 3.0 to 3.2 $ rpm -q xorg-x11-server xorg-x11-driver-video xorg-x11-server-7.2-30.13 (old version was 30.8) xorg-x11-driver-video-7.2-33 (not changed) $ uname -a Linux imkf-pc073 2.6.18.8-xen #1 SMP Fri Jan 25 09:16:47 CET 2008 x86_64 x86_64 x86_64 GNU/Linux
I don't think it is the driver (especially not the nv driver as drivers usually don't allocate anything at runtime).
OK, it was just a wild guess. But please tell me (and all other person who find this bug later on) what could be the reason? Is the X.org server the only possible reason? Why are others not affected? What diagnostic to you prefer additionally for the next time?
Have you tried with a different driver (ie fbdev)?
No. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=348719 Stefan Dirsch <sndirsch@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |ASSIGNED Info Provider|jensseidel@users.sf.net | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=348719 User eich@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=348719#c8 --- Comment #8 from Egbert Eich <eich@novell.com> 2008-04-01 09:03:42 MST --- Sebastian, I have no idea why this was getting so out of hand in your case. In most other cases it can be attributed to clients allocating pixmaps on the server which they don't release. Some huge numbers also result from mapped memory which is either framebuffer or some memory address space. But you said that memory consumption in was increasing in your case. This is certainly a scenario which we don't see reported too often. The only to debug this I can presently think of would be a memory debugger. The server itself doesn't contain such a thing any more so you would have to resort to whatever is in glibc or some other tool library you can preload. This will however require that you terminate your server - and after a restart things may be quite different already. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=348719 User jensseidel@users.sf.net added comment https://bugzilla.novell.com/show_bug.cgi?id=348719#c9 --- Comment #9 from Jens Seidel <jensseidel@users.sf.net> 2008-04-01 09:56:51 MST --- (In reply to comment #8 from Egbert Eich)
I have no idea why this was getting so out of hand in your case.
Heh, I think I found it! Whenever I start and exit a special Motif application (non free) the memory increases by approximately 10MB. I did it 100 times in a loop and got: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 3789 root 15 0 11.9g 2.0g 10m S 0 28.6 61:06.52 Xorg The 2 GB values doubled it's size from initial 0.8GB! But it is still an Xorg bug as the memory should be freed once the applications ends, right? The program itself initializes menus, allocates a few strings (probably without freeing with XmStringFree), a larger pixmap and initializes OpenGL (Mesa-6.5.1-23) without using it much in my case.
In most other cases it can be attributed to clients allocating pixmaps on the server which they don't release.
Shouldn't xrestop show this? Are there other tools?
The only to debug this I can presently think of would be a memory debugger.
Such as valgrind :-)) OK, now it is at least reproducable for me. There should exist also a few faster memory checkers.
This will however require that you terminate your server.
That's no problem for me. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=348719 User jensseidel@users.sf.net added comment https://bugzilla.novell.com/show_bug.cgi?id=348719#c10 --- Comment #10 from Jens Seidel <jensseidel@users.sf.net> 2008-04-02 08:09:25 MST --- OK, try the following program: #include <GL/glut.h> int main(int argc, char *argv[]) { glutInit(&argc, argv); glutInitWindowSize(1024, 768); int windows = glutCreateWindow("Hello World"); // glutMainLoop(); glutDestroyWindow(windows); return 0; } Once I start it in a loop (say 15 iterations) I see the virtual memory increasing by approximately 150 MB. Any hint? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=348719 User sndirsch@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=348719#c11 --- Comment #11 from Stefan Dirsch <sndirsch@novell.com> 2008-04-02 10:03:16 MST --- I cannot reproduce this with another driver, which doesn't support DRI (radeonhd). BTW, I'm getting this one: freeglut (./glut): Unable to create direct context rendering for window 'Hello World' This may hurt performance. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=348719 User eich@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=348719#c12 --- Comment #12 from Egbert Eich <eich@novell.com> 2008-04-09 17:22:15 MST --- The nv driver doesn't use DRI either. I did the same test and didn't see the memory consumption being increased either. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=348719 User eich@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=348719#c13 --- Comment #13 from Egbert Eich <eich@novell.com> 2008-04-09 17:26:13 MST --- OK, I can see it when I run it in an endless loop. Will investigate. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=348719 Stefan Dirsch <sndirsch@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|Normal |Minor Priority|P5 - None |P4 - Low -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com