SystemError: NULL object passed to Py_BuildValue
I have this weird error comming up at random intervals: SystemError: NULL object passed to Py_BuildValue It occurs in a Plone site but I don't think it's related to Plone. I have no access to some error log or to the Control Panel since it's showing me the Plone login form whenever I want to access to restricted information. Thanks to the event.log, here is the traceback: - - - - - - - - 2004-06-03T17:33:19 ERROR(200) SiteError http://www.my_site.net/login_form Traceback (most recent call last): File "/usr/local/lib/zope2.7/lib/python/ZPublisher/Publish.py", line 104, in publish if transactions_manager: transactions_manager.commit() File "/usr/local/lib/zope2.7/lib/python/Zope/App/startup.py", line 221, in commit get_transaction().commit() File "/usr/local/lib/zope2.7/lib/python/ZODB/Transaction.py", line 233, in commit ncommitted += self._commit_objects(objects) File "/usr/local/lib/zope2.7/lib/python/ZODB/Transaction.py", line 348, in _commit_objects jar.commit(o, self) File "/usr/local/lib/zope2.7/lib/python/ZODB/Connection.py", line 413, in commit state=object.__getstate__() SystemError: NULL object passed to Py_BuildValue - - - - - - - - Python version: 2.3.3 (#1, May 18 2004, 08:35:20) [GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] Zope version: 2.7 Plone version: 2.0-rc6 Any clue on what's going on. Is it a Python bug ? -- Olivier Laurent. P3B : Club Python(-Zope) Belge ---------- http://www.p3b.org OS3B : Club Open-Software(-Linux) Carolo http://www.os3b.org Aragne : Python-Zope Solutions & Formations http://www.aragne.com
Olivier Laurent wrote at 2004-6-4 11:08 +0200:
I have this weird error comming up at random intervals: SystemError: NULL object passed to Py_BuildValue ... File "/usr/local/lib/zope2.7/lib/python/ZODB/Connection.py", line 413, in commit state=object.__getstate__() SystemError: NULL object passed to Py_BuildValue
Some class implemented in "C" has a bug in its "__getstate__". Using a "try: ... except: ..." around line 413 above, you can find out which class this is. The culprit may not be "object.__class__" itself but could be one of its base classes. -- Dieter
FWIW I have the same error propping up from time to time. It effectively kills all Plone sites on the same Zope 2.7 server (running on Suse Linux), so my guess it's Zope related. Restarting Zope makes it go away. No, not very satisfactory but it works. Below is a section of the event.log around the point of breaking. Now that I'm looking through the log I notice more ZODB conflict errors (but w/o the Py_BuildValue error), but I'm not sure what they mean. M.J. Maré WebToTheMax ------ 2004-07-30T08:06:58 INFO(0) ZODB conflict error at /VirtualHostBase/http/foldycar.nl:80/foldycar/VirtualHostRoot/intro/ images/fc_halfgevouwen_sml.gif (305 conflicts since startup at 2004-07-06T21:28:01) ------ 2004-07-30T08:06:59 PROBLEM(100) I18NLayer The thread number 32771 don't has a request object associated. ------ 2004-07-30T08:07:14 INFO(0) ZODB conflict error at /VirtualHostBase/http/foldycar.nl:80/foldycar/VirtualHostRoot/ toepassingen (306 conflicts since startup at 2004-07-06T21:28:01) ------ 2004-07-30T08:07:15 PROBLEM(100) I18NLayer The thread number 32771 don't has a request object associated. ------ 2004-07-30T08:10:25 ERROR(200) SiteError http://fenac.nl/login_form Traceback (most recent call last): File "/usr/local/apache4/python/ZopeA/Zope-2.7.0bin/lib/python/ZPublisher/ Publish.py", line 104, in publish if transactions_manager: transactions_manager.commit() File "/usr/local/apache4/python/ZopeA/Zope-2.7.0bin/lib/python/Zope/App/ startup.py", line 221, in commit get_transaction().commit() File "/usr/local/apache4/python/ZopeA/Zope-2.7.0bin/lib/python/ZODB/ Transaction.py", line 233, in commit ncommitted += self._commit_objects(objects) File "/usr/local/apache4/python/ZopeA/Zope-2.7.0bin/lib/python/ZODB/ Transaction.py", line 348, in _commit_objects jar.commit(o, self) File "/usr/local/apache4/python/ZopeA/Zope-2.7.0bin/lib/python/ZODB/ Connection.py", line 413, in commit state=object.__getstate__() SystemError: NULL object passed to Py_BuildValue On 4-jun-04, at 11:08, Olivier Laurent wrote:
I have this weird error comming up at random intervals: SystemError: NULL object passed to Py_BuildValue
It occurs in a Plone site but I don't think it's related to Plone.
I have no access to some error log or to the Control Panel since it's showing me the Plone login form whenever I want to access to restricted information. Thanks to the event.log, here is the traceback:
- - - - - - - -
2004-06-03T17:33:19 ERROR(200) SiteError http://www.my_site.net/login_form Traceback (most recent call last): File "/usr/local/lib/zope2.7/lib/python/ZPublisher/Publish.py", line 104, in publish if transactions_manager: transactions_manager.commit() File "/usr/local/lib/zope2.7/lib/python/Zope/App/startup.py", line 221, in commit get_transaction().commit() File "/usr/local/lib/zope2.7/lib/python/ZODB/Transaction.py", line 233, in commit ncommitted += self._commit_objects(objects) File "/usr/local/lib/zope2.7/lib/python/ZODB/Transaction.py", line 348, in _commit_objects jar.commit(o, self) File "/usr/local/lib/zope2.7/lib/python/ZODB/Connection.py", line 413, in commit state=object.__getstate__() SystemError: NULL object passed to Py_BuildValue
- - - - - - - -
Python version: 2.3.3 (#1, May 18 2004, 08:35:20) [GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] Zope version: 2.7 Plone version: 2.0-rc6
Any clue on what's going on. Is it a Python bug ?
-- Olivier Laurent. P3B : Club Python(-Zope) Belge ---------- http://www.p3b.org OS3B : Club Open-Software(-Linux) Carolo http://www.os3b.org Aragne : Python-Zope Solutions & Formations http://www.aragne.com
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
M.J. Maré WebToTheMax T +31-20-4 100 242 F +31-20-4 100 243 W www.webtothemax.com E mjmare@webtothemax.com J mjm@anywise.jabber.com
Marcel Maré wrote at 2004-8-7 21:43 +0200:
... File "/usr/local/apache4/python/ZopeA/Zope-2.7.0bin/lib/python/ZODB/ Connection.py", line 413, in commit state=object.__getstate__() SystemError: NULL object passed to Py_BuildValue
This is (almost surely) caused by an extension object with a broken "__getstate__". You must find out the class of this object.(e.g. by catching the exception, printing the class and then reraising). -- Dieter
On 8-aug-04, at 22:47, Dieter Maurer wrote:
Marcel Maré wrote at 2004-8-7 21:43 +0200:
... File "/usr/local/apache4/python/ZopeA/Zope-2.7.0bin/lib/python/ZODB/ Connection.py", line 413, in commit state=object.__getstate__() SystemError: NULL object passed to Py_BuildValue
This is (almost surely) caused by an extension object with a broken "__getstate__".
You must find out the class of this object.(e.g. by catching the exception, printing the class and then reraising).
-- Dieter
Thx Dieter. Any pointers as to how to do his? I don't have a clue where to begin. As I pointed out, this occurs once in a while, out of the blue, on a production server (no less). TIA Marcel Maré
Marcel Maré wrote at 2004-8-9 12:22 +0200:
On 8-aug-04, at 22:47, Dieter Maurer wrote: ...
File "/usr/local/apache4/python/ZopeA/Zope-2.7.0bin/lib/python/ZODB/ Connection.py", line 413, in commit state=object.__getstate__() SystemError: NULL object passed to Py_BuildValue
This is (almost surely) caused by an extension object with a broken "__getstate__".
You must find out the class of this object.(e.g. by catching the exception, printing the class and then reraising). ... Thx Dieter. Any pointers as to how to do his? I don't have a clue where to begin. As I pointed out, this occurs once in a while, out of the blue, on a production server (no less).
With what part of the above recommendation you need help? Locating the line where to place the "try: .. except:"? "line 413 of "ZODB/Connection.py" Printing the class? print type(object) if hasattr(object, '__class__'): print object.__class__ or better -- logging: from zLOG import LOG, ERROR: LOG('ZODB Connection', ERROR, str(type(object))) if hasattr(object, '__class__'): LOG('ZODB Connection', ERROR, str(object.__class__)) Reraising? "raise" -- Dieter
participants (3)
-
Dieter Maurer -
Marcel Maré -
Olivier Laurent