RT-Thread / RT-Thread/rt-thread

[Bug] mutex相关问题

Open
#9,392 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
12.2k
Forks
5.4k
Avg merge
4d 12h
Merged PRs (30d)
40

Description

RT-Thread Version

master

Hardware Type/Architectures

all

Develop Toolchain

Other

Describe the bug
  1. 线程退出时若持有递归获取的锁不能完全释放

pr: https://github.com/RT-Thread/rt-thread/pull/9337 释放前把mutex获取计数设为1

用例:https://github.com/RT-Thread/rt-thread/pull/9365

2.线程take mutex等待时被意外resume唤醒触发assert

pr:https://github.com/RT-Thread/rt-thread/pull/9357

用例:https://github.com/RT-Thread/rt-thread/pull/9353

Other additional context

No response

Contributor guide

Open the contributing guide

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 by reviewing PRs 9337 and 9357, along with their corresponding test cases in PRs 9365 and 9353, to understand the two mutex scenarios. Confirm whether the recursive-lock release and unexpected-resume assertion issues remain reproducible; done means both cases are covered without the reported failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.