-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnpickleableException.dump blows up when exception comes from setuptools #440
Comments
Original comment by embray (Bitbucket: embray, GitHub: embray): The following should fix, or at least work around the issue. It's not exactly pretty, but then again this code is not dealing in the realm of sanity in the first place :)
|
Original comment by embray (Bitbucket: embray, GitHub: embray): This issue was also just reported here: http://bugs.python.org/setuptools/issue162 |
Original comment by georgevreilly (Bitbucket: georgevreilly, GitHub: georgevreilly): I'm seeing a similar issue when zope.interface is implicitly installed via |
Original comment by georgevreilly (Bitbucket: georgevreilly, GitHub: georgevreilly): If I run |
Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco): So while I've resolved the failure here (and included a regression test to prevent it in the future), there's something more sinister going on. These infinite recursion were caused by SandboxViolations, which are pickleable. They're just not pickleable when the instance being pickled is bound to a class that was referenced outside the sandbox. That is, the same issue that caused the infinite recursion in the UnpickleableException also affects SandboxViolations and maybe other Exceptions in the sandbox module itself. |
Originally reported by: embray (Bitbucket: embray, GitHub: embray)
Another odd one, but pretty bad.
I've found that sometimes when running
setuptools.sandbox.run_setup
, if an exception occurs in the setup likeSandboxViolation
, when theExceptionSaver
tries to pickle it it will fail because of:The code, as written, then just tries to repr the exception and wrap in the an
UnpickleableException
and then pickle that. But that fails too for the same reason:This occurs because by the time
ExceptionSaver.__exit__
is entered, thehide_setuptools
has occurred and there are two copies of thesetuptools.sandbox
module in play, basically.This actually tends to lead to a
MemoryError
before a recursionRuntimeError
is reached due to the resulting exponential growth in the size ofrepr(exc)
:(The text was updated successfully, but these errors were encountered: