[Zope] weird sessionsing bug..

Chris McDonough chrism@zope.com
09 Jan 2003 11:41:50 -0500


Hi Geir,

This appears to be a BTrees bug.  It appears that a BTree is lying about
its keys.  I "fixed" an earlier instance of this problem for Zope
2.6.1b1, but there are other cases where it shows up as well.

If you're brave, please obtain the latest version of the "Transience"
product from http://cvs.zope.org/Products/Transience/ and install it on
top of the one you've got.  I just made a few changes that further work
around this problem.  This might prevent the particular error you're
seeing.

I have also checked these changes into the 2.6 branch.


On Thu, 2003-01-09 at 08:34, Geir B=E6kholt wrote:
> I have set up our Zope at https://register.funcom.com to email me
> whenever errors occur, and during the christmas holidays we got the
> following strange reports :
>=20
> The billing Zope at register.funcom.com reports an error
> The error is:=20
> KeyError : 1040726440
>=20
> TRACEBACK:
> Traceback (innermost last):
>=20
>   Module ZPublisher.Publish, line 98, in publish
>   Module ZPublisher.mapply, line 88, in mapply
>   Module ZPublisher.Publish, line 39, in call_object
>   Module Shared.DC.Scripts.Bindings, line 252, in __call__
>   Module Shared.DC.Scripts.Bindings, line 283, in _bindAndExec
>   Module Products.PythonScripts.PythonScript, line 315, in _exec
>   Module Script (Python), line 4, in index_html
>   <PythonScript at /newuser/index_html>
>   Line 4
>   Module ZPublisher.HTTPRequest, line 1189, in __getattr__
>   Module ZPublisher.HTTPRequest, line 1149, in get
>   Module Products.Sessions.SessionDataManager, line 93, in getSessionDa=
ta
>   Module Products.Sessions.SessionDataManager, line 180, in _getSession=
DataObject
>   Module Products.Transience.Transience, line 175, in new_or_existing
>   Module Products.Transience.Transience, line 786, in get
>   Module Products.Transience.Transience, line 599, in _getCurrentBucket
>   Module Products.Transience.Transience, line 688, in _housekeep
>=20
> KeyError: 1040726440
>=20
> i got a lot of these reports successively , all with the same key-error=
, until i
> restarted the server. It seems to have happened to a series of differen=
t
> users (different IPs , browsers, etc in the REQUESTS)
>=20
> The problem has not reappeared since the 24th of December, but i would
> really like to figure out what caused it..
>=20
> Has anyone experienced anything like this?
>=20
>=20
> Zope Version  (Zope 2.6.0 (binary release, python 2.1, linux2-x86), pyt=
hon 2.1.3, linux2)
> Python Version  2.1.3 (#1, Sep 19 2002, 13:15:46) [GCC egcs-2.91.66 199=
90314/Linux (egcs-1.1.2 release)] =20
> System Platform  linux2
>=20
> any hints are appreciated :)
--=20
Chris McDonough <chrism@zope.com>
Zope Corporation