Skip to content

deadlock in pusher thread#3449

Merged
beastoin merged 2 commits intoBasedHardware:mainfrom
TuEmb:TuEmb/button_hangup
Nov 19, 2025
Merged

deadlock in pusher thread#3449
beastoin merged 2 commits intoBasedHardware:mainfrom
TuEmb:TuEmb/button_hangup

Conversation

@TuEmb
Copy link
Copy Markdown
Contributor

@TuEmb TuEmb commented Nov 18, 2025

there is a deadlock when the system turns off (try to spam the button). the pusher thread got stuck at this time
=> need to abort the pusher thread before going off

image image

it maybe related to #3401

@TuEmb TuEmb requested a review from beastoin November 18, 2025 05:02
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request aims to fix a deadlock in the pusher thread during system shutdown by aborting the thread. While this might seem to solve the issue, using k_thread_abort is a dangerous practice that can lead to resource leaks and other deadlocks. My review provides a critical comment suggesting a safer, more robust way to terminate the thread gracefully using signaling and joining. This will prevent the original deadlock without introducing new, subtle bugs.

Comment thread omi/firmware/omi/src/lib/core/transport.c Outdated
@beastoin beastoin merged commit abe0596 into BasedHardware:main Nov 19, 2025
@beastoin
Copy link
Copy Markdown
Collaborator

lgtm @TuEmb

@TuEmb TuEmb deleted the TuEmb/button_hangup branch November 19, 2025 01:49
Glucksberg pushed a commit to Glucksberg/omi-local that referenced this pull request Apr 28, 2026
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