llvm / llvm/offload-test-suite

Waiting on the queue in the `cleanup` function causes and infinite loop if an error occurred earlier.

Open
#1,204 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
18
Forks
39
Avg merge
2d 18h
Merged PRs (30d)
40

Description

The cleanup function waits on the graphics queue as a just-in-case since that code can be called when an error occured. However in certain cases that just-in-case wait can cause the program to hang, preventing the error from being printed. As far as I can tell the issue happens if the error occurs in the process of submitting a command buffer.

I think we should also consider just leaking everything on an error (or maybe always?) because the OS and driver will clean-up after the user-space program terminates anyway.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the C++ cleanup function and trace the graphics-queue wait after an error during command-buffer submission. Reproduce the failure and confirm that cleanup no longer hangs before the error is printed. The issue is resolved when the error path terminates without an infinite wait; the cleanup-versus-leak behavior still needs a project decision.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.