fj auth login: Ctrl+C prints error: interrupted but the process hangs until the OIDC callback deadline #257
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
fj auth loginon an OIDC deployment printserror: interruptedon Ctrl+C but the process keeps running for up to five minutes before it exits.Cause
cli::runraces every command against SIGINT withtokio::select!, so the interrupt is handled correctly: the command future is dropped andmainreturns.But
LoopbackServer::wait_for_codedrives its accept loop fromtokio::task::spawn_blocking. Dropping theJoinHandleonly detaches the task, it does not cancel it, and dropping the tokio runtime waits for blocking-pool tasks to finish.accept_codepolls in 100 ms sleeps untilCALLBACK_TIMEOUT(300 s), so the process sits in runtime shutdown for whatever is left of those five minutes after the error line is already on screen.Reproduced on
main(ba0f96a):The
--devicepath is unaffected:poll_for_device_tokenis ordinary async, so the select cancels it and the process exits immediately. Only the loopback path is affected.Second, related defect in the same loop
Connections are handled one at a time and the request-line read is unbounded. A socket that connects and then sends nothing (a browser speculative preconnect, a port scanner) blocks
read_lineforever, so the real redirect queued behind it is never accepted and the sign-in silently fails until the 300 s deadline.