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

Don't use zlib for pickle storage/persistance #71

Open
Fitblip opened this issue Nov 17, 2014 · 4 comments
Open

Don't use zlib for pickle storage/persistance #71

Fitblip opened this issue Nov 17, 2014 · 4 comments

Comments

@Fitblip
Copy link
Member

Fitblip commented Nov 17, 2014

Apparently on 32-bit python it has a 2GB limit for un-compressed data going in. That sucks.

joblib/joblib#122

@AsmaeBni
Copy link

I have an out of memory issue when sulley generates more than 20 000 test cases, this was fixed by using this line of code in sessions.py line 356 :

++ fh.write(zlib.compress(cPickle.dumps(data, protocol=cPickle.HIGHEST_PROTOCOL)))
-- fh.write(zlib.compress(cPickle.dumps(data, protocol=2)))

works like a charm!

@jtpereyda
Copy link
Contributor

@AsmaeBni What system are you running on?

Do you know why this works? The docs say that protocol 2 is the highest protocol, so I'm a little confused on why that would fix it. https://docs.python.org/2/library/pickle.html

@AsmaeBni
Copy link

I am running on Windows 7 x64, I have actually tried with 2 but still got out of memory issues but with the suggested fix things run smoothly!

@jtpereyda
Copy link
Contributor

@AsmaeBni I've got a couple requests

  • What's your Python version?

  • Can you provide your fuzzing script so we can see the issue?

  • Also, use interactive Python on your system to see what cPickle.HIGHEST_PROTOCOL is defined as. On my system, it is 2:

    $ python
    Python 2.7.10 (default, Jun  1 2015, 18:05:38)
    [GCC 4.9.2] on cygwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import cPickle
    >>> cPickle.HIGHEST_PROTOCOL
    2
    >>>
    

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

No branches or pull requests

3 participants