Hmbown/CodeWhale · error
create isolated input pipe
Error message
create isolated input pipe
What it means
`terminal_reply_reader_leaves_one_burst_typed_suffix_on_the_descriptor` creates a test pipe with `std::io::pipe().expect("create isolated input pipe")`. The expect panics if the OS refuses to create the pipe pair (out of file descriptors, or a platform without `pipe2` support). The pipe stands in for a tty to test that terminal device-attributes replies are detected and the typed suffix stays buffered.
Solutions
- Raise the fd limit (`ulimit -n 1024` or the CI equivalent)
- Check for fd leaks in earlier tests (pipes/sockets never dropped)
- Upgrade the Rust toolchain to one where `std::io::pipe` is stable
- Verify the sandbox/seccomp profile permits pipe creation
Example fix
// before
let (mut reader, mut writer) = std::io::pipe().expect("create isolated input pipe");
// after
let (mut reader, mut writer) = std::io::pipe()
.unwrap_or_else(|e| panic!("pipe creation failed (fd limit?): {e}")); Defensive patterns
Strategy: try-catch
Try / catch
let (reader, writer) = std::io::pipe()
.unwrap_or_else(|e| panic!("cannot create test pipe: {e} (check ulimit -n)")); Prevention
- Check `ulimit -n` in CI before running fd-heavy test suites
- Drop pipe endpoints promptly; never leak readers/writers across tests
- Pin a Rust toolchain ≥1.87 where `std::io::pipe` is stable
When it happens
Trigger: Running the test with the process file-descriptor limit exhausted; running on a platform/runtime where `std::io::pipe` is unavailable (pre-1.87 Rust std or restricted sandboxes); ulimit -n set extremely low in CI containers.
Common situations: CI containers with tiny fd limits or fd leaks from earlier tests; older toolchains without `std::io::pipe` (stabilized in Rust 1.87); seccomp/apparmor policies blocking pipe syscalls.
Understand the failure class
Background: "open() failed", "failed to open file", "cannot create file" — what a file open error means and how to fix it — this error's family across 42 libraries.
Related errors
- read remaining typed input
- write one input burst
- Codewhale chat request should succeed
- Codewhale client should resolve its model route
- Concentrate catalog delta
AI-assisted analysis of Hmbown/CodeWhale@433685b202 (2026-09-15).
Data as JSON: /api/errors/6c4f0b80ea22d2e3.
Report an issue: GitHub.
Appendix: source
Thrown at crates/palette/src/osc11_tests.rs:43
reply: b"\x1b]11;rgb:1e1e/1e1e/1e1e",
csi: false,
},
Case {
query: b"\x1b_Gi=31,s=1,v=1,a=q,t=d,f=24;AAAA\x1b\\",
response: b"\x1b_Gi=31;OK\x1b\\",
reply: b"\x1b_Gi=31;OK",
csi: false,
},
Case {
query: b"\x1b[c",
response: b"\x1b[?62;4c",
reply: b"\x1b[?62;4c",
csi: true,
},
];
for case in cases {
let (mut reader, mut writer) = std::io::pipe().expect("create isolated input pipe");
let prefix = b"/plu";
let suffix = b"gin list\r";
let burst = [prefix.as_slice(), case.response, suffix.as_slice()].concat();
assert_eq!(
writer.write(&burst).expect("write one input burst"),
burst.len()
);
// Keep the writer open: a buffered read-ahead must not be rescued by
// EOF/readable-HUP while the real tty would have no new bytes ready.
let (answered, reply, carried) = read_terminal_reply(
reader.as_raw_fd(),
case.query,
Duration::from_secs(1),
case.csi,
);
drop(writer);
let mut remaining = Vec::new();View on GitHub (pinned to 433685b202)