[Zope-dev] Re: [ZODB-Dev] Re: BTrees strangeness (was Zope 2.X BIG Session problems - blocker - our site dies - need help of experience Zope developer, please)

Andrea Patuzzo apatuzzo at pronaos.ch
Tue May 18 06:03:41 EDT 2004


Hi, dear developers:

We are now randomly getting this kind of error:

====
2004-05-18T11:30:41 ERROR(200) SiteError
http://XXXXXXXXXXXXXXX/prefs_error_log_form
Traceback (most recent call last):
  File "/usr/local/Zope270CVS/lib/python/ZPublisher/Publish.py", line 100,
in publish
    request, bind=1)
  File "/usr/local/Zope270CVS/lib/python/ZPublisher/mapply.py", line 88, in
mapply
    if debug is not None: return debug(object,args,context)
  File "/usr/local/Zope270CVS/lib/python/ZPublisher/Publish.py", line 40, in
call_object
    result=apply(object,args) # Type s<cr> to step into published object.
  File "/usr/local/Zope270CVS/lib/python/Shared/DC/Scripts/Bindings.py",
line 306, in __call__
    return self._bindAndExec(args, kw, None)
  File "/usr/local/Zope270CVS/lib/python/Shared/DC/Scripts/Bindings.py",
line 343, in _bindAndExec
    return self._exec(bound_data, args, kw)
  File "/zope_instances/patuzzo.ch/Products/CMFCore/FSPageTemplate.py", line
191, in _exec
    result = self.pt_render(extra_context=bound_names)
  File "/zope_instances/patuzzo.ch/Products/CMFCore/FSPageTemplate.py", line
124, in pt_render
    result = FSPageTemplate.inheritedAttribute('pt_render')(
  File
"/usr/local/Zope270CVS/lib/python/Products/PageTemplates/PageTemplate.py",
line 96, in pt_render
    tal=not source, strictinsert=0)()
  File "/usr/local/Zope270CVS/lib/python/TAL/TALInterpreter.py", line 189,
in __call__
    self.interpret(self.program)
  File "/usr/local/Zope270CVS/lib/python/TAL/TALInterpreter.py", line 233,
in interpret
    handlers[opcode](self, args)
  File "/usr/local/Zope270CVS/lib/python/TAL/TALInterpreter.py", line 663,
in do_useMacro
    self.interpret(macro)
  File "/usr/local/Zope270CVS/lib/python/TAL/TALInterpreter.py", line 233,
in interpret
    handlers[opcode](self, args)
  File "/usr/local/Zope270CVS/lib/python/TAL/TALInterpreter.py", line 408,
in do_optTag_tal
    self.do_optTag(stuff)
  File "/usr/local/Zope270CVS/lib/python/TAL/TALInterpreter.py", line 393,
in do_optTag
    return self.no_tag(start, program)
  File "/usr/local/Zope270CVS/lib/python/TAL/TALInterpreter.py", line 388,
in no_tag
    self.interpret(program)
  File "/usr/local/Zope270CVS/lib/python/TAL/TALInterpreter.py", line 233,
in interpret
    handlers[opcode](self, args)
  File "/usr/local/Zope270CVS/lib/python/TAL/TALInterpreter.py", line 663,
in do_useMacro
    self.interpret(macro)
  File "/usr/local/Zope270CVS/lib/python/TAL/TALInterpreter.py", line 233,
in interpret
    handlers[opcode](self, args)
  File "/usr/local/Zope270CVS/lib/python/TAL/TALInterpreter.py", line 408,
in do_optTag_tal
    self.do_optTag(stuff)
  File "/usr/local/Zope270CVS/lib/python/TAL/TALInterpreter.py", line 393,
in do_optTag
    return self.no_tag(start, program)
  File "/usr/local/Zope270CVS/lib/python/TAL/TALInterpreter.py", line 388,
in no_tag
    self.interpret(program)
  File "/usr/local/Zope270CVS/lib/python/TAL/TALInterpreter.py", line 233,
in interpret
    handlers[opcode](self, args)
  File "/usr/local/Zope270CVS/lib/python/TAL/TALInterpreter.py", line 663,
in do_useMacro
    self.interpret(macro)
  File "/usr/local/Zope270CVS/lib/python/TAL/TALInterpreter.py", line 233,
in interpret
    handlers[opcode](self, args)
  File "/usr/local/Zope270CVS/lib/python/TAL/TALInterpreter.py", line 629,
in do_condition
    self.interpret(block)
  File "/usr/local/Zope270CVS/lib/python/TAL/TALInterpreter.py", line 233,
in interpret
    handlers[opcode](self, args)
  File "/usr/local/Zope270CVS/lib/python/TAL/TALInterpreter.py", line 406,
in do_optTag_tal
    self.no_tag(stuff[-2], stuff[-1])
  File "/usr/local/Zope270CVS/lib/python/TAL/TALInterpreter.py", line 388,
in no_tag
    self.interpret(program)
  File "/usr/local/Zope270CVS/lib/python/TAL/TALInterpreter.py", line 233,
in interpret
    handlers[opcode](self, args)
  File "/usr/local/Zope270CVS/lib/python/TAL/TALInterpreter.py", line 605,
in do_loop_tal
    self.interpret(block)
  File "/usr/local/Zope270CVS/lib/python/TAL/TALInterpreter.py", line 233,
in interpret
    handlers[opcode](self, args)
  File "/usr/local/Zope270CVS/lib/python/TAL/TALInterpreter.py", line 290,
in do_startTag
    ok, name, s = attrAction(self, item)
  File "/usr/local/Zope270CVS/lib/python/TAL/TALInterpreter.py", line 369,
in attrAction_tal
    translated = self.translate(msgid or value, value, {})
  File "/usr/local/Zope270CVS/lib/python/TAL/TALInterpreter.py", line 615,
in translate
    msgid, i18ndict, default=default)
  File "/usr/local/Zope270CVS/lib/python/Products/PageTemplates/TALES.py",
line 264, in translate
    target_language=target_language)
  File
"/zope_instances/patuzzo.ch/Products/PlacelessTranslationService/PlacelessTr
anslationService.py", line 109, in translate
    return service.translate(domain, msgid, mapping, context,
target_language, default)
  File
"/zope_instances/patuzzo.ch/Products/PlacelessTranslationService/PlacelessTr
anslationService.py", line 423, in translate
    catalogs = self.getCatalogsForTranslation(context, domain,
target_language)
  File
"/zope_instances/patuzzo.ch/Products/PlacelessTranslationService/PlacelessTr
anslationService.py", line 354, in getCatalogsForTranslation
    target_language = self.negotiate_language(context, domain)
  File
"/zope_instances/patuzzo.ch/Products/PlacelessTranslationService/PlacelessTr
anslationService.py", line 460, in negotiate_language
    return negotiator.negotiate(langs, context, 'language')
  File
"/zope_instances/patuzzo.ch/Products/PlacelessTranslationService/Negotiator.
py", line 261, in negotiate
    cache[choices] = self._negotiate(choices, request, kind)
  File
"/zope_instances/patuzzo.ch/Products/PlacelessTranslationService/Negotiator.
py", line 266, in _negotiate
    userchoices = getLangPrefs(request, kind)
  File
"/zope_instances/patuzzo.ch/Products/PlacelessTranslationService/Negotiator.
py", line 54, in getLangPrefs
    accepted = handler.getAccepted(env, kind)
  File
"/zope_instances/patuzzo.ch/Products/PlacelessTranslationService/Negotiator.
py", line 172, in getAccepted
    language = request.SESSION.get('pts_language', None)
  File "/usr/local/Zope270CVS/lib/python/ZPublisher/HTTPRequest.py", line
1218, in __getattr__
    v = self.get(key, default, returnTaints=returnTaints)
  File "/usr/local/Zope270CVS/lib/python/ZPublisher/HTTPRequest.py", line
1178, in get
    if callable(v): v = v()
  File
"/usr/local/Zope270CVS/lib/python/Products/Sessions/SessionDataManager.py",
line 93, in getSessionData
    return self._getSessionDataObject(key)
  File
"/usr/local/Zope270CVS/lib/python/Products/Sessions/SessionDataManager.py",
line 180, in _getSessionDataObject
    ob = container.new_or_existing(key)
  File "/usr/local/Zope270CVS/lib/python/Products/Transience/Transience.py",
line 554, in new_or_existing
    self[key] = item
  File "/usr/local/Zope270CVS/lib/python/Products/Transience/Transience.py",
line 341, in __setitem__
    current_bucket = self._data[current_ts]
KeyError: 1084872640
====

This one was with the latest publish.py / startup.py patch and the new
Transience.py implementation, on a yesterday's Zope-2_7-branch checkout.
New Zope instance with FileStorage does not solve the problem.
Same happens with the patches applied to the official Zope-2.7.0 release.

Note: once the error happens, zope has to be restarted to function again.
Before applying patches we were getting "get" errors (instead of
"__setitem__") and we just had to close browser to get back to work.
Here we have to restart Zope (with TemporaryStorage) or delete Sessions.fs
and restart (with FileStorage).

Does this make any sense to you ?

Best regards,

Andrea Patuzzo
Project Manager
pronaos.ch






More information about the Zope-Dev mailing list