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

Jonathan Wiltshire jmw at debian.org
Sun Jan 18 17:41:10 UTC 2015


Control: severity -1 normal
Control: tag -1 - unreproducible

Hi,

On Tue, Dec 30, 2014 at 02:32:17PM +0400, Kirill Smelkov wrote:
> 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 .
> 
> The bug could be demonstrated in essence this way:
> 
>     $ /usr/lib/zope2.13/bin/python 
>     
>     >>> import zope.security._proxy
>     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

We have been working on this as part of a BSP and have some findings.

The problem appears to be when zope2.13, and python-zope.proxy are
installed but NOT python-zope.security. In that situation:

import zope.security
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

It seems that zope.security gets loaded from the bundled copy, and
zope.proxy from the system. This explodes loudly.

If both or neither external packages are installed, everything is fine.

The reporter got into this situation by installing python-zope.security,
which has a dependency on python-zope.proxy, and then removing
python-zope.security. python-zope.proxy therefore stays around, causing the
SystemError.

Downgrading since it all works fine if both extensions are bundled or both
extensions are external, and 'apt install python-zope.security' does the
right thing.

I notice that the external packages are not the same versions as their
bundled counterparts, so perhaps an interface changed at some point or a
rebuild is needed or something.


-- 
Jonathan Wiltshire                                      jmw at debian.org
Debian Developer                         http://people.debian.org/~jmw

4096R: 0xD3524C51 / 0A55 B7C5 1223 3942 86EC  74C3 5394 479D D352 4C51

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-zope-developers/attachments/20150118/76f455e9/attachment.sig>


More information about the pkg-zope-developers mailing list