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

[beta] Fixes #46775 -- don't mutate the process's environment in Command::exec #55611

Merged
merged 7 commits into from
Nov 8, 2018

Conversation

@rust-highfive
Copy link
Collaborator

r? @aidanhs

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

@rust-highfive
Copy link
Collaborator

⚠️ Warning ⚠️

  • Pull requests are usually filed against the master branch for this repo, but this one is against beta. Please double check that you specified the right target!

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 2, 2018
@alexcrichton
Copy link
Member Author

r? @Mark-Simulacrum

This commit moves a number of our encrypted credentials stored in
configuration files in this repository to env vars on the web UI. This
will hopefully make it easier to rotate credentials in the future as
well as quickly change them if the need arises. (quicker than landing a
PR that is).

This also updates the travis deployment process to always use the `aws`
command line tool which we're already installing on Linux and should
enable us to avoid all `dpl` gem issues as well as have greater control
over what's going where.
@alexcrichton
Copy link
Member Author

I've also included #55304 to help switch over our deploy credentials.

ping r? @Mark-Simulacrum or @pietroalbini

@pietroalbini
Copy link
Member

@bors r+ p=1

@bors
Copy link
Contributor

bors commented Nov 6, 2018

📌 Commit dc86ac9 has been approved by pietroalbini

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 6, 2018
@pietroalbini
Copy link
Member

Uh, wait, the actual backport is missing?

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 6, 2018
…mmand::exec

Instead, pass the environment to execvpe, so the kernel can apply it directly to the new process. This avoids a use-after-free in the case where exec'ing the new process fails for any reason, as well as a race condition if there are other threads alive during the exec.
@alexcrichton
Copy link
Member Author

@bors: r=pietroalbini

er yes, I didn't expect this branch hadn't been looked at yet...

@bors
Copy link
Contributor

bors commented Nov 6, 2018

📌 Commit a12b62e has been approved by pietroalbini

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 6, 2018
@bors
Copy link
Contributor

bors commented Nov 6, 2018

⌛ Testing commit a12b62e with merge c4d00167c14f4feecfc9fa94d862765d578e9f8c...

@bors
Copy link
Contributor

bors commented Nov 6, 2018

💔 Test failed - status-appveyor

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 6, 2018
@alexcrichton
Copy link
Member Author

@bors: retry

  • 3 hr timeout

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 6, 2018
@bors
Copy link
Contributor

bors commented Nov 7, 2018

📌 Commit 39fa89b has been approved by alexcrichton

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 7, 2018
@bors
Copy link
Contributor

bors commented Nov 7, 2018

⌛ Testing commit 39fa89b with merge 00b9ddb...

bors added a commit that referenced this pull request Nov 7, 2018
[beta] Fixes #46775 -- don't mutate the process's environment in Command::exec

This is a backport of the following PRs:

* #55359
* #55569
* #55304
@bors
Copy link
Contributor

bors commented Nov 8, 2018

💔 Test failed - status-appveyor

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 8, 2018
Fix the recent spurious 3 hour timeouts.
This should allow the timings be more balanced.
@alexcrichton
Copy link
Member Author

@bors: r+

@bors
Copy link
Contributor

bors commented Nov 8, 2018

📌 Commit 7fe9f76 has been approved by alexcrichton

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 8, 2018
@bors
Copy link
Contributor

bors commented Nov 8, 2018

⌛ Testing commit 7fe9f76 with merge 6a475253ef1aa602cc40fdb450f5b8e1dc05960d...

@bors
Copy link
Contributor

bors commented Nov 8, 2018

💔 Test failed - status-travis

@rust-highfive
Copy link
Collaborator

The job dist-various-1 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[01:04:42] CC_armebv7r_none_eabi=arm-none-eabi-gcc
[01:04:42] S=/checkout
[01:04:42] _=/bin/sh
[01:04:42] TOOLSTATE_REPO_ACCESS_TOKEN=[secure]
[01:04:42] TRAVIS=true
[01:04:42] RUST_RELEASE_CHANNEL=beta
[01:04:42] PATH=/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
[01:04:42] RUN_MAKE_TARGETS=thumbv6m-none-eabi,thumbv7m-none-eabi,thumbv7em-none-eabi,thumbv7em-none-eabihf
[01:04:42] RUSTC=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc
[01:04:42] RUST_BUILD_STAGE=stage2-thumbv6m-none-eabi
[01:04:42] BOOTSTRAP_PYTHON=/usr/bin/python2.7
[01:04:42] SCRIPT=python2.7 ../x.py test --target thumbv6m-none-eabi,thumbv7m-none-eabi,thumbv7em-none-eabi,thumbv7em-none-eabihf src/test/run-make &&       python2.7 ../x.py dist --target asmjs-unknown-emscripten,wasm32-unknown-emscripten,x86_64-rumprun-netbsd,mips-unknown-linux-musl,mipsel-unknown-linux-musl,arm-unknown-linux-musleabi,arm-unknown-linux-musleabihf,armv5te-unknown-linux-gnueabi,armv5te-unknown-linux-musleabi,armv7-unknown-linux-musleabihf,aarch64-unknown-linux-musl,sparc64-unknown-linux-gnu,x86_64-unknown-redox,thumbv6m-none-eabi,thumbv7m-none-eabi,thumbv7em-none-eabi,thumbv7em-none-eabihf,riscv32imc-unknown-none-elf,riscv32imac-unknown-none-elf,armebv7r-none-eabi,armebv7r-none-eabihf,armv7r-none-eabi,armv7r-none-eabihf
[01:04:42] AR=ar
[01:04:42] TRAVIS_BRANCH=auto
[01:04:42] RUSTC_BOOTSTRAP=1
[01:04:42] HOST_RPATH_DIR=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib
[01:04:42] SCCACHE_BUCKET=rust-lang-ci-sccache2
[01:04:42] PWD=/checkout/obj
[01:04:42] CI_JOB_NAME=dist-various-1
[01:04:42] TARGET_RPATH_DIR=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/thumbv6m-none-eabi/lib
[01:04:42] LD_LIB_PATH_ENVVAR=LD_LIBRARY_PATH
[01:04:42] PYTHON=/usr/bin/python2.7
[01:04:42] HOME=/home/user
[01:04:42] LD_LIBRARY_PATH=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib
[01:04:42] HOSTNAME=2229b40746a0
[01:04:42] CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-gcc
[01:04:42] SHLVL=2
[01:04:42] CC= 
[01:04:42] BUILD_DIR=/checkout/obj/build
[01:04:42] BUILD_DIR=/checkout/obj/build
[01:04:42] RUST_TEST_TMPDIR=/checkout/obj/build/tmp
[01:04:42] LLVM_CXXFLAGS=
[01:04:42] RUSTFLAGS=--cap-lints=allow
[01:04:42] STAGING_DIR=/tmp
[01:04:42] TMPDIR=/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/thumb-none-cortex-m/thumb-none-cortex-m
[01:04:42] TARGETS=asmjs-unknown-emscripten,wasm32-unknown-emscripten,x86_64-rumprun-netbsd,mips-unknown-linux-musl,mipsel-unknown-linux-musl,arm-unknown-linux-musleabi,arm-unknown-linux-musleabihf,armv5te-unknown-linux-gnueabi,armv5te-unknown-linux-musleabi,armv7-unknown-linux-musleabihf,aarch64-unknown-linux-musl,sparc64-unknown-linux-gnu,x86_64-unknown-redox,thumbv6m-none-eabi,thumbv7m-none-eabi,thumbv7em-none-eabi,thumbv7em-none-eabihf,riscv32imc-unknown-none-elf,riscv32imac-unknown-none-elf,armebv7r-none-eabi,armebv7r-none-eabihf,armv7r-none-eabi,armv7r-none-eabihf
[01:04:42] RUST_CONFIGURE_ARGS=--musl-root-armv5te=/musl-armv5te       --musl-root-arm=/musl-arm       --musl-root-armhf=/musl-armhf       --musl-root-armv7=/musl-armv7       --musl-root-aarch64=/musl-aarch64       --musl-root-mips=/musl-mips       --musl-root-mipsel=/musl-mipsel       --enable-emscripten       --disable-docs --set build.print-step-timings --enable-verbose-tests --enable-sccache --disable-manage-submodules --enable-locked-deps --enable-cargo-native-static --disable-dist-src --release-channel=beta --enable-llvm-static-stdcpp --set rust.remap-debuginfo --enable-missing-tools
[01:04:42] MAKEFLAGS=
[01:04:42] MFLAGS=
[01:04:42] BOOTSTRAP_PARENT_ID=1052
[01:04:42] BOOTSTRAP_PARENT_ID=1052
[01:04:42] __COMPAT_LAYER=RunAsInvoker
[01:04:42] CC_x86_64_unknown_redox=x86_64-unknown-redox-gcc
[01:04:42] BUILD=x86_64-unknown-linux-gnu
[01:04:42] CXX= 
[01:04:42] AWS_ACCESS_KEY_ID=[secure]
[01:04:42] CC_sparc64_unknown_linux_gnu=sparc64-linux-gnu-gcc
[01:04:42] CC_sparc64_unknown_linux_gnu=sparc64-linux-gnu-gcc
[01:04:42] CARGO_HOME=/cargo
[01:04:42] RUSTC_LINKER=arm-none-eabi-gcc
[01:04:42] SCCACHE_REGION=us-west-1
[01:04:42] CC_mips_unknown_linux_musl=mips-openwrt-linux-gcc
[01:04:42] LLVM_COMPONENTS=
[01:04:42] TERM=xterm
[01:04:42] MAKELEVEL=1
[01:04:42] mkdir -p /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/thumb-none-cortex-m/thumb-none-cortex-m
[01:04:42] cd /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/thumb-none-cortex-m/thumb-none-cortex-m && rm -rf cortex-m
[01:04:42] cd /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/thumb-none-cortex-m/thumb-none-cortex-m && bash -x /checkout/src/test/run-make/thumb-none-cortex-m/../git_clone_sha1.sh cortex-m https://github.com/rust-embedded/cortex-m a448e9156e2cb1e556e5441fd65426952ef4b927 
[01:04:42] Makefile:31: recipe for target 'all' failed
[01:04:42] 
[01:04:42] ------------------------------------------
[01:04:42] stderr:
[01:04:42] stderr:
[01:04:42] ------------------------------------------
[01:04:42] + PROJECT_NAME=cortex-m
[01:04:42] + URL=https://github.com/rust-embedded/cortex-m
[01:04:42] + SHA1=a448e9156e2cb1e556e5441fd65426952ef4b927
[01:04:42] + git clone https://github.com/rust-embedded/cortex-m cortex-m
[01:04:42] Cloning into 'cortex-m'...
[01:04:42] fatal: unable to access 'https://github.com/rust-embedded/cortex-m/': Could not resolve host: github.com
[01:04:42] + err_exit
[01:04:42] + echo ERROR:
[01:04:42] + exit 1
[01:04:42] make: *** [all] Error 1
[01:04:42] ------------------------------------------
[01:04:42] 
[01:04:42] thread '[run-make] run-make/thumb-none-cortex-m' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3284:9
[01:04:42] note: Run with `RUST_BACKTRACE=1` for a backtrace.
---
[01:04:42] 
[01:04:42] thread 'main' panicked at 'Some tests failed', tools/compiletest/src/main.rs:503:22
[01:04:42] 
[01:04:42] 
[01:04:42] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/thumbv6m-none-eabi/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/run-make" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make" "--stage-id" "stage2-thumbv6m-none-eabi" "--mode" "run-make" "--target" "thumbv6m-none-eabi" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--linker" "arm-none-eabi-gcc" "--host-rustcflags" "-Crpath -O -Zunstable-options " "--target-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/thumbv6m-none-eabi/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--llvm-version" "8.0.0svn\n" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[01:04:42] 
[01:04:42] 
[01:04:42] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --target thumbv6m-none-eabi,thumbv7m-none-eabi,thumbv7em-none-eabi,thumbv7em-none-eabihf src/test/run-make
[01:04:42] Build completed unsuccessfully in 0:58:12
---
travis_time:end:013250c3:start=1541659846653435522,finish=1541659846666376666,duration=12941144
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:0395efc2
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:06bde400
travis_time:start:06bde400
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:15a65eb5
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 8, 2018
@alexcrichton
Copy link
Member Author

@bors: retry

Good ol' network failures

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 8, 2018
@kennytm
Copy link
Member

kennytm commented Nov 8, 2018

@bors p=172

@bors
Copy link
Contributor

bors commented Nov 8, 2018

⌛ Testing commit 7fe9f76 with merge bf00632...

bors added a commit that referenced this pull request Nov 8, 2018
[beta] Fixes #46775 -- don't mutate the process's environment in Command::exec

This is a backport of the following PRs:

* #55359
* #55569
* #55304
* #55661
@bors
Copy link
Contributor

bors commented Nov 8, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing bf00632 to beta...

@bors bors merged commit 7fe9f76 into rust-lang:beta Nov 8, 2018
@alexcrichton alexcrichton deleted the beta-next branch November 8, 2018 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants