Showing posts with label kwin. Show all posts
Showing posts with label kwin. Show all posts

Monday, July 13, 2009

kwin memory leak confirmed?

I think it's pretty much confirmed that my problem is indeed due to a memory leak in kwin. I've been running a cron job every minute to gather memory usage information on kwin. The result:



(this is from the RSS field generated by the command "ps v --no-heading -C kwin"* command)

Each instance where the trace maxes out then drops down again is a time when I started getting the problem and restarted kwin. The flat spots are nights and weekends when I'm not using the computer.

Now, what to do about it? I guess I should report a bug. This is Kubuntu 8.04, so it's a little out of date, but it's an LTS release.


*I am amused by having mixed all three styles of command-line arguments in that ps command.

Monday, June 8, 2009

kwin it is!

"Next time" for this problem arrived rather quickly. kwin started spewing errors almost nonstop, like
kwin: (0x40d6b527): RenderBadPicture (invalid Picture parameter)
kwin: (0xcd613f): BadMatch (invalid parameter attributes)
kwin: (0x40d6b526): RenderBadPicture (invalid Picture parameter)
kwin: X_FreePixmap(0x40d6b527): BadPixmap (invalid Pixmap parameter)
kwin: (0xcd614d): BadMatch (invalid parameter attributes)
kwin: (0x40d6b526): RenderBadPicture (invalid Picture parameter)
kwin: X_PutImage(0x40d6b532): BadMatch (invalid parameter attributes)
kwin: X_FreeGC(0x40d6b520): BadGC (invalid GC parameter)
kwin: (0xcd639c): BadMatch (invalid parameter attributes)
kwin: (0x40d6b520): RenderBadPicture (invalid Picture parameter)
kwin: (0xcd6414): BadMatch (invalid parameter attributes)
kwin: (0x40d6b52e): RenderBadPicture (invalid Picture parameter)
kwin: (0x40d6b520): BadDrawable (invalid Pixmap or Window parameter)
kwin: (0xcd641e): RenderBadPicture (invalid Picture parameter)
kwin: (0xcd641e): RenderBadPicture (invalid Picture parameter)
kwin: X_FreePixmap(0x40d6b520): BadPixmap (invalid Pixmap parameter)
kwin: X_FreeGC(0x40d6ad33): BadGC (invalid GC parameter)
kwin: X_FreeGC(0x40d6ad38): BadGC (invalid GC parameter)

And then the garbage window decorations reappeared. Killed and started kwin and the problem goes away!

Info:
% kwin -v
Qt: 3.3.8b
KDE: 3.5.10
KWin: 3.0

Kubuntu package: 4:3.5.10-0ubuntu1~hardy2

The memory use monitoring was inconclusive because I started it only a couple of hours before this "reset". Continuing to gather statistics.

kwin the culprit?

I think I have localized the source of my display woes. Noting that the problem manifests in part as garbage in the window decorations, I thought of kwin, the window manager, which to the best of my knowledge is responsible for managing window decorations. Last time the problem occurred, I killed kwin and started a new one. That did indeed clear the problem, so I just had to wait and see how long the fix would last.

It's now been several days! That is longer than I've ever managed to recover before. I think this might be it. I'm monitoring the memory usage of kwin now to see if I can blame a memory leak. It sure has that feel about it.

As an aside, it was amusing to try to restart kwin after killing it. Killing it took away the ability to switch the window focus, which was not in a terminal! I ended up having to use the mouse to copy and paste individual characters k w i n into a shell. Next time I'll set it up beforehand.