Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak in server #83

Open
sattlma opened this issue Dec 6, 2018 · 3 comments
Open

Memory leak in server #83

sattlma opened this issue Dec 6, 2018 · 3 comments

Comments

@sattlma
Copy link

sattlma commented Dec 6, 2018

Hi,

when I start the a simple pair of client and server application, the used memory of the server application is rising quickly. The example is derived from the supplied "clientserver" example.

The test() method on the com.test service is called by the client via D-Bus repeatedly.

class TestObject(object):
    """
        <node>
            <interface name='com.test'>
                <method name='test'>
                    <arg type='u' name='response' direction='out'/>
                </method>                
            </interface>
        </node>
    """
    def __init__(self, loop):
        self.loop = loop
    
    def test(self):
        #print("test")
        return 42;

if (__name__ == '__main__'):
    loop = GLib.MainLoop()
    bus = SessionBus()
    bus.publish("com.test", TestObject(loop)
    )
    loop.run()

memtest.zip

Greetings,
Matthias

@rogerlucas-veea
Copy link

rogerlucas-veea commented Mar 2, 2019

@sattlma I can confirm that the above problem exists, but it doesn't appear on all systems. The above test code doesn't leak on Ubuntu 16.04 or Devuan ASCII (x86 architecture + python3 + default system packages and pydbus installed from pip3) but it does occur (and leaks very badly) on an arm64 embedded system running Alpine 3.8.
Can you provide more information about the system that you have found the issue on?

@rogerlucas-veea
Copy link

@sattlma I've been digging further on this. I've also reproduced the issue on Alpine v3.8 on x86_64. The leak disappears if py3-gobject3 is downgraded to v3.24.1. If py3-gobject3 is v3.25.1 or later, the leak appears. Unfortunately, there are no releases between these two releases (https://pygobject.readthedocs.io/en/latest/changelog.html).

@rogerlucas-veea
Copy link

JakoobCZ pushed a commit to prusa3d/Prusa-Firmware-SL1 that referenced this issue Dec 10, 2019
- Fixes glib interoperability with pygobject
- Can cause trouble in future
- See: LEW21/pydbus#83
- See: https://gitlab.gnome.org/GNOME/pygobject/issues/307
filipkotoucek pushed a commit to prusa3d/Prusa-Firmware-SL1 that referenced this issue Jun 6, 2024
- Fixes glib interoperability with pygobject
- Can cause trouble in future
- See: LEW21/pydbus#83
- See: https://gitlab.gnome.org/GNOME/pygobject/issues/307
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants