pytorch - 💡(How to fix) Fix DISABLED test_quiesce_repeatedly (__main__.TestCompileWorker) [1 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
pytorch/pytorch#176968Fetched 2026-04-08 00:23:34
View on GitHub
Comments
1
Participants
1
Timeline
78
Reactions
0
Participants
Timeline (top)
mentioned ×36subscribed ×36labeled ×5commented ×1

Error Message

Traceback (most recent call last): File "/var/lib/jenkins/workspace/test/inductor/test_compile_worker.py", line 91, in test_quiesce_repeatedly pool.shutdown() ~~~~~~~~~~~~~^^ File "/opt/conda/envs/py_3.14/lib/python3.14/site-packages/torch/_inductor/compile_worker/subproc_pool.py", line 342, in shutdown self.process.wait(300) ~~~~~~~~~~~~~~~~~^^^^^ File "/opt/conda/envs/py_3.14/lib/python3.14/subprocess.py", line 1278, in wait return self._wait(timeout=timeout) ~~~~~~~~~~^^^^^^^^^^^^^^^^^ File "/opt/conda/envs/py_3.14/lib/python3.14/subprocess.py", line 2075, in _wait raise TimeoutExpired(self.args, timeout) subprocess.TimeoutExpired: Command '['/opt/conda/envs/py_3.14/bin/python', '/opt/conda/envs/py_3.14/lib/python3.14/site-packages/torch/_inductor/compile_worker/main.py', '--pickler=torch._inductor.compile_worker.subproc_pool.SubprocPickler', '--kind=fork', '--workers=2', '--parent=83459', '--read-fd=13', '--write-fd=18', '--torch-key=pL6Xe0JkLeLgHAc13TNbCRT+Wl8bnHXEGU8vNIVSLaM=']' timed out after 300 seconds

Root Cause

This test was disabled because it is failing in CI. See recent examples and the most recent trunk workflow logs.

Code Example

Traceback (most recent call last):
  File "/var/lib/jenkins/workspace/test/inductor/test_compile_worker.py", line 91, in test_quiesce_repeatedly
    pool.shutdown()
    ~~~~~~~~~~~~~^^
  File "/opt/conda/envs/py_3.14/lib/python3.14/site-packages/torch/_inductor/compile_worker/subproc_pool.py", line 342, in shutdown
    self.process.wait(300)
    ~~~~~~~~~~~~~~~~~^^^^^
  File "/opt/conda/envs/py_3.14/lib/python3.14/subprocess.py", line 1278, in wait
    return self._wait(timeout=timeout)
           ~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/py_3.14/lib/python3.14/subprocess.py", line 2075, in _wait
    raise TimeoutExpired(self.args, timeout)
subprocess.TimeoutExpired: Command '['/opt/conda/envs/py_3.14/bin/python', '/opt/conda/envs/py_3.14/lib/python3.14/site-packages/torch/_inductor/compile_worker/__main__.py', '--pickler=torch._inductor.compile_worker.subproc_pool.SubprocPickler', '--kind=fork', '--workers=2', '--parent=83459', '--read-fd=13', '--write-fd=18', '--torch-key=pL6Xe0JkLeLgHAc13TNbCRT+Wl8bnHXEGU8vNIVSLaM=']' timed out after 300 seconds
RAW_BUFFERClick to expand / collapse

Platforms: linux

This test was disabled because it is failing in CI. See recent examples and the most recent trunk workflow logs.

Over the past 6 hours, it has been determined flaky in 3 workflow(s) with 3 failures and 3 successes.

Debugging instructions (after clicking on the recent samples link): DO NOT ASSUME THINGS ARE OKAY IF THE CI IS GREEN. We now shield flaky tests from developers so CI will thus be green but it will be harder to parse the logs. To find relevant log snippets:

  1. Click on the workflow logs linked above
  2. Click on the Test step of the job so that it is expanded. Otherwise, the grepping will not work.
  3. Grep for test_quiesce_repeatedly
  4. There should be several instances run (as flaky tests are rerun in CI) from which you can study the logs.
<details><summary>Sample error message</summary>
Traceback (most recent call last):
  File "/var/lib/jenkins/workspace/test/inductor/test_compile_worker.py", line 91, in test_quiesce_repeatedly
    pool.shutdown()
    ~~~~~~~~~~~~~^^
  File "/opt/conda/envs/py_3.14/lib/python3.14/site-packages/torch/_inductor/compile_worker/subproc_pool.py", line 342, in shutdown
    self.process.wait(300)
    ~~~~~~~~~~~~~~~~~^^^^^
  File "/opt/conda/envs/py_3.14/lib/python3.14/subprocess.py", line 1278, in wait
    return self._wait(timeout=timeout)
           ~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/py_3.14/lib/python3.14/subprocess.py", line 2075, in _wait
    raise TimeoutExpired(self.args, timeout)
subprocess.TimeoutExpired: Command '['/opt/conda/envs/py_3.14/bin/python', '/opt/conda/envs/py_3.14/lib/python3.14/site-packages/torch/_inductor/compile_worker/__main__.py', '--pickler=torch._inductor.compile_worker.subproc_pool.SubprocPickler', '--kind=fork', '--workers=2', '--parent=83459', '--read-fd=13', '--write-fd=18', '--torch-key=pL6Xe0JkLeLgHAc13TNbCRT+Wl8bnHXEGU8vNIVSLaM=']' timed out after 300 seconds
</details>

Test file path: inductor/test_compile_worker.py

For all disabled tests (by GitHub issue), see https://hud.pytorch.org/disabled.

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben @jataylo

extent analysis

Fix Plan

Increase Timeout for pool.shutdown()

The root cause of the issue is a timeout error when shutting down the process pool. To fix this, we need to increase the timeout value.

Code Changes

  1. Update the test_quiesce_repeatedly function in inductor/test_compile_worker.py to increase the timeout value:
    def test_quiesce_repeatedly(self):
        # ...
        pool.shutdown(timeout=600)  # Increase timeout to 10 minutes
        # ...
  2. Alternatively, you can also increase the timeout value globally for the subproc_pool module:
    import torch._inductor.compile_worker.subproc_pool
    
    torch._inductor.compile_worker.subproc_pool.SubprocPool.timeout = 600  # Increase timeout to 10 minutes

Verification

  1. Run the test_quiesce_repeatedly test again in CI to verify that the fix works.
  2. Check the logs to ensure that the test completes successfully without any timeout errors.

Extra Tips

  • Consider adding more logging statements to the test_quiesce_repeatedly function to help diagnose any future issues.
  • If the test still fails after increasing the timeout value, you may need to investigate further to determine the root cause of the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

pytorch - 💡(How to fix) Fix DISABLED test_quiesce_repeatedly (__main__.TestCompileWorker) [1 comments, 1 participants]