Ticket #3371 (closed defect: worksforme)
RuntimeError: instance.__dict__ not accessible in restricted mode
| Reported by: | Max Bowsher <maxb1@…> | Owned by: | cmlenz |
|---|---|---|---|
| Priority: | normal | Milestone: | not applicable |
| Component: | web frontend/mod_python | Version: | devel |
| Severity: | major | Keywords: | svn swig |
| Cc: | james82@…, Axel.Thimm@…, ilias@… |
Description
In all probability, this is not a bug in Trac, but in either Subversion, SWIG, or mod_python - I am filing this ticket principally so that there is somewhere to collect reports of this problem, and make notes of any debugging that is done.
I experience an intermittent Trac internal error, with the following environment:
- Debian 'etch'
- SWIG 1.3.28-1.1
- Apache HTTPD 2.2.2
- Subversion 1.3.2 (using the above SWIG)
- mod_python 3.2.9-rc3
- Trac 0.10dev r3492
Traceback (most recent call last):
File "/home/maxb/wc/trac/trunk/trac/web/main.py", line 314, in dispatch_request
dispatcher.dispatch(req)
File "/home/maxb/wc/trac/trunk/trac/web/main.py", line 199, in dispatch
resp = chosen_handler.process_request(req)
File "/home/maxb/wc/trac/trunk/trac/versioncontrol/web_ui/browser.py", line 95, in process_request
repos = self.env.get_repository(req.authname)
File "/home/maxb/wc/trac/trunk/trac/env.py", line 194, in get_repository
return RepositoryManager(self).get_repository(authname)
File "/home/maxb/wc/trac/trunk/trac/versioncontrol/api.py", line 70, in get_repository
self.repository_dir, authname)
File "/home/maxb/wc/trac/trunk/trac/versioncontrol/svn_fs.py", line 262, in get_repository
repos = SubversionRepository(dir, authz, self.log)
File "/home/maxb/wc/trac/trunk/trac/versioncontrol/svn_fs.py", line 279, in __init__
self.pool = Pool()
File "/home/maxb/wc/trac/trunk/trac/versioncontrol/svn_fs.py", line 158, in __init__
self._pool = core.svn_pool_create(self._parent_pool())
File "/usr/local/lib/svn-python/svn/core.py", line 177, in svn_pool_create
return Pool(parent_pool)
File "/usr/local/lib/svn-python/libsvn/core.py", line 1050, in svn_pool_create
return apply(_core.svn_pool_create, args)
File "/usr/local/lib/svn-python/libsvn/core.py", line 2868, in _wrap
obj.set_parent_pool(self)
File "/usr/local/lib/svn-python/libsvn/core.py", line 2781, in set_parent_pool
self._parent_pool = parent_pool or application_pool
File "/usr/local/lib/svn-python/libsvn/core.py", line 2766, in <lambda>
__setattr__ = lambda self, name, value: _swig_setattr(self, apr_pool_t, name, value)
File "/usr/local/lib/svn-python/libsvn/core.py", line 22, in _swig_setattr
return _swig_setattr_nondynamic(self,class_type,name,value,0)
File "/usr/local/lib/svn-python/libsvn/core.py", line 17, in _swig_setattr_nondynamic
self.__dict__[name] = value
RuntimeError: instance.__dict__ not accessible in restricted mode
Some googling suggests that this error is a hint that a Python object created in one subinterpreter is being used in a different subinterpreter. This is supported by the fact that my Trac setup does indeed involve Trac instances running under multiple subinterpreters.


