Server crashes in cc_oid_unreferenced()

Bug #194788 reported by paul.brettschneider
2
Affects Status Importance Assigned to Milestone
Zope 2
Invalid
Low
Unassigned

Bug Description

Under load a specific Zope-Instance running under Linux on an AMD64 machine frequently causes SEGFAULTs. Zope 2.9.8, Python 2.4, PsycoPG and PIL were freshly compiled from source, yet the problem persists. A gdb backtrace of several crashes is attached. Other Zope-Instances on the same machine are not affected.

The Products Folder contains:
drwxr-xr-x 8 zope users 4096 2007-10-31 11:16 CMFActionIcons
drwxr-xr-x 9 zope users 4096 2007-10-31 11:16 CMFCalendar
drwxr-xr-x 9 zope users 4096 2007-10-31 11:16 CMFCore
drwxr-xr-x 12 zope users 4096 2007-10-31 11:16 CMFDefault
drwxr-xr-x 6 zope users 4096 2007-10-31 11:16 CMFSetup
drwxr-xr-x 7 zope users 4096 2007-10-31 11:16 CMFTopic
drwxr-xr-x 5 zope users 4096 2007-10-31 11:16 CMFUid
drwxr-sr-x 4 zope users 4096 2007-11-06 11:46 CookieCrumbler
drwxr-xr-x 7 zope users 4096 2007-10-31 11:20 DCWorkflow
drwxr-sr-x 2 zope users 4096 2008-01-28 21:26 DeadlockDebugger
drwx--Sr-x 4 zope users 4096 2007-11-24 11:05 Epoz
drwxr-xr-x 6 zope users 4096 2007-11-24 11:05 ExternalEditor
drwxr-xr-x 7 zope users 4096 2007-11-24 11:05 Localizer
-rw-r--r-- 1 zope users 170 2008-02-19 13:22 README.txt
drwxr-sr-x 3 zope users 4096 2008-02-19 15:18 TranslationService
drwxr-sr-x 2 zope users 4096 2008-02-19 15:18 ZNagios
drwxr-sr-x 3 zope users 4096 2008-02-17 14:57 ZPsycopgDA

The import statemenst in all external Methods are:
from base64 import encodestring
from DateTime import *
from DateTime import DateTime
from DocumentTemplate import HTML
from email.Header import Header
from htmlentitydefs import entitydefs # our entity defs list to use
from HTMLParser import HTMLParser,HTMLParseError,piclose, charref, entityref
from math import floor
from os import popen
from PIL import Image
from popen2 import popen2
from re import match
from string import *
from string import atoi
from string import atoi, atof
from string import atoi, atof, split, find
from string import atoi, atof, split, join
from string import find
from string import join
from string import lower,find
from string import replace
from string import split
from string import split, atoi
from string import strip
from StringIO import StringIO
from StructuredText import HTML
from tempfile import NamedTemporaryFile
from whrandom import choice
from whrandom import randint
from ZODB.POSException import POSKeyError
import cStringIO
import difflib
import httplib
import os
import PIL.Image
import PIL.Image, PIL.ImageDraw, PIL.ImageFont
import re
import regex
import re, string
import rfc822, string
import smtplib
import string
import StringIO

Revision history for this message
paul.brettschneider (paul-brettschneider) wrote :
Revision history for this message
Tres Seaver (tseaver) wrote : Re: [Bug 194788] Re: Server crashes in cc_oid_unreferenced()

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

paul.brettschneider wrote:
> ** Attachment added: "gdb backtraces"
> http://launchpadlibrarian.net/12164156/zope_segfaults.txt

The segfault appears to be occurring during Python garbage collection.
Debugging this is going to require more information, I'm afraid:

 - Rebuild Python with debugging support ('./configure --with-pydebug').

 - Rebuild the C-extension modules (PIL, PsycoPG).

 - Check the libraries that your Python and the C extensions are
   linked against (via 'ldd').

If nothing jumps out at you after doing this work, then you will likely
need to use 'gdb' to investigate some of the objects involved on the
stack of the setgaulting thread. See:

 http://wiki.python.org/moin/DebuggingWithGdb

In particular, the gdb macros shipped with Python are useful for examing
objects in the C stackframe.

Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 <email address hidden>
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHwF4/+gerLs4ltQ4RAsFiAJ9dQTTaPnp27CigPrhmci6QfEC5xQCghFRP
+Ut5wHThjSYV7/rJncMTMWY=
=RrR4
-----END PGP SIGNATURE-----

Revision history for this message
Christian Theune (ctheune) wrote :

Hi,

Tres Seaver schrieb:
> paul.brettschneider wrote:
>> ** Attachment added: "gdb backtraces"
>> http://launchpadlibrarian.net/12164156/zope_segfaults.txt
>
> The segfault appears to be occurring during Python garbage collection.
> Debugging this is going to require more information, I'm afraid:
>
> - Rebuild Python with debugging support ('./configure --with-pydebug').
>
> - Rebuild the C-extension modules (PIL, PsycoPG).
>
> - Check the libraries that your Python and the C extensions are
> linked against (via 'ldd').
>
> If nothing jumps out at you after doing this work, then you will likely
> need to use 'gdb' to investigate some of the objects involved on the
> stack of the setgaulting thread. See:
>
> http://wiki.python.org/moin/DebuggingWithGdb
>
> In particular, the gdb macros shipped with Python are useful for examing
> objects in the C stackframe.
>
>
> Tres.

Note: I'm currently tracking down some segfault as well. I discovered
one in psycopg. You might try using latest psycopg2 stable release
branch, it incorporates several segmentation fault fixes.

The other that I'm currently hunting is different from what you gave here.

Christian

--
gocept gmbh & co. kg - forsterstrasse 29 - 06112 halle (saale) - germany
www.gocept.com - <email address hidden> - phone +49 345 122 9889 7 -
fax +49 345 122 9889 1 - zope and plone consulting and development

Revision history for this message
paul.brettschneider (paul-brettschneider) wrote :

The Psycopg product was removed, but the crash persists. :(
Unfortunately, the gdb-macros for Python debugging just hang.

Revision history for this message
Andreas Jung (ajung) wrote :

Any news?

Tres Seaver (tseaver)
Changed in zope2:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Colin Watson (cjwatson) wrote :

The zope2 project on Launchpad has been archived at the request of the Zope developers (see https://answers.launchpad.net/launchpad/+question/683589 and https://answers.launchpad.net/launchpad/+question/685285). If this bug is still relevant, please refile it at https://github.com/zopefoundation/zope2.

Changed in zope2:
status: Triaged → Invalid
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.