[Zope-Coders] Zope 2.5 instability problems

Matthew T. Kromer matt@zope.com
Mon, 10 Dec 2001 13:38:05 -0500


--Apple-Mail-1--362485490
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed


On Monday, December 10, 2001, at 01:28 PM, Martijn Faassen wrote:

> Hm, then I hope the other traceback that gave Matt a clue *was*
> correct. I've just run a plain gdb against Zope without trying a debug
> build of either Python or the Zope modules. Should I try that? And
> would this help? I have little experience in debugging Python on
> this level, so some clues would be useful.
>

Martijn, I'm preparing a trap patch right now that you should be able to 
apply that will force an error message and a segfault when the loop 
condition is detected.

You should then be able to re-run your condition (still with gdb 
attached) and get a better notion of what's going on.   If it pops (ie 
the patch cause you to segfault like it should) I can replace the 
segfault instruction with a python error raise so you can see the 
traceback.  Just apply this diff at the top level of your Zope and it 
will detect if you try to wrap an acquisition wrapper with itself.


--Apple-Mail-1--362485490
Content-Disposition: attachment;
	filename=aq.diff
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
	x-unix-mode=0644;
	name="aq.diff"

Index: lib/Components/ExtensionClass/src/Acquisition.c
===================================================================
RCS file: /cvs-repository/Zope/lib/Components/ExtensionClass/src/Acquisition.c,v
retrieving revision 1.53
diff -u -r1.53 Acquisition.c
--- lib/Components/ExtensionClass/src/Acquisition.c	14 Sep 2001 20:00:13 -0000	1.53
+++ lib/Components/ExtensionClass/src/Acquisition.c	10 Dec 2001 18:36:41 -0000
@@ -430,6 +430,14 @@
     {
       if (isWrapper(self->obj))
 	{
+	  if (WRAPPER(self->obj) == self)
+	  { 
+		char *segfault;
+		fprintf(stderr,"Wrapper containment loop on object "
+			"detected!\n");
+                /* Force a segfault */
+                segfault = *((char *) 0);
+	  }
 	  if ((r=Wrapper_findattr(WRAPPER(self->obj),
 				 oname, filter, extra, orig, 1, 
 

--Apple-Mail-1--362485490
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed



--Apple-Mail-1--362485490--