Skip to content

Thread being retired should not be preempted#345

Open
lawkai-vivo wants to merge 2 commits intovivoblueos:mainfrom
lawkai-vivo:fix-pendsv-race
Open

Thread being retired should not be preempted#345
lawkai-vivo wants to merge 2 commits intovivoblueos:mainfrom
lawkai-vivo:fix-pendsv-race

Conversation

@lawkai-vivo
Copy link
Contributor

Fix https://github.com/vivoblueos/kernel/actions/runs/22700766319/job/65817293534.

panicked at ../../kernel/kernel/src/scheduler/mod.rs:269:9:
assertion `left == right` failed
  left: Err(4)
 right: Ok(())
Oops: assertion `left == right` failed

@lawkai-vivo
Copy link
Contributor Author

build_prs

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

@lawkai-vivo
Copy link
Contributor Author

build_prs

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

✅ All jobs completed successfully, see https://github.com/vivoblueos/kernel/actions/runs/22701067480.

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

❌ Job failed. Failed jobs: build_and_check_boards (failure), see https://github.com/vivoblueos/kernel/actions/runs/22701128131.

@lawkai-vivo
Copy link
Contributor Author

build_prs

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

✅ All jobs completed successfully, see https://github.com/vivoblueos/kernel/actions/runs/22701990213.

@lawkai-vivo
Copy link
Contributor Author

build_prs

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

❌ Job failed. Failed jobs: build_and_check_boards (failure), see https://github.com/vivoblueos/kernel/actions/runs/22705661859.

@lawkai-vivo
Copy link
Contributor Author

build_prs

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

✅ All jobs completed successfully, see https://github.com/vivoblueos/kernel/actions/runs/22706204383.

@lawkai-vivo
Copy link
Contributor Author

build_prs

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

@lawkai-vivo
Copy link
Contributor Author

build_prs

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

❌ Job failed. Failed jobs: build_and_check_boards (failure), see https://github.com/vivoblueos/kernel/actions/runs/22707916065.

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

✅ All jobs completed successfully, see https://github.com/vivoblueos/kernel/actions/runs/22707968065.

Fix https://github.com/vivoblueos/kernel/actions/runs/22700766319/job/65817293534.
```
panicked at ../../kernel/kernel/src/scheduler/mod.rs:269:9:
assertion `left == right` failed
  left: Err(4)
 right: Ok(())
Oops: assertion `left == right` failed
```
@lawkai-vivo
Copy link
Contributor Author

build_prs

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

✅ All jobs completed successfully, see https://github.com/vivoblueos/kernel/actions/runs/22710399846.

if old.state() == thread::RETIRED {
let cleanup = old.lock().take_cleanup();
if let Some(entry) = cleanup {
old.enable_preempt();
Copy link
Contributor

Choose a reason for hiding this comment

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

If it's already going to retire, why do we still need to enable_preempt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right. Will seek another solution for the test threads.

@lawkai-vivo
Copy link
Contributor Author

build_prs

@lawkai-vivo lawkai-vivo requested a review from han-jiang277 March 5, 2026 10:47
@github-actions
Copy link

github-actions bot commented Mar 5, 2026

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

✅ All jobs completed successfully, see https://github.com/vivoblueos/kernel/actions/runs/22714325253.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants