You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TaskContext::request_input parks forever when called after tasks/cancel #1582
After tasks/cancel, a task operation that calls TaskContext::request_input parks forever. TaskManager::cancel_task sets cancel_requested and clears pending_inputs, which wakes the inputs already pending. request_input does not check cancel_requested, so a call made after the cancel registers a new pending input. The task goes back to input_required and waits for an answer the client will never send, since it has cancelled the task.
This happens whenever the cancel lands between two request_input calls, or while the operation is working and has not polled ctx.cancelled() yet.
To Reproduce
On main (3725772), in task_manager.rs tests:
Spawn a task whose operation awaits ctx.cancelled(), then calls ctx.request_input("after-cancel", request).
manager.cancel_task(&task_id).
request_input never returns, and get_task reports input_required.
Expected behavior
request_input returns Err(TaskExit::Cancelled) once cancellation was requested, as the parked calls already do, and the task does not go back to input_required.
Additional context
Different from #1579 (an input request left outstanding when its future is dropped), though both touch request_input.
I'm working on this and have a fix with tests ready. The repo allows one open PR per contributor without write access, so I'll open it once #1583 is resolved.
Activity
github-actions commentedon Dec 6, 2026
@connor4312 is on triage rotation this week and is the reviewer for this one.
Automated classification did not run for this one, so it needs a full manual pass.
Automated triage. Labels are a first pass and the assigned maintainer has the final say.
orangeCatDeveloper commentedon Dec 6, 2026
I'm working on this and have a fix with tests ready. The repo allows one open PR per contributor without write access, so I'll open it once #1583 is resolved.