Wednesday, April 13, 2005

Eclipse, KDE and X

I'm didn't bother digging deep enough in this to find a solution, but here's the problem I was seeing:

Over time, I would run out of memory. Swap space would fill up, my box would crawl, and I'd have to restart things. To be precise, the first time it happened, I started shutting things down, assuming that I'd get my memory back. Turns out, I shut down all my apps, and still I was mostly hosed. I looked at 'top', and my X process was taking up close to 1GB of physical and swap space. Logging out and back in took care of it.

When I first started my new job, this wasn't an issue, but I wasn't aware of what I was doing differently. I suspected Eclipse, but wasn't sure. I went through a few cycles of this, each taking between a few days and a week or so. Then I went a couple of weeks with no real problems, and started thinking about what I was doing. The biggest change I had made was doing CVS work from the command line, rather than from within Eclipse.

So I went back to Eclipse, and started poking around in the CVS perspective. Sure enough, when I did a file compare, my X process would grow by 5MB, and never shrink back. I sat there and chewed up 150MB in about 20 minutes of back-and-forth clicking. It seemed like a resource leak moreso than a memory leak, since it wasn't the Eclipse process that grew.

Others in the office were seeing this as well, so I sent out an email. One coworker sent back that he wasn't having this problem, despite doing all his CVSing from within Eclipse. The common denominator between those of us who were seeing this problem was that we were all using KDE and running Eclipse. (Others using KDE but not Eclipse didn't seem to have such problems either.)

The coworker who wasn't having problems was using windowmaker for his window manager. I sat and watched him go through all of the gyrations I did, but X just sat there.

So I switched to Fluxbox. (I use that at home, and love the lightweightness of it.) Since then, I'm back to doing about half my CVSing in Eclipse, (and half on the cmdline), and my memory use has been fairly stable.

I suspect that Eclipse and KDE have bugs that hold hands in this instance. Again, I haven't really investigated this, or searched Eclipse or KDE forums, or anything, but wanted to at least record my findings before I get back to work.


Post a Comment

<< Home