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 pickle/cPickle [2.2.3] #38849

Closed
mikemccand mannequin opened this issue Jul 14, 2003 · 2 comments
Closed

memory leak in pickle/cPickle [2.2.3] #38849

mikemccand mannequin opened this issue Jul 14, 2003 · 2 comments
Labels
stdlib Python modules in the Lib dir

Comments

@mikemccand
Copy link
Mannequin

mikemccand mannequin commented Jul 14, 2003

BPO 770997
Nosy @birkenfeld

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2005-06-01.11:36:55.000>
created_at = <Date 2003-07-14.15:07:10.000>
labels = ['library']
title = 'memory leak in pickle/cPickle [2.2.3]'
updated_at = <Date 2005-06-01.11:36:55.000>
user = 'https://bugs.python.org/mikemccand'

bugs.python.org fields:

activity = <Date 2005-06-01.11:36:55.000>
actor = 'georg.brandl'
assignee = 'none'
closed = True
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2003-07-14.15:07:10.000>
creator = 'mikemccand'
dependencies = []
files = []
hgrepos = []
issue_num = 770997
keywords = []
message_count = 2.0
messages = ['17053', '17054']
nosy_count = 2.0
nosy_names = ['georg.brandl', 'mikemccand']
pr_nums = []
priority = 'normal'
resolution = 'out of date'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue770997'
versions = ['Python 2.2']

@mikemccand
Copy link
Mannequin Author

mikemccand mannequin commented Jul 14, 2003

Smallest case I could come up with:

  import cPickle
  import random
 
  while 1:
    s = str(random.randint(1000000, 9999999))
    a = cPickle.dumps(s)
    cPickle.loads(a)

The leak happens in these cases:

  • Python 2.2.2 on FreeBSD 5.0.

  • Python 2.2.3 on WinXP.

  • Whether you use pickle or cPickle.

The leak does NOT happen:

  • With Python 2.3b2 on FreeBSD 5.0 (maybe
    this is a dup of a bug fixed on 2.3b2 --
    can we back-port the fix?)

  • If you use binary pickling (change to
    "a = cPickle.dumps(s, 1)" instead).

  • If you only call "dumps" or only call "loads";
    somehow, it takes both to leak.

@mikemccand mikemccand mannequin closed this as completed Jul 14, 2003
@mikemccand mikemccand mannequin added the stdlib Python modules in the Lib dir label Jul 14, 2003
@mikemccand mikemccand mannequin closed this as completed Jul 14, 2003
@mikemccand mikemccand mannequin added the stdlib Python modules in the Lib dir label Jul 14, 2003
@birkenfeld
Copy link
Member

Logged In: YES
user_id=1188172

Doesn't seem to occur in 2.3.5, or 2.4.1.

Closing as Out of Date.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir
Projects
None yet
Development

No branches or pull requests

1 participant