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

The cryptography version of message verification leaks memory #475

Closed
jeremycline opened this issue Aug 31, 2017 · 2 comments
Closed

The cryptography version of message verification leaks memory #475

jeremycline opened this issue Aug 31, 2017 · 2 comments
Labels

Comments

@jeremycline
Copy link
Member

It appears that the cryptography+pyOpenSSL version of the message verification leaks memory in conjunction with the consumer model of subscribing to messages. To reproduce:

from fedmsg.consumers import FedmsgConsumer


class Consumer(FedmsgConsumer):

    validate_signatures = True
    config_key = 'demo_consumer'

    def consume(self, message):
        print(message)

And then make a setup.py and package for the entry point:

from setuptools import setup, find_packages

setup(
    name='demo',
    version='0.1.0',
    license='GPLv2+',
    packages=find_packages(),
    install_requires=['fedmsg'],
    entry_points={
        'moksha.consumer': (
            'demo_consumer = demo:Consumer',
        ),
    }
)

Start fedmsg-hub (configured to start that consumer) and watch the memory slowly grow. You'll also need to install cryptography and pyOpenSSL.

@jeremycline
Copy link
Member Author

This ended up being two separate memory leaks in pyOpenSSL. I've submitted pyca/pyopenssl#690 and pyca/pyopenssl#691 and once issues are fixed upstream I'll see about getting them into F25+ packages.

@abompard
Copy link
Member

abompard commented Sep 8, 2017

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants