KeyError in Module Shared.DC.ZRDB.DA, line 375, in _cached_result

Bug #143805 reported by Dirk Datzert
4
Affects Status Importance Assigned to Milestone
Zope 2
Fix Released
Critical
Unassigned

Bug Description

Hi,

I work with cached results in ZSQL-Methods and got a KeyError for _cached_result:

  Module Shared.DC.Scripts.Bindings, line 311, in __call__
  Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
  Module Products.PythonScripts.PythonScript, line 325, in _exec
  Module None, line 38, in draw_line
   - <PythonScript at /webgraf/Typ2/draw_line>
   - Line 38
  Module Shared.DC.ZRDB.DA, line 453, in __call__
   - <SQL at /webgraf/sql_get_data used for /webgraf/Typ2>
  Module Shared.DC.ZRDB.DA, line 375, in _cached_result
  KeyError: ("select * from DBA.DATA\nwhere ID='KCB00XXX'\n
    and AUSBLENDEN=false\norder by X_SORT", 1000, '\nDBConnId: None')

I did found the real bug, but have a workaround attached.

Regards,
Dirk

Revision history for this message
Dirk Datzert (dirk.datzert) wrote :
Revision history for this message
ChrisW (chris-simplistix) wrote :

This message:

http://mail.zope.org/pipermail/zope-db/2006-September/004684.html

...and the thread that hangs off it contains more about this issue.

It's not isolated but does affect Zope instances under high load.

It's tempting to raise this issue to "critical" but I'm not sure what that would achieve :-/

Revision history for this message
ChrisW (chris-simplistix) wrote :

Changes: submitter email, edited transcript, importance (medium => critical), new comment

I've just checked in a test case which reproduces this (see the assertRaises(KeyError,... in Shared/DC/ZRDB/tests/test_caching.py) and am about to start trying to "fix" this code :-S

Revision history for this message
ChrisW (chris-simplistix) wrote :

Status: Pending => Resolved

This is now fixed on the 2.9 branch, 2.10 branch and trunk.

It should make the 2.9.6 and 2.10.1 releases.

If you have any further problems, please let me know.

Revision history for this message
Charlie_X (charlie) wrote :

Hi, we have *one* system here running 2.10.5 on Windows XP that has this bug. It doesn't affect any other systems and there is at least one other Windows box using exactly the same configuration. Traceback for the sake of completeness:
Traceback (innermost last):
  Module ZPublisher.Publish, line 119, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 42, in call_object
  Module Products.CMFCore.FSPythonScript, line 140, in __call__
  Module Shared.DC.Scripts.Bindings, line 313, in __call__
  Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
  Module Products.CMFCore.FSPythonScript, line 196, in _exec
  Module None, line 65, in index_html
   - <FSPythonScript at /kinopolis/index_html>
   - Line 65
  Module Shared.DC.ZRDB.DA, line 499, in __call__
   - <FSZSQLMethod at /kinopolis/SQL/films/qPerformance>
  Module Shared.DC.ZRDB.DA, line 413, in _cached_result
KeyError: 1224055117.724

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.