1. Python CFFI
  2. Untitled project
  3. cffi
Issue #149 duplicate

SandboxViolation: mkdir('/usr/lib/python2.7/site-packages/cryptography/hazmat/bindings/__pycache__', 511) {}

Zooko O'Whielacronx
created an issue

Comments (6)

  1. Zooko O'Whielacronx reporter

    I'm not sure if it is a duplicate or not — you can probably understand it better than I can. I thought that https://bitbucket.org/cffi/cffi/issue/109/enable-sane-packaging-for-cffi was about when it does a build (it currently does a build on-demand when the module is imported, and https://bitbucket.org/cffi/cffi/issue/109/enable-sane-packaging-for-cffi is about changing it to do a build only when instructed to build, if I understand correctly). I thought that this issue has to do with it trying to write the pycache file in the wrong place, or else perhaps with it trying to catch exceptions from an attempt to write the pycache file, but not catching the type of exception that actually gets raised in this case.

    But I could be wrong about some or all of that.

  2. Armin Rigo

    Then I'm complaining that you're just pointing to some long report without any explanation about what this bug is about from the point of view of cffi :-) Are you sure you shouldn't report it first to the hazmat and/or pyopenssl projects? I can tell you exactly what the rules of cffi itself are, for trying to create pycache directories and where to put them, and they make somehow sense in the context of cffi so far. But I don't know how hazmat nor pyopenssl are invoking them. In particular there are easy traps in which you can fall. But, as far as I understand, I should not be discussing this with you, but with hazmat or pyopenssl people...

  3. Zooko O'Whielacronx reporter

    It appeared that pyOpenSSL 0.14 was already installed, judging from the result of "pkg_resources.require()", but for reasons obscure to me, this error message would happen when the user tried to build Tahoe-LAFS (which depends on pyOpenSSL):

    error: SandboxViolation: mkdir('/usr/lib/python2.7/site-packages/cryptography/hazmat/bindings/__pycache__', 511) {}
    
    The package setup script has attempted to modify files on your system
    that are not within the EasyInstall build area, and has been aborted.
    
    This package cannot be safely installed by EasyInstall, and may not
    support alternate installation locations even if you run its setup
    script by hand.  Please inform the package's author and the EasyInstall
    maintainers to find out if a fix or workaround is available.
    

    I know that pyOpenSSL 0.14 depends on "cryptography":

    https://github.com/pyca/pyopenssl/blob/release-0.14/setup.py#L37

  4. Armin Rigo

    Sorry for the tone I've used in my older messages above. What I mean to say is that I'm afraid the issue is just another version of the issue #109. However, I'm not sure it is. I'm now closing as "duplicate" because I'm still missing a way to reproduce the crash. If you can give a one-liner (as I suspect) that would trigger the issue, I can investigate.

  5. Log in to comment