Thanks for the detective work. Please file a bug report in the collector (http://collector.zope.org/Zope) and I will look into it. -Casey On Thursday 12 September 2002 04:48 am, Peter Keller wrote:
Hi,
I have tried Leonardo's very helpful suggestion to get a Python traceback:
Try to run zope under a debugger. Follow instructions here: http://www.zope.org/Members/4am/debugspinningzope
but type "continue" (w/out quotes) as soon as you get the gdb prompt to get zope to run normally.
This, combined with some debugging of the corefile at the C level (which I know a lot more about than anything to do with Python) has helped me figure out what the problem is.
The DTML that was cauisng the crash was:
<dtml-in Catalog sort=lastEditTime reverse>
but some items in Catalog did not have a property lastEditTime. In my particular circumstances I can exclude these objects from the ZCatalog, but surely there ought to be a cleaner way of handling this - either putting objects with missing properties at the end of the list, or not having them feature in the list at all? Perhaps some way of controlling this (or at least raising a more meaningful error) might be considered in a future release of Zope?
The gory details.... I've appended the Python traceback. You can see the problem call to sort in lib/python/DocumentTemplate/DT_In.py .
Why a SIGFPE? Dates seem to get converted to C doubles by Python for comparison. From debugging the core file, line 345 in Objects/floatobject.c in the python v2.1.3 source is causing the problem:
340 static int 341 float_compare(PyFloatObject *v, PyFloatObject *w) 342 { 343 double i = v->ob_fval; 344 double j = w->ob_fval;
345 return (i < j) ? -1 : (i > j) ? 1 : 0; 346 } 347
w is a missing python object with a junk w->ob_fval, which presumably comes from the missing lastEditTime property of one of the objects involved in the comparison:
(ladebug) p *w.ob_type struct _typeobject {
...snip...
tp_name = 0x3fffffa0648="Missing";
...snip...
tp_doc = 0x3fffffa04d0[Ladebug Warning: String is too long to display. Only the first 128 characters are shown.]="Represent totally unknown quantities\n\nMissing values are used to represent numberic quantities that are\nunknown. They support a";
...snip...
}
The Python traceback:
File "/ebi/msdlocal0/servers/Zope-2.5.1-src/ZServer/PubCore/ZServerPublisher.py", line 23, in __init__ response=response) File "/ebi/msdlocal0/servers/Zope-2.5.1-src/lib/python/ZPublisher/Publish.py", line 150, in publish_module response = publish(request, module_name, after_list, debug=debug) File "/ebi/msdlocal0/servers/Zope-2.5.1-src/lib/python/ZPublisher/Publish.py", line 98, in publish request, bind=1) File "/ebi/msdlocal0/servers/Zope-2.5.1-src/lib/python/ZPublisher/mapply.py", line 88, in mapply if debug is not None: return debug(object,args,context) File "/ebi/msdlocal0/servers/Zope-2.5.1-src/lib/python/ZPublisher/Publish.py", line 39, in call_object result=apply(object,args) # Type s<cr> to step into published object. File "/ebi/msdlocal0/servers/Zope-2.5.1-src/lib/python/Products/ZWiki/ZWikiPage.py", line 151, in __call__ body = apply(self._render,(client,REQUEST,RESPONSE),kw) File "/ebi/msdlocal0/servers/Zope-2.5.1-src/lib/python/Products/ZWiki/ZWikiPage.py", line 163, in _render return apply(method,(self, REQUEST, RESPONSE), kw) File "/ebi/msdlocal0/servers/Zope-2.5.1-src/lib/python/Products/ZWiki/ZWikiPage.py", line 553, in render_prelinkdtmlhtml t = apply(DTMLDocument.__call__,(self, client, REQUEST, RESPONSE), kw) File "/ebi/msdlocal0/servers/Zope-2.5.1-src/lib/python/OFS/DTMLDocument.py", line 127, in __call__ r=apply(HTML.__call__, (self, (client, bself), REQUEST), kw) File "/ebi/msdlocal0/servers/Zope-2.5.1-src/lib/python/DocumentTemplate/DT_String.py", line 473, in __call__ try: result = render_blocks(self._v_blocks, md) File "/ebi/msdlocal0/servers/Zope-2.5.1-src/lib/python/DocumentTemplate/DT_Try.py", line 140, in render return self.render_try_except(md) File "/ebi/msdlocal0/servers/Zope-2.5.1-src/lib/python/DocumentTemplate/DT_Try.py", line 149, in render_try_except result = render_blocks(self.section, md) File "/ebi/msdlocal0/servers/Zope-2.5.1-src/lib/python/DocumentTemplate/DT_In.py", line 639, in renderwob sequence=self.sort_sequence(sequence, md) File "/ebi/msdlocal0/servers/Zope-2.5.1-src/lib/python/DocumentTemplate/DT_In.py", line 775, in sort_sequence s.sort() File "/ebi/msdlocal0/servers/Zope-2.5.1-src/lib/python/DateTime/DateTime.py", line 1205, in equalTo return (self._t == t) File "<string>", line 1, in ?
Regards, Peter.
-- ======================================================================== Peter Keller. | "Research without indebtedness is European Bioinformatics Institute,| suspect, and somebody must always, Hinxton Hall, | somehow, be thanked." Cambridge, CB10 1SD, UK | --- Umberto Eco ----------------------------------- Email: keller@ebi.ac.uk | Tel. (+44/0)1223 494637 | Macromolecular Structure Database Fax. (+44/0)1223 494468 | http://msd.ebi.ac.uk ========================================================================
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )