This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: memory leak in pickle/cPickle [2.2.3]
Type: Stage:
Components: Library (Lib) Versions: Python 2.2
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, mikemccand
Priority: normal Keywords:

Created on 2003-07-14 15:07 by mikemccand, last changed 2022-04-10 16:09 by admin. This issue is now closed.

Messages (2)
msg17053 - (view) Author: Michael McCandless (mikemccand) Date: 2003-07-14 15:07
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.
msg17054 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2005-06-01 11:36
Logged In: YES 
user_id=1188172

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

Closing as Out of Date.
History
Date User Action Args
2022-04-10 16:09:57adminsetgithub: 38849
2003-07-14 15:07:10mikemccandcreate