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

add some more context to errors locating the native engine binary #6575

Merged
merged 2 commits into from Oct 18, 2018

Conversation

Projects
None yet
4 participants
@cosmicexplorer
Contributor

cosmicexplorer commented Sep 30, 2018

Problem

You can get "no space left on device" errors from writing too many things to /tmp -- if that happens to occur as you write the native engine binary to disk from a pkg_resources.resource_stream(), all you see is "no space left on device". This is happening on my arch linux laptop for whatever reason but has happened on OSX as well.

Solution

Catch IOError and OSError in Native#binary and wrap them in an error message with the attempted path being written to.

@illicitonion

Thanks!

output_fp.write(input_fp.read())
except (IOError, OSError) as e:
raise self.BinaryLocationError(
"Error loading the native engine binary from path {}: {}".format(lib_path, e),

This comment has been minimized.

@illicitonion

illicitonion Oct 1, 2018

Contributor

"loading from" is possibly a little misleading here; what it's actually doing is unpacking the native engine binary to that path...

@baroquebobcat

👍 modulo @illicitonion's comment

@stuhood

stuhood approved these changes Oct 4, 2018

@cosmicexplorer cosmicexplorer force-pushed the cosmicexplorer:add-native-engine-binary-error-message branch from 718a319 to c8f8b7f Oct 13, 2018

@cosmicexplorer cosmicexplorer merged commit 4884683 into pantsbuild:master Oct 18, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment