Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

A guest signal does not interrupt futex, epoll_wait or a finite select

Open
#378 2 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@xalestar is already working on this.

Since Sep 13, 2026.

Assessment

This issue has not been assessed yet.

Description

A thread parked in these host waits notices a queued signal only when its
own polling quantum or timeout ends. Linux returns EINTR at once.

PR #377 fixed nanosleep not returning on a queued signal; futex,
epoll_wait and select have the same defect. Measured on Apple M4,
against Linux 6.12 under qemu with HVF.

signal to handler, median of 12 elfuse Linux 6.12
nanosleep (after #377) 0.080 ms 0.044 ms
futex, finite timeout 40.7 ms 0.044 ms
futex, indefinite 40.6 ms 0.044 ms
epoll_wait, indefinite 125 ms 0.047 ms
select, 1 s timeout 779 ms 0.050 ms
epoll_wait, 1 s timeout 777 ms 0.047 ms

futex re-checks signal_pending on a 100 ms quantum
(FUTEX_OS_SYNC_POLL_CAP_NS) and an indefinite epoll_wait on a 200 ms kevent
slice. A finite select or epoll_wait hands the guest's whole timeout to
pselect or kevent with no wakeup pipe fd and no slice, so the signal waits
for the timeout.

Reproducer: a sibling thread parks in each wait, the main thread sends
SIGUSR1 with pthread_kill after a settle delay, and the handler stamps
CLOCK_MONOTONIC.

Dominant language
C
Stars
271
Forks
28
Avg merge
1d 20h
Merged PRs (30d)
27

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sysprog21/elfuse

All issues in sysprog21/elfuse

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.