Giter Club home page Giter Club logo

Comments (12)

mattharrison avatar mattharrison commented on May 10, 2024

A little more investigation. By just running ps aux |grep qtile I can watch qtile grow by about 4 bytes/sec. So I disabled the charts (CPU/etc) and ran a Xephyr instance. It remained constant while the instance with the charts continued to grow.

I guess I'm at ~124Megs after 18 hours.

from qtile.

cortesi avatar cortesi commented on May 10, 2024

I'm on the trail of a similar leak. I'm not seeing a gradual growth in memory usage, but every now and agian, I come down in the morning to find qtile has grown to about a gig. My gut feeling is that this is a leak in an underlying library, which is going to make it a bugger to track down.

from qtile.

mattharrison avatar mattharrison commented on May 10, 2024

I'm assuming that the culprit may be cairo/pycairo then? I haven't looked into either. Is upstream responsive? Are there tests to run valgrind against cairo?

from qtile.

cortesi avatar cortesi commented on May 10, 2024

Yes, I think cairo/pycairo is the likely culprit if the problem is definitely related to the graph wigets. I haven't gone to the effort to run valgrind against cairo, so I'm not sure. Sigh, I guess it's going to be necessary to do this if we can't find the problem by carefully eliminating calls.

from qtile.

mattharrison avatar mattharrison commented on May 10, 2024

I'm still seeing ~4b/sec when I have charts enabled and no growth when they are disabled.

I tried to see if I could get a simple testcase to replicate here:

https://gist.github.com/727312

This just draws directly to the context and bypasses the drawer layer. It tries to chart a bunch of points, but it is NOT exhibiting memory growth. Note that some of the drawer methods are missing. Perhaps the drawer layer is where the leaking is occurring?

from qtile.

mattharrison avatar mattharrison commented on May 10, 2024

Also tried the following. Though it grew in memory while running, it didn't report orphaned python objects very often. So I'm assuming the Python side is behaving ok.

https://gist.github.com/734308

from qtile.

tailhook avatar tailhook commented on May 10, 2024

I've investigated this some time ago, and IIRC it's memory leak in xpyb library. And I've stopped at attempts to guess what xpyb is newest and right one to use :) I'll give a try once more later.

from qtile.

mattharrison avatar mattharrison commented on May 10, 2024

Other reports of pycairo memory chomping...
http://dotsony.blogspot.com/2011/06/calendar-update-part-ii-after-release.html

from qtile.

tailhook avatar tailhook commented on May 10, 2024

@mattharrison, this particular memory leak was fixed in qtile by making textlayout kinda singleton. I'm still sure it was xpyb leak in my case.

from qtile.

tailhook avatar tailhook commented on May 10, 2024

I've tracked down minimal testcase for memory leak in xpyb. Here is a bug with a testcase:

https://github.com/dequis/xpyb-ng/issues/5

BTW, Are these recomended bindings?

from qtile.

tych0 avatar tych0 commented on May 10, 2024

Hi all,

I believe upstream has fixed this issue. I've merged their work into xpyb-ng and posted it here: https://github.com/tych0/xpyb-ng

I'll try and get some if this stuff into xpyb-ng on the qtile org soon, but for now that repo should work and doesn't leak nearly as fast (although it seems like it still leaks, unfortunately...).

from qtile.

mattharrison avatar mattharrison commented on May 10, 2024

Can we make sure that @dmpayton's docs are updated to work with this?

from qtile.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.