nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   188.16 - Memory leak and gaphical "corruption" (http://www.nvnews.net/vbulletin/showthread.php?t=124940)

Tomasu 12-18-08 04:11 PM

188.16 - Memory leak and gaphical "corruption"
 
I've got the latest beta installed with my 8800GTS 320MB card, and see some pretty large memory leaks. Plasma eats up over 1.3GB of pixmap cache at some points, and I have to kill X to get it to release the memory (kde restart doesn't help).

In addition to that, Even with an X restart, I have continual problems with windows either opening blank or rendering once, and not updating again till I resize them, sometimes they will only update once every resize, sometimes the resize makes them update normally again. It does not effect the apps input or anything, apps still recognize input and run properly, except the content they are drawing isn't showing up. In order to fix THIS problem I need to reboot.

If it helps this is my xorg.conf config:

Code:

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 1.0  (buildmeister@builder57)  Sat Nov  8 12:48:43 PST 2008


Section "ServerLayout"
    Identifier    "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "Module"
    Load          "dbe"
    Load          "extmod"
    Load          "type1"
    Load          "freetype"
    Load          "glx"
EndSection

Section "InputDevice"

    # generated from default
    Identifier    "Mouse0"
    Driver        "mouse"
    Option        "Protocol" "auto"
    Option        "Device" "/dev/psaux"
    Option        "Emulate3Buttons" "no"
    Option        "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"

    # generated from default
    Identifier    "Keyboard0"
    Driver        "kbd"
EndSection

Section "Monitor"
    Identifier    "Monitor0"
    VendorName    "Unknown"
    ModelName      "Unknown"
    HorizSync      28.0 - 33.0
    VertRefresh    43.0 - 72.0
    Option        "DPMS"
EndSection

Section "Device"
    Identifier    "Device0"
    Driver        "nvidia"
    VendorName    "NVIDIA Corporation"
EndSection

Section "Screen"
    Identifier    "Screen0"
    Device        "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option        "RenderAccel" "True"
    Option        "TwinView" "True"
    Option        "NoTwinViewXineramaInfo" "False"
    Option        "UseEvents" "True"
    Option        "MetaModes" "1600x1200 +1600+0, 1600x1200 +0+0"
    Option        "TwinViewXineramaInfoOrder" "CRT-0,CRT-1"
    SubSection    "Display"
        Virtual    3200 1200
        Depth      24
    EndSubSection
EndSection

I recently upgraded to 4G ram to get around this issue, but it seems the leak creeps up faster than I anticipated, only took a few days from a fresh boot to apps randomly dying when they try and open new windows (normal windows as well as tooltips and menus).

If theres anything I can do to help find the cause, let me know, its REALLY annoying.

Plagman 12-18-08 04:19 PM

Re: 188.16 - Memory leak and gaphical "corruption"
 
What makes you think plasma is eating 1.3 gigs of pixmap cache? Can you post the relevant command output/system monitor screenshot?

The second issue sounds like the general race condition problem between OpenGL and DAMAGE events. Do you still see any "corruption" if you totally disable desktop effects?

Tomasu 12-18-08 04:20 PM

Re: 188.16 - Memory leak and gaphical "corruption"
 
Heres my log file as well: http://strangesoft.net/Xorg.0.log

Also, the "windows stop updating" issue starts off with maximized windows, and the only way to get them updating again is to shrink them down in size till they start updating normally. Eventually it starts happening to smaller and smaller windows, eventually leading to app crashes when even small/tiny windows can't (i assume) get any pixmaps.

Tomasu 12-18-08 04:24 PM

Re: 188.16 - Memory leak and gaphical "corruption"
 
Quote:

Originally Posted by Plagman (Post 1879395)
What makes you think plasma is eating 1.3 gigs of pixmap cache? Can you post the relevant command output/system monitor screenshot?

The second issue sounds like the general race condition problem between OpenGL and DAMAGE events. Do you still see any "corruption" if you totally disable desktop effects?

output from xrestop and top last night:
1c00000 31 1 0 1611 1389 1265573K 33K 1265606K 29771 Qt-subapplication
29771 moose 20 0 533m 275m 34m S 1 6.8 95:07.35 plasma

I can try and see if I get any of the strange drawing without desktop effects.. But It seems to me as if its a leak rather than just a race, as it gets steadily worse overtime as more and more memory is consumed by X. Eventually leading to even small windows not updating, and even lead to apps crashing when they attempt to show a new window, no matter how small.

Plagman 12-18-08 04:35 PM

Re: 188.16 - Memory leak and gaphical "corruption"
 
Your log indicates you're running 180.11 and not .16.
If the driver was leaking pixmap cache, the memory usage wouldn't be in the client application. At first glance, it looks like the abnormal memory usage is caused by a bug in plasma.
What happens to the memory usage of plasma if you VT-switch out and back in the X server?

Tomasu 12-18-08 04:58 PM

Re: 188.16 - Memory leak and gaphical "corruption"
 
Quote:

Originally Posted by Plagman (Post 1879415)
Your log indicates you're running 180.11 and not .16.
If the driver was leaking pixmap cache, the memory usage wouldn't be in the client application. At first glance, it looks like the abnormal memory usage is caused by a bug in plasma.
What happens to the memory usage of plasma if you VT-switch out and back in the X server?

Huh, I know I upgraded. I guess I'll reinstall .16 after kde is done updating.

Actual memory useage for plasma doesn't change, but pixmap mem does a little, started with 562 pixmaps, 623 "misc" and 217449K pxm mem, after switch back it changed to 475 pixmaps, 536 misc, and 217133K pxm mem.

While no doubt some of the problem lies with plasma, they can't find it, and the largest leak reports seem to be common with the nvidia binary driver only. Not to mention the fact that I need to reboot to get all of my memory back and to get the desktop working properly again.

nevion 12-18-08 05:58 PM

Re: 188.16 - Memory leak and gaphical "corruption"
 
I've had plasma bleed sometimes in the past but not recently really - try the kde 4.2 beta if you can as it seemed to work fairly well with the 180 series of drivers with the exception of unexplained (but probably slower) xorg leaks.

But before that, you mentioned restarting kde gets you no where. So if you do
kquitapp plasma
Does the memory get free'd under xrestop? Does the plasma entry at least go away? If it doesn't restart automatically.
plasma
in the terminal afterwords.

I was able to get back my memory from plasma when I restarted it although it was a slow and annoying process. But at least its not a full desktop restart. Additionally, since the client memory is tracked from xorg it should free it when plasma dies.

Tomasu 12-18-08 06:06 PM

Re: 188.16 - Memory leak and gaphical "corruption"
 
Quote:

Originally Posted by nevion (Post 1879524)
I've had plasma bleed sometimes in the past but not recently really - try the kde 4.2 beta if you can as it seemed to work fairly well with the 180 series of drivers with the exception of unexplained (but probably slower) xorg leaks.

But before that, you mentioned restarting kde gets you no where. So if you do
kquitapp plasma
Does the memory get free'd under xrestop? Does the plasma entry at least go away? If it doesn't restart automatically.
plasma
in the terminal afterwords.

I was able to get back my memory from plasma when I restarted it although it was a slow and annoying process. But at least its not a full desktop restart. Additionally, since the client memory is tracked from xorg it should free it when plasma dies.

I get most of the physical memory back, but the problems that seemed to be caused by the insane pixmap usage didn't go away.

Should have mentioned I've been using kde from svn since 4.1 was released. Which means I've been using 4.2 since then as well.

Tomasu 12-18-08 08:13 PM

Re: 188.16 - Memory leak and gaphical "corruption"
 
Ok, so some news, after running with a fresh svn checkout of kde 4.2, and (for
sure this time) the 180.16 drivers, plasma is up to 105MB of pixmaps. Its
slightly strange too, it only started increasing after I stopped playing with
things trying to get it to allocate more memory.

I've just did a little silly test of recording X memory use in various stages of X and kde restart

Code:

              Virt  Res  Shr
Full Dekstop: 629M  318M  9336
Loged out:    201M  131M  7728
X Restarted:  123M  54M  7504
Full Desktop: 496M  195M  7856

Clearly it looks like X isn't freeing some of the ram, though most of it is gone.

I'll be testing with the open source nv driver next to see if it also shows leaks, and if they are as bad, well its most likely plasma's fault.

Tomasu 12-18-08 10:22 PM

Re: 188.16 - Memory leak and gaphical "corruption"
 
Quote:

Originally Posted by Tomasu (Post 1879672)
Ok, so some news, after running with a fresh svn checkout of kde 4.2, and (for
sure this time) the 180.16 drivers, plasma is up to 105MB of pixmaps. Its
slightly strange too, it only started increasing after I stopped playing with
things trying to get it to allocate more memory.

I've just did a little silly test of recording X memory use in various stages of X and kde restart

Code:

              Virt  Res  Shr
Full Dekstop: 629M  318M  9336
Loged out:    201M  131M  7728
X Restarted:  123M  54M  7504
Full Desktop: 496M  195M  7856

Clearly it looks like X isn't freeing some of the ram, though most of it is gone.

I'll be testing with the open source nv driver next to see if it also shows leaks, and if they are as bad, well its most likely plasma's fault.

So far with the nv driver, X uses considerably more memory on startup than it does with the nvidia driver.

nvidia: 123M 54M 7504 (yes I cloned those numbers from above)
nv: 740M 463M 6340

But I haven't seen any leak from plasma after letting it sit for an hour or two, while I did see a leak with the nvidia driver. I forgot however to check if X's own memory usage increased or not. So I'm trying again.

Interesting note, I tried to restart X while the nv driver is loaded, and X wouldn't quit short of a saK command in a VT, and even then my consoles were messed up and no foreground colors were visible, so I had to reboot.

Now I'm going to let it sit for an hour (again) or so and see if memory usage increases much like it did with the nvidia driver (in plasma or X).

Tomasu 12-18-08 11:40 PM

Re: 188.16 - Memory leak and gaphical "corruption"
 
No noticeable leaks in the same time frame with the nv driver.

I can't see it being a plasma leak now. Plasma doesn't have special code depending on which driver is in use. All it does is enable or disable RGBA visuals depending on the availability of XRender or Compositing support. And for this last test I've had XRender effects enabled. So I've been using the same code paths in plasma for all of my tests.

Plagman 12-19-08 06:08 AM

Re: 188.16 - Memory leak and gaphical "corruption"
 
Can you confirm it leaks as well if you disable GLX in xorg.conf?


All times are GMT -5. The time now is 01:24 PM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.