Skip to content

Partial queue teardown can leave stale state and trigger double pthread_join() #398

Done

Description

@malto101

FastRPC version

v1.0.7

DSP firmware version

QC_IMAGE_VERSION_STRING=DSP.AT.1.0.1-00201-LEMANS-2

SoC and device name

device: i1-9075-evk

Kernel version

6.18.37-02225-g3167b1238438-dirty

What happened?

destroy_domain_queues_locked() can leave a partially-destroyed queue structure attached to a domain slot when cleanup encounters an intermediate failure. Subsequent queue creation reuses the stale structure, which can eventually result in a second pthread_join() on an already joined thread.

Steps to reproduce

Repeatedly create and destroy queues on the same domain:

for (int i = 0; i < N; i++) {
    dspqueue_t queue;

    dspqueue_create(domain, 0, 4096, 4096,
                    NULL, NULL, NULL, &queue);

    dspqueue_close(queue);
}

If an iteration encounters a transient failure during teardown, the domain entry can remain partially destroyed.
A later close operation may attempt to join the same thread a second time.

Relevant log output

Activity

  1. github-actions commented on Oct 16, 2026

    @github-actions

    qualcomm/fastrpc.triage This issue has been marked as stale due to 30 days of inactivity.

  2. added a commit that references this issue on Nov 26, 2026
    3b7f929
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions