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

2015-01-18 Thread Debian Bug Tracking System
Processing control commands:

> severity -1 normal
Bug #774213 [zope2.13] zope2.13: import zope.security._proxy -> SystemError: 
dynamic module not initialized properly
Severity set to 'normal' from 'grave'
> tag -1 - unreproducible
Bug #774213 [zope2.13] zope2.13: import zope.security._proxy -> SystemError: 
dynamic module not initialized properly
Removed tag(s) unreproducible.

-- 
774213: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=774213
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems


--
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



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

2015-01-18 Thread Jonathan Wiltshire
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 "", line 1, in 
>   File 
> "/usr/lib/zope2.13/lib/python/zope.security-3.7.4.egg/zope/security/__init__.py",
>  line 19, in 
> 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 
> 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 
> 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 "", line 1, in 
  File 
"/usr/lib/zope2.13/lib/python/zope.security-3.7.4.egg/zope/security/__init__.py",
 line 19, in 
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 
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 
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  j...@debian.org
Debian Developer http://people.debian.org/~jmw

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



signature.asc
Description: Digital signature


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

2015-01-09 Thread Kirill Smelkov
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 "", line 1, in 
  File 
"/usr/lib/zope2.13/lib/python/zope.security-3.7.4.egg/zope/security/__init__.py",
 line 19, in 
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 
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 
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


-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



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

2015-01-09 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

> reopen 774213
Bug #774213 {Done: Barry Warsaw } [zope2.13] zope2.13: import 
zope.security._proxy -> SystemError: dynamic module not initialized properly
Bug reopened
Ignoring request to alter fixed versions of bug #774213 to the same values 
previously set
> thanks
Stopping processing here.

Please contact me if you need assistance.
-- 
774213: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=774213
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems


--
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



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

2015-01-07 Thread Barry Warsaw
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?

Cheers,
-Barry


-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



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

2014-12-30 Thread Kirill Smelkov
Package: zope2.13
Version: 2.13.22-1
Severity: grave
Justification: renders package unusable

Dear Maintainer,

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 "", line 1, in 
  File 
"/usr/lib/zope2.13/lib/python/zope.security-3.7.4.egg/zope/security/__init__.py",
 line 19, in 
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 
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 
from zope.security._proxy import _Proxy as Proxy, getChecker
SystemError: dynamic module not initialized properly


Full log demonstrating the problem is attached.

Thanks,
Kirill

 8< 
$ whoami 
kirr# non-root

$ pwd
/home/kirr

$ rm -rf zope   # make sure there are no user instances

$ dzhandle -z2.13 make-instance -m all ktest -u user:passwd
$ dzhandle -z2.13 list-instances 
ktest2.13   addon-mode=all addon-technique=tree-linked 
userfile=inituser purged

$ ls zope/instance/zope2.13/
ktest

$ dzhandle -z2.13 zopectl ktest start
Traceback (most recent call last):
  File "/usr/lib/zope2.13/bin/python", line 78, in 
execfile(__file__)
  File "/usr/lib/zope2.13/bin/zopectl", line 6, in 
Zope2.Startup.zopectl.run()
  File 
"/usr/lib/zope2.13/lib/python/Zope2-2.13.22.egg/Zope2/Startup/zopectl.py", line 
484, in run
exitstatus = main()
  File 
"/usr/lib/zope2.13/lib/python/Zope2-2.13.22.egg/Zope2/Startup/zopectl.py", line 
440, in main
options.realize(args)
  File 
"/usr/lib/zope2.13/lib/python/Zope2-2.13.22.egg/Zope2/Startup/zopectl.py", line 
158, in realize
ZDOptions.realize(self, *args, **kw)
  File "/usr/lib/zope2.13/lib/python/zdaemon-2.0.7.egg/zdaemon/zdoptions.py", 
line 290, in realize
self.load_schema()
  File "/usr/lib/zope2.13/lib/python/zdaemon-2.0.7.egg/zdaemon/zdoptions.py", 
line 338, in load_schema
self.schema = ZConfig.loadSchema(self.schemafile)
  File "/usr/lib/zope2.13/lib/python/ZConfig-2.9.1.egg/ZConfig/loader.py", line 
33, in loadSchema
return SchemaLoader().loadURL(url)
  File "/usr/lib/zope2.13/lib/python/ZConfig-2.9.1.egg/ZConfig/loader.py", line 
67, in loadURL
return self.loadResource(r)
  File "/usr/lib/zope2.13/lib/python/ZConfig-2.9.1.egg/ZConfig/loader.py", line 
195, in loadResource
schema = ZConfig.schema.parseResource(resource, self)
  File "/usr/lib/zope2.13/lib/python/ZConfig-2.9.1.egg/ZConfig/schema.py", line 
27, in parseResource
xml.sax.parse(resource.file, parser)
  File "/usr/lib/python2.7/xml/sax/__init__.py", line 33, in parse
parser.parse(source)
  File "/usr/lib/python2.7/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
  File "/usr/lib/python2.7/xml/sax/expatreader.py", line 210, in feed
self._parser.Parse(data, isFinal)
  File "/usr/lib/python2.7/xml/sax/expatreader.py", line 304, in start_element
self._cont_handler.startElement(name, AttributesImpl(attrs))
  File "/usr/lib/zope2.13/lib/python/ZConfig-2.9.1.egg/ZConfig/schema.py", line 
103, in startElement
getattr(self, "start_" + name)(attrs)
  File "/usr/lib/zope2.13/lib/python/ZConfig-2.9.1.egg/ZConfig/schema.py", line 
306, in start_import
src = self._loader.schemaComponentSource(pkg, file)
  File "/usr/lib/zope2.13/lib/python/ZConfig-2.9.1.egg/ZConfig/loader.py", line 
212, in schemaComponentSource
__import__(package)
  File "/usr/lib/zope2.13/lib/python/Zope2-2.13.22.egg/ZServer/__init__.py", 
line 41, in 
from HTTPServer import zhttp_server, zhttp_handler
  File "/usr/lib/zope2.13/lib/python/Zope2-2.13.22.egg/ZServer/HTTPServer.py", 
line 44, in 
from HTTPResponse import make_response
  File 
"/usr/lib/zope2.13/lib/python/Zope2-2.13.22.egg/ZServer/HTTPResponse.py", line 
29, in 
from ZPublisher.HTTPResponse import HTTPResponse # XXX WTF?
  File "/usr/lib/zope2.13/lib/python/Zope2-2.13.22.egg/ZPublisher/__init__.py", 
line 20, in 
from zExceptions import NotFound, BadRequest, InternalError, Forbidden
  File 
"/usr/lib/zope2.13/lib/python/zExceptions-2.13.0.egg/zExceptions/__init__.py", 
line 24, in 
from zope.publisher.interfaces import INotFound
  File 
"/usr/lib/zope2.13/lib/python/zope.publisher-3.12.6.egg/zope/publisher/interfaces/__init__.py",
 line 26, in 
from zope.security.interfaces import IParticipation
  File 
"/usr/lib/zope2.13/lib/python/zope.security-3.7.4.egg/zope/security/__init__.py",
 line 1