[Distutils] Sandbox violation help

Dave Peterson dpeterson at enthought.com
Fri Dec 7 17:53:36 CET 2007


Dave Peterson wrote:
> Phillip J. Eby wrote:
>   
>> At 02:15 PM 12/6/2007 -0600, Dave Peterson wrote:
>>     
>>> PPS: I do believe other users have reported the same issues on other
>>> systems but we've never quite figured out what the cause is.  IIRC,
>>> telling them to manually download the source tarball and do a 'python
>>> setup.py install' seems to work just fine.
>>>
>>>       
>>>> Processing enthought.traits-2.0.1b1.tar.gz
>>>> Running enthought.traits-2.0.1b1/setup.py -q bdist_egg --dist-dir
>>>> /tmp/easy_install-Edu8TK/enthought.traits-2.0.1b1/egg-dist-tmp-IIITHW
>>>> error: Setup script exited with error: SandboxViolation:
>>>>
>>>>         
>>> open('/tmp/easy_install-WZrKOz/enthought.tvtk-2.0.0b2/temp/tmpTTJH2x/zZe82A 
>>>       
>>>> ', 131266, 384) {}
>>>>         
>> This looks like a bug that was fixed about a year ago: the sandboxing 
>> for os.open() (which is what the above appears to be calling) wouldn't 
>> allow you to write files *anywhere*, even if it was under a safe 
>> directory location.
>>
>> That would explain why you don't get the problem, but the user does.  
>> Check their setuptools version, using:
>>
>>     python -c "from pkg_resources import require; print 
>> require('setuptools')"
>>
>> The bug was fixed in 0.6c5, so anything older will have this problem 
>> with anything that uses os.open() to write files.
>>
>>     
>
> Thanks!
>   

Well, turns out I was premature on assuming this fixed the problem. The 
user was originally using 0.6c3 but has since upgraded. Here's the 
current output from your request as sent back by the user:

In [3]: pkg_resources.require("setuptools")
Out[3]: [setuptools 0.6c7 (/usr/lib/python2.4/site-packages)]


The original user is still reproducibly getting the following error -- 
it appears to have moved to a different project, but otherwise seems the 
same to me. In addition, one of our internal developers said he was 
getting this on one of his machines earlier as well but he was able to 
work around it by manually building the project in question and then 
going back to using easy_install to install the rest of the dependencies 
of the originally requested project. Most of us here are not seeing this 
error so I'm thinking it isn't something obviously wrong with the 
setup.py. You can look at the setup.py at :

https://svn.enthought.com/enthought/browser/tags/enthought.interpolate_2.0.0b3/setup.py

Note that this project does use numpy.distutils' setup function. Perhaps 
the error has something to do with that?

Does anyone have any tips on how to go about debugging what might be 
wrong? In particular, is there any way to get an idea of what the 
particular file being opened actually represents?

-- Dave

> Searching for enthought.interpolate
> Reading http://code.enthought.com/enstaller/eggs/source
> Best match: enthought.interpolate 2.0.0b3
> Downloading
> http://code.enthought.com/enstaller/eggs/source/enthought.interpolate-2.0.0
>b3.tar.gz Processing enthought.interpolate-2.0.0b3.tar.gz
> Running enthought.interpolate-2.0.0b3/setup.py -q bdist_egg --dist-dir
> /tmp/easy_install-jA35_C/enthought.interpolate-2.0.0b3/egg-dist-tmp-m08e-2
> error: Setup script exited with error: SandboxViolation:
> open('/home/hans/.python24_compiled/dummy_TuxOnStage_5383_gODMbl', 131266,
> 384) {}
>
> The package setup script has attempted [...]





More information about the Distutils-SIG mailing list