Bug#774213: zope2.13: import zope.security._proxy -> SystemError: dynamic module not initialized properly

Kirill Smelkov kirr at nexedi.com
Fri Jan 9 20:29:26 UTC 2015


reopen 774213
thanks

On Wed, Jan 07, 2015 at 01:08:33PM -0500, Barry Warsaw wrote:
> On Dec 30, 2014, at 02:32 PM, Kirill Smelkov wrote:
> 
> >Package: zope2.13
> >Version: 2.13.22-1
> >Severity: grave
> >Justification: renders package unusable
> >
> >With zope2.13 I've tried to create a (user) instance and start it, but a
> >`SystemError: dynamic module not initialized properly` is raised while
> >zopectl tries to import zope.security._proxy .
> 
> I've tried both recipes on two different sid machines and I am unable to
> reproduce the problem.  Importing zope.security._proxy succeeds for me, as
> does the dzhandle [...] start command.
> 
> Perhaps it's a local problem?  Try re-installing zope.security?

After reinstalling zope.security (= reinstalling zope2.13 because that
mega-package contains all the dependencies) and finding nothing changed,
I think I've found the cause - the bug relates to other python-zope.*
packages being installed or not:

If there is no python-zope.* packages installed we have:

    $ /usr/lib/zope2.13/bin/python 
    >>> import zope.security._proxy
    >>> # imported ok

But if we install python-zope.proxy (or thus any package which depends
on it, e.g. python-zodb) we'll have:

    $ sudo aptitude install -y python-zope.proxy
    $ /usr/lib/zope2.13/bin/python
    Traceback (most recent call last):
      File "<console>", line 1, in <module>
      File "/usr/lib/zope2.13/lib/python/zope.security-3.7.4.egg/zope/security/__init__.py", line 19, in <module>
        from zope.security.management import checkPermission
      File "/usr/lib/zope2.13/lib/python/zope.security-3.7.4.egg/zope/security/management.py", line 23, in <module>
        from zope.security.checker import CheckerPublic
      File "/usr/lib/zope2.13/lib/python/zope.security-3.7.4.egg/zope/security/checker.py", line 46, in <module>
        from zope.security._proxy import _Proxy as Proxy, getChecker
    SystemError: dynamic module not initialized properly

and to me this is reproducible 100% - I've tried to remove/install
python-zope.proxy several times and each time the import outcome was
consistent - ok, if no python-zope.proxy installed, SystemError if
installed.

So it looks like the bug relates to zope2.13 being packaged not the
Debian-way - e.g. it have all the dependencies inside it (zope.proxy,
zodb, etc...) instead of using system packages and that shipped
libraries somehow are not 100% isolated from the usual environment.

Thanks,
Kirill



More information about the pkg-zope-developers mailing list