Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Segmentation fault when importing trac.web.main

Received: by 10.231.183.16 with SMTP id ce16mr814706ibb.16.1277782105151;
        Mon, 28 Jun 2010 20:28:25 -0700 (PDT)
X-BeenThere: modwsgi@googlegroups.com
Received: by 10.231.176.18 with SMTP id bc18ls3953038ibb.3.p; Mon, 28 Jun 2010 
	20:28:23 -0700 (PDT)
Received: by 10.231.148.10 with SMTP id n10mr814904ibv.2.1277782103737;
        Mon, 28 Jun 2010 20:28:23 -0700 (PDT)
Received: by 10.231.148.10 with SMTP id n10mr814903ibv.2.1277782103697;
        Mon, 28 Jun 2010 20:28:23 -0700 (PDT)
Return-Path: <graham.dumple...@gmail.com>
Received: from mail-iw0-f178.google.com (mail-iw0-f178.google.com [209.85.214.178])
        by gmr-mx.google.com with ESMTP id s18si3326165ibi.1.2010.06.28.20.28.22;
        Mon, 28 Jun 2010 20:28:22 -0700 (PDT)
Received-SPF: pass (google.com: domain of graham.dumple...@gmail.com designates 209.85.214.178 as permitted sender) client-ip=209.85.214.178;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of graham.dumple...@gmail.com designates 209.85.214.178 as permitted sender) smtp.mail=graham.dumple...@gmail.com; dkim=pass (test mode) header...@gmail.com
Received: by mail-iw0-f178.google.com with SMTP id 41so865057iwn.9
        for <modwsgi@googlegroups.com>; Mon, 28 Jun 2010 20:28:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:mime-version:received:received:in-reply-to
         :references:date:message-id:subject:from:to:content-type
         :content-transfer-encoding;
        bh=K5Kosa4tX/vnaSEF7GbxDO96rTasmpUYfdvAAxsT1/4=;
        b=SrOg9nQpKUClHVBAIBOHg/nQpTLF+wlSVS9een3GJqvccSGeF5oW/YxmW6sQY7key9
         yRgvdl/uoa3UFkX62GOTmjwHW74Y7c/ejw5BYFfkcoQtrNCMujeXilJKbObMxyCTVJXR
         OoMMtDo+tNtXPF8i5sz+lhW55uaPBgeIEY/YA=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :content-type:content-transfer-encoding;
        b=Oc/9QYTotv4b3IWN88kvlLV0sV3oFKkA6RIJWxhxiAuinqPFW9PkRTHZhfsUHhQWtk
         XicR4fHlAEbi1g3DHw4n46H3khppKe6r3ZHeqlfWA4UIz3dlO0+bH9Vcpj1AoqbXYZhk
         lhSOoR+pAF1DpyY9lWikaJkiKtAMmvr4rh7NM=
MIME-Version: 1.0
Received: by 10.42.7.7 with SMTP id c7mr2017800icc.20.1277782102482; Mon, 28 
	Jun 2010 20:28:22 -0700 (PDT)
Received: by 10.42.7.193 with HTTP; Mon, 28 Jun 2010 20:28:22 -0700 (PDT)
In-Reply-To: <AANLkTilw6MMoBhL0luuWyS8v9WJbZ5D9j0HAReIK9...@mail.gmail.com>
References: <4C1F56F1.38D2.00F...@kumc.edu>
	<AANLkTimwkIJPi4z-c1LDA9e4fdgyiGARvV-VQnzWi...@mail.gmail.com>
	<4C20855D.38D2.00F...@kumc.edu>
	<AANLkTinXeBZ3dZ3Ypngvx4nItFR4tfNQOyt-eXXsI...@mail.gmail.com>
	<4C287EBB020000FA000CF...@smtpout.kumc.edu>
	<4C28958B020000FA000CF...@smtpout.kumc.edu>
	<4C289D4C020000FA000CF...@smtpout.kumc.edu>
	<AANLkTilw6MMoBhL0luuWyS8v9WJbZ5D9j0HAReIK9...@mail.gmail.com>
Date: Tue, 29 Jun 2010 13:28:22 +1000
Message-ID: <AANLkTimwMrqNJ9NTXrmtyqdu8AzVpc08pP4Y3WxXf...@mail.gmail.com>
Subject: Re: [modwsgi] Segmentation fault when importing trac.web.main
From: Graham Dumpleton <graham.dumple...@gmail.com>
To: modwsgi@googlegroups.com
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

I have added issue:

  http://code.google.com/p/modwsgi/issues/detail?id=3D203

to remind me to update documentation. :-)

Graham

On 29 June 2010 13:25, Graham Dumpleton <graham.dumple...@gmail.com> wrote:
> On 29 June 2010 04:02, Dan Connolly <dconno...@kumc.edu> wrote:
>> On Mon, 2010-06-28 at 12:28 -0500, Dan Connolly wrote:
>>> On Mon, 2010-06-28 at 10:51 -0500, Dan Connolly wrote:
>>> > I seem to be hitting the pyexpat issue...
>>> >
>>> > Anybody want to remind me of the fix or work-around?
>>> > Perhaps I can find it myself...
>>>
>>> OK, so I found
>>> http://code.google.com/p/modwsgi/wiki/IssuesWithExpatLibrary
>>>
>>> and I re-built apache with --disable-expat.
>>> Now lsof shows no libexpat.so at all.
>>
>> Not util it's dynamically loaded, that is.
>>
>> tee hee.
>>
>>> But I'm still getting a SEGV in roughly the same place:
>>
>> The fix was:
>>
>> 1) =A0sudo zypper install libexpat-devel
>> 2) add --with-expat=3D/usr/lib to apache config options and recompile.
>>
>> That IssuesWithExpatLibrary doc is really quite nice. Thanks!
>
> There is a slight problem with that. The expat issues shouldn't apply
> to Python 2.5 and later as from then on the pyexpat bundled with
> Python namespace prefixed the symbols so they didn't clash with any
> separate expat shared library used by something else linked into the
> same executable.
>
> The only way there could be a problem is if pyexpat was updated to
> newer expat code and they forgot to properly namespace prefix some
> symbols that were being used. Alternatively if the pyexpat was
> explicitly compiled so as to use system libexpat instead in contained
> expat code.
>
> It seems that for MacOS X Snow Leopard supplied Python 2.6 as example,
> it does use separate expat library. You can find this out by going:
>
> nm /System/Library/Frameworks/Python.framework/Versions/Current/lib/pytho=
n2.6/lib-dynload/pyexpat.so
> | grep XML
>
> yielding:
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_ErrorString
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_ExpatVersion
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_ExpatVersionInfo
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_ExternalEntityParserCreate
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_FreeContentModel
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_GetBase
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_GetBuffer
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_GetCurrentByteIndex
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_GetCurrentColumnNumber
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_GetCurrentLineNumber
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_GetErrorCode
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_GetFeatureList
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_GetInputContext
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_GetSpecifiedAttributeCount
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_Parse
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_ParseBuffer
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_ParserCreate
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_ParserCreateNS
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_ParserCreate_MM
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_ParserFree
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_SetAttlistDeclHandler
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_SetBase
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_SetCharacterDataHandler
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_SetCommentHandler
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_SetDefaultHandler
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_SetDefaultHandlerExpand
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_SetElementDeclHandler
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_SetElementHandler
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_SetEndCdataSectionHandler
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_SetEndDoctypeDeclHandler
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_SetEndElementHandler
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_SetEndNamespaceDeclHandler
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_SetEntityDeclHandler
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_SetExternalEntityRefHandler
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_SetNamespaceDeclHandler
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_SetNotStandaloneHandler
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_SetNotationDeclHandler
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_SetParamEntityParsing
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_SetProcessingInstructionHandler
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_SetReturnNSTriplet
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_SetSkippedEntityHandler
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_SetStartCdataSectionHandler
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_SetStartDoctypeDeclHandler
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_SetStartElementHandler
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_SetStartNamespaceDeclHandler
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_SetUnknownEncodingHandler
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_SetUnparsedEntityDeclHandler
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_SetUserData
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_SetXmlDeclHandler
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_StopParser
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 U _XML_UseForeignDTD
>
> Whereas if I check hand compiled Python 2.6.5 on same OS I get:
>
> 000000000000f6f0 T _PyExpat_XML_DefaultCurrent
> 00000000000091a0 T _PyExpat_XML_ErrorString
> 00000000000091c0 T _PyExpat_XML_ExpatVersion
> 00000000000091d0 T _PyExpat_XML_ExpatVersionInfo
> 000000000000ca30 T _PyExpat_XML_ExternalEntityParserCreate
> 0000000000009120 T _PyExpat_XML_FreeContentModel
> 00000000000089f0 T _PyExpat_XML_GetBase
> 000000000000af10 T _PyExpat_XML_GetBuffer
> 0000000000008fc0 T _PyExpat_XML_GetCurrentByteCount
> 0000000000008f90 T _PyExpat_XML_GetCurrentByteIndex
> 00000000000090b0 T _PyExpat_XML_GetCurrentColumnNumber
> 0000000000009040 T _PyExpat_XML_GetCurrentLineNumber
> 0000000000008f80 T _PyExpat_XML_GetErrorCode
> 00000000000091f0 T _PyExpat_XML_GetFeatureList
> 0000000000008a10 T _PyExpat_XML_GetIdAttributeIndex
> 0000000000009000 T _PyExpat_XML_GetInputContext
> 0000000000008f70 T _PyExpat_XML_GetParsingStatus
> 0000000000008a00 T _PyExpat_XML_GetSpecifiedAttributeCount
> 0000000000009180 T _PyExpat_XML_MemFree
> 0000000000009140 T _PyExpat_XML_MemMalloc
> 0000000000009160 T _PyExpat_XML_MemRealloc
> 000000000000b0f0 T _PyExpat_XML_Parse
> 0000000000008c90 T _PyExpat_XML_ParseBuffer
> 000000000000c610 T _PyExpat_XML_ParserCreate
> 000000000000c660 T _PyExpat_XML_ParserCreateNS
> 000000000000c5c0 T _PyExpat_XML_ParserCreate_MM
> 000000000000a480 T _PyExpat_XML_ParserFree
> 000000000000bb90 T _PyExpat_XML_ParserReset
> 0000000000008e80 T _PyExpat_XML_ResumeParser
> 0000000000008c20 T _PyExpat_XML_SetAttlistDeclHandler
> 000000000000b6c0 T _PyExpat_XML_SetBase
> 0000000000008a80 T _PyExpat_XML_SetCdataSectionHandler
> 0000000000008a50 T _PyExpat_XML_SetCharacterDataHandler
> 0000000000008a70 T _PyExpat_XML_SetCommentHandler
> 0000000000008ac0 T _PyExpat_XML_SetDefaultHandler
> 0000000000008ae0 T _PyExpat_XML_SetDefaultHandlerExpand
> 0000000000008b00 T _PyExpat_XML_SetDoctypeDeclHandler
> 0000000000008c10 T _PyExpat_XML_SetElementDeclHandler
> 0000000000008a20 T _PyExpat_XML_SetElementHandler
> 000000000000b780 T _PyExpat_XML_SetEncoding
> 0000000000008ab0 T _PyExpat_XML_SetEndCdataSectionHandler
> 0000000000008b30 T _PyExpat_XML_SetEndDoctypeDeclHandler
> 0000000000008a40 T _PyExpat_XML_SetEndElementHandler
> 0000000000008b90 T _PyExpat_XML_SetEndNamespaceDeclHandler
> 0000000000008c30 T _PyExpat_XML_SetEntityDeclHandler
> 0000000000008bb0 T _PyExpat_XML_SetExternalEntityRefHandler
> 0000000000008bc0 T _PyExpat_XML_SetExternalEntityRefHandlerArg
> 0000000000008b60 T _PyExpat_XML_SetNamespaceDeclHandler
> 0000000000008ba0 T _PyExpat_XML_SetNotStandaloneHandler
> 0000000000008b50 T _PyExpat_XML_SetNotationDeclHandler
> 0000000000008c50 T _PyExpat_XML_SetParamEntityParsing
> 0000000000008a60 T _PyExpat_XML_SetProcessingInstructionHandler
> 00000000000089a0 T _PyExpat_XML_SetReturnNSTriplet
> 0000000000008be0 T _PyExpat_XML_SetSkippedEntityHandler
> 0000000000008aa0 T _PyExpat_XML_SetStartCdataSectionHandler
> 0000000000008b20 T _PyExpat_XML_SetStartDoctypeDeclHandler
> 0000000000008a30 T _PyExpat_XML_SetStartElementHandler
> 0000000000008b80 T _PyExpat_XML_SetStartNamespaceDeclHandler
> 0000000000008bf0 T _PyExpat_XML_SetUnknownEncodingHandler
> 0000000000008b40 T _PyExpat_XML_SetUnparsedEntityDeclHandler
> 00000000000089c0 T _PyExpat_XML_SetUserData
> 0000000000008c40 T _PyExpat_XML_SetXmlDeclHandler
> 0000000000008df0 T _PyExpat_XML_StopParser
> 0000000000008970 T _PyExpat_XML_UseForeignDTD
> 0000000000008960 T _PyExpat_XML_UseParserAsHandlerArg
>
> See how they are part of object and prefixed.
>
> You might do that same nm on pyexpat.so in your Python installation
> and work out if local symbols or undefined, thus meaning they come
> from external libexpat.so.
>
> It almost seems that your pyexpat.so is using libexpat.so and so you
> can get problems mentioned in that document.
>
> Seems I will need to update that document to indicate that can occur
> for latter Python versions if it was configured to use libexpat.so
> instead of builtin code.
>
> Graham
>