[ZODB-Dev] cPickleCache: "Cache values may only be in one cache" error

Andreas Jung lists at andreas-jung.com
Fri Jan 23 14:36:17 EST 2004



--On Freitag, 23. Januar 2004 14:27 Uhr -0500 Jeremy Hylton 
<jeremy at zope.com> wrote:

>
> I can only give you a useless answer:  You're getting the
> error because an object loaded from one cache is being
> insert into another cache.  It should be really hard to do
> that.  Do you have a traceback?  Or several?

here are some TBs:

Time  	2004/01/23 20:03:45.146 GMT+1
User Name (User Id) 	admin (admin)
Request URL 
	http://yetix:8080/plone/ImagedPage.2004-01-23.8436238428%20/base_metadata
Exception Type 	ValueError
Exception Value 	Cache values may only be in one cache.

Traceback (innermost last):

    * Module ZPublisher.Publish, line 104, in publish
    * Module Zope.App.startup, line 221, in commit
    * Module ZODB.Transaction, line 233, in commit
    * Module ZODB.Transaction, line 348, in _commit_objects
    * Module ZODB.Connection, line 425, in commit
      __traceback_info__: (('BTrees.OOBTree', 'OOBTree'), 
'\x00\x00\x00\x00\x00\x00\x00\x1b', '')

ValueError: Cache values may only be in one cache.



Time  	2004/01/23 20:03:45.146 GMT+1
User Name (User Id) 	admin (admin)
Request URL 
	http://yetix:8080/plone/ImagedPage.2004-01-23.8436238428%20/base_metadata
Exception Type 	ValueError
Exception Value 	Cache values may only be in one cache.

Traceback (innermost last):

    * Module ZPublisher.Publish, line 104, in publish
    * Module Zope.App.startup, line 221, in commit
    * Module ZODB.Transaction, line 233, in commit
    * Module ZODB.Transaction, line 348, in _commit_objects
    * Module ZODB.Connection, line 425, in commit
      __traceback_info__: (('BTrees.OOBTree', 'OOBTree'), 
'\x00\x00\x00\x00\x00\x00\x00\x1b', '')

ValueError: Cache values may only be in one cache.

>
> It would be interesting to know if both caches were
> associated with the same Connection.  Perhaps the cache is
> reset, _resetCache() method, but an object is still fetched
> from the old cache.  Then the exception would be raised
> when it's added to the new cache.  Again, I don't see how
> that would be possible given the current code.
>
> Is it possible that multiple threads are interacting with
> the same Connection?  Or that some application code grabs
> _p_jar and attempts to use it across Zope requests?  Then
> you'd have two different Connection objects associated with
> a single thread.
>

The application is quite simple. A stupid Zope 2.7 + CMF 1.4.2
+ Plone 2 + Archetypes 1.3. No ZEO, nothing else. There is
also no code that make something with caches or connections
or threads....a rather stupid Zope product based on Archetypes
with out any magic.

Andreas




More information about the ZODB-Dev mailing list