Opened 5 years ago

Closed 5 years ago

Last modified 22 months ago

#10547 closed (fixed)

Delayed Loading Model Update Causes Recursive Errors

Reported by: megaman821@… Owned by: mtredinnick
Component: Database layer (models, ORM) Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description (last modified by Alex)

I don't really have much insight to this right now but here is the stack trace.

File "/var/www/next_django/apps/django/core/cache/backends/" in set
  71.             pickle.dump(value, f, pickle.HIGHEST_PROTOCOL)
File "/var/www/next_django/apps/django/db/models/" in __reduce__
  352.             return super(Model, self).__reduce__()
File "/var/www/next_django/apps/django/db/models/" in __reduce__
  352.             return super(Model, self).__reduce__()
File "/var/www/next_django/apps/django/db/models/" in __reduce__
  352.             return super(Model, self).__reduce__()
File "/var/www/next_django/apps/django/db/models/" in __reduce__

Attachments (0)

Change History (7)

comment:1 Changed 5 years ago by Alex

  • Description modified (diff)
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Fixed formatting. What is it you're trying to do that causes this error?

comment:2 Changed 5 years ago by megaman821@…

I am running a stachmo store. One of the satchmo apps is called keyedcache eventually makes a call to cache.set(key, val, length) which sets off this whole chain.

comment:3 Changed 5 years ago by megaman821@…

Also of note this error happened on Python 2.4

comment:4 Changed 5 years ago by mtredinnick

  • Triage Stage changed from Unreviewed to Accepted

Somebody's going to have to work out a slightly smaller example than "it happens somewhere in satchmo doing something unspecified". I can't see why recursive calls to __reduce__() should be happening, so I'm going to need a repeatable case to debug this.

comment:5 Changed 5 years ago by mtredinnick

  • Owner changed from nobody to mtredinnick
  • Status changed from new to assigned

Ok, I've managed to replicate this now (the test suite does it, in fact) using Python 2.4.

comment:6 Changed 5 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [10099]) Fixed #10547 -- Worked around some odd behaviour in Python 2.3 and 2.4.

Calling the super() version of reduce in Model.reduce led to infinite
loops in Python prior to 2.5. We don't do that any longer.

comment:7 Changed 22 months ago by Claude Paroz <claude@…>

In [146aff3bac974e56ec8cb597c2720d1cd4f77b26]:

Fixed #18590 - Reverted Python 2.4 workaround for Model pickling

Revert of 08d521efa0. Refs #10547, #12121.
Thanks Michal Petrucha for the report.

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.