kovidgoyal/kitty · warning
Incomplete signal read from signalfd
Error message
Incomplete signal read from signalfd
What it means
read() from signalfd returned a size that is zero or not a whole multiple of sizeof(struct signalfd_siginfo), which should never happen with a correctly sized buffer; the loop bails for this iteration.
Source
Thrown at kitty/loop-utils.c:155
void
read_signals(int fd, handle_signal_func callback, void *data) {
#ifdef HAS_SIGNAL_FD
static struct signalfd_siginfo fdsi[32];
siginfo_t si;
while (true) {
ssize_t s = read(fd, &fdsi, sizeof(fdsi));
if (s < 0) {
if (errno == EINTR) continue;
if (errno == EAGAIN) break;
log_error("Call to read() from read_signals() failed with error: %s", strerror(errno));
break;
}
if (s == 0) break;
size_t num_signals = s / sizeof(struct signalfd_siginfo);
if (num_signals == 0 || num_signals * sizeof(struct signalfd_siginfo) != (size_t)s) {
log_error("Incomplete signal read from signalfd");
break;
}
for (size_t i = 0; i < num_signals; i++) {
si.si_signo = fdsi[i].ssi_signo;
si.si_code = fdsi[i].ssi_code;
si.si_pid = fdsi[i].ssi_pid;
si.si_uid = fdsi[i].ssi_uid;
si.si_addr = (void *)(uintptr_t)fdsi[i].ssi_addr;
si.si_status = fdsi[i].ssi_status;
si.si_value.sival_int = fdsi[i].ssi_int;
if (!callback(&si, data)) break;
}
}
#else
static char buf[sizeof(siginfo_t) * 8];
static size_t buf_pos = 0;
while (true) {
ssize_t len = read(fd, buf + buf_pos, sizeof(buf) - buf_pos);View on GitHub (pinned to 6d5d0c4406)
Solutions
- Rule out kernel/libc oddities (reboot, update system)
- Upgrade kitty
- Report upstream with kernel version if reproducible
Defensive patterns
Strategy: retry
Prevention
- Nothing user-side; keep kernel and kitty updated
When it happens
Trigger: Kernel/libc inconsistency or memory corruption producing a partial signalfd_siginfo record.
Common situations: Essentially never observed; would indicate a kernel bug, incompatible libc, or memory corruption.
Related errors
- Call to read() from read_signals() failed with error: %s
- This must be run as kitten choose-files
- Pipe to kitten was broken while sending data to it
- Failed to find cwd of process with pid: {pid}
- Unknown test type: %s
AI-assisted analysis of kovidgoyal/kitty@6d5d0c4406 (2026-08-27).
Data as JSON: /api/errors/faf976e7303589df.
Report an issue: GitHub.