Skip to content

test(backends): raise lock-test timeout to tolerate shared GPU nodes - #1726

Merged
planetf1 merged 1 commit into
generative-computing:mainfrom
planetf1:issue-1602
Oct 14, 2026
Merged

planetf1 merged 1 commit into
generative-computing:mainfrom
planetf1:issue-1602

Conversation

@planetf1

@planetf1 planetf1 commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Pull Request

Issue

Fixes #1602

Description

The nightly GPU verification intermittently fails test_generate_with_lock_does_not_block_when_awaiting_value with a TimeoutError that looks like the deadlock the test exists to catch, but is not one: on a shared GPU node with a heavy co-tenant, the 100-token streaming generation simply takes longer than the test's 30s asyncio.wait_for timeout (observed 2026-09-01, PR #1587 nightly run). The failure sends someone hunting for a concurrency bug that is not there.

This raises the timeout to 120s with a comment recording why. A genuine deadlock still fails the test; it just takes longer to surface. The tradeoff (a slower failure when the deadlock is real) is worth it for a qualitative nightly test whose false positives cost more than its slow negatives.

Testing

  • Tests added to the respective file if code was changed
  • New code has 100% coverage if code was added
  • Ensure existing tests and github automation passes (a maintainer will kick off the github automation when the rest of the PR is populated)

uv run pytest "test/backends/test_huggingface.py::test_generate_with_lock_does_not_block_when_awaiting_value" — 1 passed in 50s locally (Granite 4.1 3B on MPS, model cached). The timeout change itself is only exercised under heavy shared-GPU load, so the nightly GPU verification is the real check; marking that expectation here rather than claiming local proof.

Attribution

  • AI coding assistants used

Adding a new component, requirement, sampling strategy, or tool?

If your PR adds or modifies one of the types below, check the matching box. A checklist of type-specific review items will be posted as a comment.

  • Component
  • Requirement
  • Sampling Strategy
  • Tool

NOTE: Please ensure you have an issue that has been acknowledged by a core contributor and routed you to open a pull request against this repository. Otherwise, please open an issue before continuing with this pull request.

test_generate_with_lock_does_not_block_when_awaiting_value failed on
the 2026-09-01 nightly GPU verification with the 30s asyncio.wait_for
timeout firing while a heavy co-tenant slowed generation, with nothing
wrong (generative-computing#1602). Raise the timeout to 120s so variable GPU compute
latency does not trip the deadlock check; a genuine deadlock still
fails, it just takes longer to surface.

Fixes generative-computing#1602

Assisted-by: pi
Signed-off-by: Nigel Jones <[email protected]>
@planetf1
planetf1 marked this pull request as ready for review October 9, 2026 13:42
@planetf1
planetf1 requested a review from a team as a code owner October 9, 2026 13:42

@ajbozarth ajbozarth left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'm ok upping the timeout on a single qualitative test

@planetf1
planetf1 added this pull request to the merge queue Oct 14, 2026
Merged via the queue into generative-computing:main with commit 9a395f0 Oct 14, 2026
11 checks passed
@planetf1
planetf1 deleted the issue-1602 branch October 14, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test_generate_with_lock_does_not_block_when_awaiting_value is timing-flaky under GPU load

2 participants