Commit d36d080
fix: put preempted Syscall(Executing) coroutines back in ready queue instead of syscall map
When SIGURG preempts a coroutine in Syscall(Executing) state (due to a
race between the monitor sending SIGURG and MonitorListener removing
the notify node), the scheduler was putting it in the syscall map
without a syscall_suspend entry. This caused the coroutine to get
stuck forever — no mechanism moves Syscall(Executing) coroutines from
the syscall map back to the ready queue.
Fix: detect Syscall(Executing) yields as preemption events and push
the coroutine back to the ready queue. resume_with() already accepts
Syscall(Executing) → Running transitions, so the coroutine resumes
correctly from inside the signal handler.
Agent-Logs-Url: https://github.com/acl-dev/open-coroutine/sessions/2b3f1622-04e3-4f08-945a-e1e391d32eb0
Co-authored-by: loongs-zhang <38336731+loongs-zhang@users.noreply.github.com>1 parent 0db4bb2 commit d36d080
1 file changed
Lines changed: 11 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
320 | 325 | | |
321 | 326 | | |
322 | 327 | | |
| |||
0 commit comments