Repository: pytorch
Issue: Tests do not pass even though build successful
Labels: oncall: distributed,triaged

## 🐛 Bug

I have been trying to build PyTorch from source on a newly set up Ubuntu machine with two Nvidia GPUs for several weeks. Though the build succeeds, no matter what I try, I can't get the tests in `tests/run_test.py` to pass:

```
FAILED (failures=8)
   44 distributed/elastic/multiprocessing/api_test failed!
   43 test_autograd failed! Received signal: SIGBUS
   42 test_cpp_extensions_aot_no_ninja failed!
   41 test_cpp_extensions_aot_ninja failed!
   40 test_cpp_extensions_jit failed!
   39 distributed/test_c10d_spawn_gloo failed! Received signal: SIGBUS
   38 test_cuda failed! Received signal: SIGBUS
   37 distributed/test_data_parallel failed! Received signal: SIGBUS
   36 distributed/test_distributed_fork failed!
   35 distributed/test_distributed_spawn failed!
   34 distributions/test_constraints failed!
   33 test_jit failed! Received signal: SIGBUS
   32 test_linalg failed!
   31 test_module_init failed! Received signal: SIGBUS
   30 test_nn failed! Received signal: SIGBUS
   29 test_optim failed!
   28 test_quantization failed!
   27 test_jit_profiling failed! Received signal: SIGBUS
   26 test_jit_legacy failed! Received signal: SIGBUS
   25 test_reductions failed!
   24 test_license failed!
   23 distributed/pipeline/sync/skip/test_api failed!
   22 distributed/pipeline/sync/skip/test_gpipe failed!
   21 distributed/pipeline/sync/skip/test_inspect_skip_layout failed!
   20 distributed/pipeline/sync/skip/test_leak failed!
   19 distributed/pipeline/sync/skip/test_portal failed!
   18 distributed/pipeline/sync/skip/test_stash_pop failed!
   17 distributed/pipeline/sync/skip/test_tracker failed!
   16 distributed/pipeline/sync/skip/test_verify_skippables failed!
   15 distributed/pipeline/sync/test_balance failed!
   14 distributed/pipeline/sync/test_bugs failed!
   13 distributed/pipeline/sync/test_checkpoint failed!
   12 distributed/pipeline/sync/test_copy failed!
   11 distributed/pipeline/sync/test_deferred_batch_norm failed!
   10 distributed/pipeline/sync/test_dependency failed!
    9 distributed/pipeline/sync/test_inplace failed!
    8 distributed/pipeline/sync/test_microbatch failed!
    7 distributed/pipeline/sync/test_phony failed!
    6 distributed/pipeline/sync/test_pipe failed!
    5 distributed/pipeline/sync/test_pipeline failed!
    4 distributed/pipeline/sync/test_stream failed!
    3 distributed/pipeline/sync/test_transparency failed!
    2 distributed/pipeline/sync/test_worker failed!
    1 distributed/elastic/events/lib_test failed!
13609 distributed/elastic/multiprocessing/api_test failed!
```

 I'm following the steps described [in the official repo](https://github.com/pytorch/pytorch#from-source).

[Here](https://gist.github.com/gloryVine/b1de5980b504a4e84199998e1b6bf0c6) is the complete output of `python setup.py develop`, and [here](https://gist.github.com/gloryVine/4292548fec5aa20da0e41aa14398e669) the complete output of `tests/run_test.py --continue-through-error `.

## Expected behavior

I want a build from source which passes all the tests.

## Environment

PyTorch version: 1.9.0a0+git94ef2b9
Is debug build: False
CUDA used to build PyTorch: 11.3
ROCM used to build PyTorch: N/A

OS: Ubuntu 20.04.2 LTS (x86_64)
GCC version: (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Clang version: Could not collect
CMake version: version 3.19.6

Python version: 3.7 (64-bit runtime)
Is CUDA available: True
CUDA runtime version: 11.3.58
GPU models and configuration:
GPU 0: NVIDIA GeForce RTX 2080 Ti
GPU 1: NVIDIA GeForce RTX 2080 Ti

Nvidia driver version: 465.19.01
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.2.0
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.2.0
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.2.0
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.2.0
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.2.0
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.2.0
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.2.0
/usr/local/cuda-11.3/targets/x86_64-linux/lib/libcudnn.so.8.2.0
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip3] numpy==1.20.1
[pip3] torch==1.9.0a0+git94ef2b9
[conda] blas                      1.0                         mkl
[conda] magma-cuda113             2.5.2                         1    pytorch
[conda] mkl                       2021.2.0           h06a4308_296
[conda] mkl-include               2021.2.0           h06a4308_296
[conda] mkl-service               2.3.0            py37h27cfd23_1
[conda] mkl_fft                   1.3.0            py37h42c9631_2
[conda] mkl_random                1.2.1            py37ha9443f7_2
[conda] numpy                     1.20.1           py37h93e21f0_0
[conda] numpy-base                1.20.1           py37h7d8b39e_0
[conda] torch                     1.9.0a0+git94ef2b9           dev_0    <develop>


cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @agolynski @SciPioneer @H-Huang @mrzzd @cbalioglu @gcramer23