Skip to content

[bug] Interactive Ctrl-C family hangs: empty-line/mid-typed/mid-continuation/mid-builtin/mid-external never return a prompt (or driver timeout not enforced) #287

Closed

Description

@caomengxuan666

niubash interactive harness findings: all five ctrl_c_* tests hang (harness waited >60s per case; sequential run hit the 400s bound at the first). Either the shell never re-renders the prompt after Ctrl-C on Windows ConPTY (signal-in-interactive delivery) or the expectrl driver's per-case timeout isn't enforced for these shapes — needs discrimination: run one case with --no-capture and watch the live PTY. If shell-side: interactive SIGINT handling (rubash interactive signal path). Harness: D:/repo/niubash-wt-interactive tests/interactive.rs ctrl_c_* tests.

Activity

  1. caomengxuan666 commented on Sep 29, 2026

    @caomengxuan666
    MemberAuthor

    Fixed by wt12/ctrlcfix (rubash 9c676cea + niubash f2d90ab): #287 was a TEST DRIVER self-deadlock, not the shell - NiuSession::send() chained writer.lock().unwrap().write_all(..).and_then(|_| writer.lock().unwrap().flush()); the first MutexGuard is a whole-expression temporary, so the second lock() re-entered a non-reentrant mutex on EVERY bare control key, deadlocking before any timeout could fire. Evidence: independent pywinpty driving showed the prompt returning in all five shapes; LLDB on a wedged niu showed it healthy in reedline read_line. Fixed with a single-guard scope; 10 wrongly-ignored interactive tests un-ignored and green (ctrl_c x5, ctrl_d x3, burst, paste); 3 kept ignored with corrected reasons (ctrl_z, tab x2 - line-editor assembly gaps, not wedges).

  2. added a commit that references this issue on Sep 29, 2026
  3. added
    bug
    area:interactive
    P1-high
    on Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1-higharea:interactivebug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions