Skip to content

[Aten] Suppress valgrind leaks in libcuda - #34169

Closed
malfet wants to merge 1 commit into
pytorch:masterfrom
malfet:export-D20235974
Closed

malfet wants to merge 1 commit into
pytorch:masterfrom
malfet:export-D20235974

Conversation

@malfet

@malfet malfet commented Mar 3, 2020

Copy link
Copy Markdown
Collaborator

Summary: Valgrind have no insight how memory is being initialized by ioctls()

Test Plan: CI

Differential Revision: D20235974

Summary: Valgrind have no insight how memory is being initialized by ioctls()

Test Plan: CI

Differential Revision: D20235974

fbshipit-source-id: c28610622c036a28ac5ed03037aeb86cb1191a3f
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D20235974

@dr-ci

dr-ci Bot commented Mar 3, 2020 •

Copy link
Copy Markdown

💊 CircleCI build failures summary and remediations

As of commit 8b179ab (more details on the Dr. CI page):


  • 4/6 failures introduced in this PR

  • 2/6 broken upstream at merge base 04378eb since Mar 03

    Please rebase on the viable/strict branch (expand for instructions)

    If your commit is newer than viable/strict, you can try basing on an older, stable commit:

    git fetch origin viable/strict
    git rebase --onto viable/strict $(git merge-base origin/master HEAD)
    

    If your commit is older than viable/strict:

    git fetch origin viable/strict
    git rebase viable/strict
    

    Check out the recency history of this "viable master" tracking branch.


🕵️ 4 new failures recognized by patterns

The following build failures do not appear to be due to upstream breakages (reran 4 jobs to discount flakiness):

See CircleCI build pytorch_linux_xenial_py3_6_gcc5_4_test (1/4)

Step: "Test" (full log | pattern match details) <confirmed not flaky by 2 failures>

Mar 03 23:51:05 RuntimeError: Error downloading resource!
Mar 03 23:51:05  
Mar 03 23:51:05 During handling of the above exception, another exception occurred: 
Mar 03 23:51:05  
Mar 03 23:51:05 Traceback (most recent call last): 
Mar 03 23:51:05   File "tools/download_mnist.py", line 87, in <module> 
Mar 03 23:51:05     main() 
Mar 03 23:51:05   File "tools/download_mnist.py", line 80, in main 
Mar 03 23:51:05     download(path, url, options.quiet) 
Mar 03 23:51:05   File "tools/download_mnist.py", line 41, in download 
Mar 03 23:51:05     raise RuntimeError('Error downloading resource!') 
Mar 03 23:51:05 RuntimeError: Error downloading resource! 
Mar 03 23:51:05 + cleanup 
Mar 03 23:51:05 + retcode=1 
Mar 03 23:51:05 + set +x 
Mar 03 23:51:05 =================== sccache compilation log =================== 
Mar 03 23:51:05 ERROR:sccache::server: Compilation failed: Output { status: ExitStatus(ExitStatus(256)), stdout: "", stderr: "/tmp/torch_extensions/test_compilation_error_formatting/main.cpp: In function \'int main()\':\n/tmp/torch_extensions/test_compilation_error_formatting/main.cpp:2:23: error: expected \';\' before \'}\' token\n int main() { return 0 }\n                       ^\n" } 
Mar 03 23:51:05  
Mar 03 23:51:05 =========== If your build fails, please take a look at the log above for possible reasons =========== 
Mar 03 23:51:05 Compile requests                 68 
Mar 03 23:51:05 Compile requests executed        28 
Mar 03 23:51:05 Cache hits                       21 

See CircleCI build pytorch_linux_xenial_cuda10_1_cudnn7_py3_gcc7_test (2/4)

Step: "Test" (full log | pattern match details) <confirmed not flaky by 2 failures>

Mar 04 00:55:25 RuntimeError: Error downloading resource!
Mar 04 00:55:25  
Mar 04 00:55:25 During handling of the above exception, another exception occurred: 
Mar 04 00:55:25  
Mar 04 00:55:25 Traceback (most recent call last): 
Mar 04 00:55:25   File "tools/download_mnist.py", line 87, in <module> 
Mar 04 00:55:25     main() 
Mar 04 00:55:25   File "tools/download_mnist.py", line 80, in main 
Mar 04 00:55:25     download(path, url, options.quiet) 
Mar 04 00:55:25   File "tools/download_mnist.py", line 41, in download 
Mar 04 00:55:25     raise RuntimeError('Error downloading resource!') 
Mar 04 00:55:25 RuntimeError: Error downloading resource! 
Mar 04 00:55:25 + cleanup 
Mar 04 00:55:25 + retcode=1 
Mar 04 00:55:25 + set +x 
Mar 04 00:55:25 =================== sccache compilation log =================== 
Mar 04 00:55:25 =========== If your build fails, please take a look at the log above for possible reasons =========== 
Mar 04 00:55:25 Compile requests                19 
Mar 04 00:55:25 Compile requests executed        0 
Mar 04 00:55:25 Cache hits                       0 
Mar 04 00:55:25 Cache misses                     0 
Mar 04 00:55:25 Cache timeouts                   0 

See CircleCI build pytorch_linux_xenial_cuda10_1_cudnn7_py3_NO_AVX_NO_AVX2_test (3/4)

Step: "Test" (full log | pattern match details) <confirmed not flaky by 2 failures>

Mar 04 00:56:16 RuntimeError: Error downloading resource!
Mar 04 00:56:16  
Mar 04 00:56:16 During handling of the above exception, another exception occurred: 
Mar 04 00:56:16  
Mar 04 00:56:16 Traceback (most recent call last): 
Mar 04 00:56:16   File "tools/download_mnist.py", line 87, in <module> 
Mar 04 00:56:16     main() 
Mar 04 00:56:16   File "tools/download_mnist.py", line 80, in main 
Mar 04 00:56:16     download(path, url, options.quiet) 
Mar 04 00:56:16   File "tools/download_mnist.py", line 41, in download 
Mar 04 00:56:16     raise RuntimeError('Error downloading resource!') 
Mar 04 00:56:16 RuntimeError: Error downloading resource! 
Mar 04 00:56:16 + cleanup 
Mar 04 00:56:16 + retcode=1 
Mar 04 00:56:16 + set +x 
Mar 04 00:56:16 =================== sccache compilation log =================== 
Mar 04 00:56:16 =========== If your build fails, please take a look at the log above for possible reasons =========== 
Mar 04 00:56:16 Compile requests                19 
Mar 04 00:56:16 Compile requests executed        0 
Mar 04 00:56:16 Cache hits                       0 
Mar 04 00:56:16 Cache misses                     0 
Mar 04 00:56:16 Cache timeouts                   0 

See CircleCI build pytorch_linux_xenial_py3_clang5_asan_test (4/4)

Step: "Test" (full log | pattern match details) <confirmed not flaky by 2 failures>

Mar 04 01:48:39 RuntimeError: Error downloading resource!
Mar 04 01:48:39  
Mar 04 01:48:39 During handling of the above exception, another exception occurred: 
Mar 04 01:48:39  
Mar 04 01:48:39 Traceback (most recent call last): 
Mar 04 01:48:39   File "tools/download_mnist.py", line 87, in <module> 
Mar 04 01:48:39     main() 
Mar 04 01:48:39   File "tools/download_mnist.py", line 80, in main 
Mar 04 01:48:39     download(path, url, options.quiet) 
Mar 04 01:48:39   File "tools/download_mnist.py", line 41, in download 
Mar 04 01:48:39     raise RuntimeError('Error downloading resource!') 
Mar 04 01:48:39 RuntimeError: Error downloading resource! 
Mar 04 01:48:39 + cleanup 
Mar 04 01:48:39 + retcode=1 
Mar 04 01:48:39 + set +x 
Mar 04 01:48:39 =================== sccache compilation log =================== 
Mar 04 01:48:39 =========== If your build fails, please take a look at the log above for possible reasons =========== 
Mar 04 01:48:39 Compile requests                13 
Mar 04 01:48:39 Compile requests executed        0 
Mar 04 01:48:39 Cache hits                       0 
Mar 04 01:48:39 Cache misses                     0 
Mar 04 01:48:39 Cache timeouts                   0 

🚧 2 upstream failures recognized by patterns:

These were probably caused by upstream breakages:


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions on the GitHub issue tracker.

This comment has been revised 1 time.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request has been merged in 9d1c971.

ttumiel pushed a commit to ttumiel/pytorch that referenced this pull request Mar 4, 2020
Summary:
Pull Request resolved: pytorch#34169

Valgrind have no insight how memory is being initialized by ioctls()

Test Plan: CI

Reviewed By: seemethere

Differential Revision: D20235974

fbshipit-source-id: 46413afa4842e7d42582bbbda903438b1d98691f
pytorchmergebot pushed a commit that referenced this pull request Aug 7, 2026
Adds CUDA 13.4 CI ubuntu image and periodic tests, mirroring #161013 for CUDA 13.0. Since 13.4 shares the
CUDA 13 major already exercised by 13.0 and 13.2, no ATen/c10/caffe2 source changes
are needed:

- a `pytorch-linux-jammy-cuda13.4-cudnn9-py3-gcc11` image in `build.sh`,
- that image added to the `docker-builds` matrix so it is built and pushed, and
- a `linux-jammy-cuda13.4-py3.10-gcc11` build+test pair in `periodic.yml` running
  `jit_legacy` on an sm_75 g4dn runner.

Follow-up: The `nogpu_AVX512` and `nogpu_NO_AVX2` configs are left out for now.
They run the cpp tests under valgrind, and CUDA 13.4's `libcufft.so.12.4.0.16` reads
uninitialised values while initialising itself (`call_init`/`_dl_init`, before
`main`). valgrind runs with `--error-exitcode=1`, so those reports fail the shard
even though every frame is inside the closed-source library and no PyTorch code is
involved:

```
==132146== Conditional jump or move depends on uninitialised value(s)
==132146==    at 0x2EED9C8A: ??? (in /usr/local/cuda-13.4/targets/x86_64-linux/lib/libcufft.so.12.4.0.16)
==132146==    by 0x21FA0EA7: __pthread_once_slow (pthread_once.c:116)
==132146==    by 0x400647D: call_init.part.0 (dl-init.c:70)
...
==132146== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 21 from 5)
```

All 7 gtest cases pass; only the valgrind exit code fails the shard. The cuda13.0 and
cuda13.2 periodic jobs run these same configs and pass, so this is specific to 13.4.
The configs can be restored once cuFFT stops reporting these, or once a `libcufft`
suppression is added to `aten/tools/valgrind.sup` next to the existing `libcuda` ones
(cf. #34169).

Test Plan:
Full validation is the docker-builds job building the new image, and the periodic
linux-jammy-cuda13.4-py3.10-gcc11 build+test.

Authored with assistance from an AI coding assistant (Claude).

Pull Request resolved: #190639
Approved by: https://github.com/eqy, https://github.com/nWEIdia, https://github.com/atalman

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
ankitbhrdwj pushed a commit to ankitbhrdwj/pytorch that referenced this pull request Aug 12, 2026
Adds CUDA 13.4 CI ubuntu image and periodic tests, mirroring pytorch#161013 for CUDA 13.0. Since 13.4 shares the
CUDA 13 major already exercised by 13.0 and 13.2, no ATen/c10/caffe2 source changes
are needed:

- a `pytorch-linux-jammy-cuda13.4-cudnn9-py3-gcc11` image in `build.sh`,
- that image added to the `docker-builds` matrix so it is built and pushed, and
- a `linux-jammy-cuda13.4-py3.10-gcc11` build+test pair in `periodic.yml` running
  `jit_legacy` on an sm_75 g4dn runner.

Follow-up: The `nogpu_AVX512` and `nogpu_NO_AVX2` configs are left out for now.
They run the cpp tests under valgrind, and CUDA 13.4's `libcufft.so.12.4.0.16` reads
uninitialised values while initialising itself (`call_init`/`_dl_init`, before
`main`). valgrind runs with `--error-exitcode=1`, so those reports fail the shard
even though every frame is inside the closed-source library and no PyTorch code is
involved:

```
==132146== Conditional jump or move depends on uninitialised value(s)
==132146==    at 0x2EED9C8A: ??? (in /usr/local/cuda-13.4/targets/x86_64-linux/lib/libcufft.so.12.4.0.16)
==132146==    by 0x21FA0EA7: __pthread_once_slow (pthread_once.c:116)
==132146==    by 0x400647D: call_init.part.0 (dl-init.c:70)
...
==132146== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 21 from 5)
```

All 7 gtest cases pass; only the valgrind exit code fails the shard. The cuda13.0 and
cuda13.2 periodic jobs run these same configs and pass, so this is specific to 13.4.
The configs can be restored once cuFFT stops reporting these, or once a `libcufft`
suppression is added to `aten/tools/valgrind.sup` next to the existing `libcuda` ones
(cf. pytorch#34169).

Test Plan:
Full validation is the docker-builds job building the new image, and the periodic
linux-jammy-cuda13.4-py3.10-gcc11 build+test.

Authored with assistance from an AI coding assistant (Claude).

Pull Request resolved: pytorch#190639
Approved by: https://github.com/eqy, https://github.com/nWEIdia, https://github.com/atalman

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants