Skip to content
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

rustbuild: Assert directory creation succeeds #40337

Merged
merged 1 commit into from
Mar 9, 2017

Conversation

alexcrichton
Copy link
Member

I've been seeing failures on the bots when building jemalloc and my assumption
is that it's because cwd isn't created. That may be possible if this
create_dir_all call change in this commit fails, in which case we ignore the
error.

This commit updates the location to call create_dir_racy which handles
concurrent invocations, as multiple build scripts may be trying to create the
native dir.

I've been seeing failures on the bots when building jemalloc and my assumption
is that it's because cwd isn't created. That may be possible if this
`create_dir_all` call change in this commit fails, in which case we ignore the
error.

This commit updates the location to call `create_dir_racy` which handles
concurrent invocations, as multiple build scripts may be trying to create the
`native` dir.
@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member Author

cc @petrochenkov

another instance of this failure happened at https://travis-ci.org/rust-lang/rust/jobs/208686112 and I'm hoping this'll fix it.

Unfortunately I can't reproduce locally so this is just a guess to a fix.

@brson
Copy link
Contributor

brson commented Mar 7, 2017

@bors r+

Awesome function.

@bors
Copy link
Contributor

bors commented Mar 7, 2017

📌 Commit e412af2 has been approved by brson

@petrochenkov
Copy link
Contributor

petrochenkov commented Mar 7, 2017

My best guess is that maybe several processes try to create the native directory and subdirectories in it simultaneously. E.g. one job tries to create_all native/libbacktrace while another tries to create_all native/jemalloc and one of them fails somehow. So, create_dir_racy may help, or native could be pre-created in advance...

@alexcrichton
Copy link
Member Author

@petrochenkov yes that's my belief as well. I didn't find a great spot to create the dir ahead of time so I just left it here

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Mar 8, 2017
rustbuild: Assert directory creation succeeds

I've been seeing failures on the bots when building jemalloc and my assumption
is that it's because cwd isn't created. That may be possible if this
`create_dir_all` call change in this commit fails, in which case we ignore the
error.

This commit updates the location to call `create_dir_racy` which handles
concurrent invocations, as multiple build scripts may be trying to create the
`native` dir.
@alexcrichton
Copy link
Member Author

@bors: p=1

I think this is also causing #40358

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Mar 8, 2017
rustbuild: Assert directory creation succeeds

I've been seeing failures on the bots when building jemalloc and my assumption
is that it's because cwd isn't created. That may be possible if this
`create_dir_all` call change in this commit fails, in which case we ignore the
error.

This commit updates the location to call `create_dir_racy` which handles
concurrent invocations, as multiple build scripts may be trying to create the
`native` dir.
@bors
Copy link
Contributor

bors commented Mar 8, 2017

⌛ Testing commit e412af2 with merge 0806855...

@bors
Copy link
Contributor

bors commented Mar 8, 2017

💔 Test failed - status-travis

@alexcrichton
Copy link
Member Author

@bors: retry

  • build timeout

@bors
Copy link
Contributor

bors commented Mar 9, 2017

⌛ Testing commit e412af2 with merge 5c9208f...

bors added a commit that referenced this pull request Mar 9, 2017
rustbuild: Assert directory creation succeeds

I've been seeing failures on the bots when building jemalloc and my assumption
is that it's because cwd isn't created. That may be possible if this
`create_dir_all` call change in this commit fails, in which case we ignore the
error.

This commit updates the location to call `create_dir_racy` which handles
concurrent invocations, as multiple build scripts may be trying to create the
`native` dir.
@bors
Copy link
Contributor

bors commented Mar 9, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: brson
Pushing 5c9208f to master...

@bors bors merged commit e412af2 into rust-lang:master Mar 9, 2017
@alexcrichton alexcrichton deleted the racy-dirs branch March 17, 2017 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants