RuiChen_01 e98cc18686 fix(skill): release lock before invoking execute-done callback
ExecuteSkillDone and OnTimeout previously invoked callback->OnExecuteDone
under mutex_. Since ffrt::mutex is non-recursive, a synchronous re-entry
from the remote side back into SkillExecuteManager deadlocked the event
handler thread. Even without re-entry, holding the lock across an outbound
IPC while the business process is unresponsive stalls every other
SkillExecuteManager operation.

Move the callback invocation outside the critical section: flip the record
state, run cleanup (RemoveSkillExecuteTimeoutLocked, RemoveRecord) under
the lock, then drop the lock before issuing OnExecuteDone. Collapse
OnTimeout's two-phase critical section into one to remove the TOCTOU
window.

Add skill_execute_manager_test covering happy paths, missing-record and
state-mismatch failures, duplicate seq, post-done timeout, and the two
re-entrancy scenarios that would have deadlocked pre-fix.

Co-Authored-By: Agent
Signed-off-by: RuiChen_01 <chenrui193@huawei.com>

🤖‍ AI[100%] 👌 AI Adopted[100%] 🧑 Human[0%]
Co-authored-by: claude (glm-5.2) <ai@local>
2026-06-20 14:39:31 +08:00
2022-07-05 17:15:19 +08:00
2026-06-16 14:38:54 +08:00
2026-06-06 16:23:03 +08:00
2021-06-02 02:20:34 +08:00
2026-05-29 14:32:27 +08:00
2026-06-15 19:50:15 +08:00
2021-06-02 02:20:34 +08:00
2026-06-09 10:50:50 +08:00
2026-03-21 21:40:43 +08:00
2025-10-14 12:48:30 +08:00
2022-06-30 15:32:07 +08:00
2026-03-04 11:03:50 +08:00
2024-06-07 10:32:48 +08:00
S
Description
暂无描述
146 MiB
Languages
C++ 98.1%
C 1.5%
JavaScript 0.2%
TypeScript 0.1%