Overview
| Artifact ID: | d2c4d294fe0073400138cd2fabec9b88fc682e5b5dbfacd93b01dbc9628e0d22 |
|---|---|
| Ticket: | 7aa8fd34c4e8ed00e73e06aef189fae1b092d1c4
epoll notifier spins and never reports writable after EPOLLERR |
| User & Date: | jan.nijtmans on 2026-10-30 09:40:46 |
Changes
- assignee changed to: "jan.nijtmans"
- closedate changed to: "2461343.9033190627"
- closer changed to: "jan.nijtmans"
- comment changed to:
On Linux (epoll notifier, 8.7 and later), a writable handler on a pipe whose reader has exited never fires: EPOLLERR is translated only to TCL_EXCEPTION, and the level-triggered event wakes epoll_wait() again at once, so the process spins at 100% CPU. A background flush to such a pipe never ends, and <nowiki>[close]</nowiki> reports no error although the data was lost. <verbatim> set f [open |[list [info nameofexecutable] exit.tcl] w] ;# child exits at once fconfigure $f -blocking 0 puts -nonewline $f [string repeat x 300000] catch {flush $f} chan event $f writable {set w writable} after 3000 {set w timeout} vwait w ;# 8.6: writable at once, close gives "broken pipe"; 9.x: timeout, close gives no error </verbatim> select() reports such a descriptor as writable. The code is from [858569fb04]. - icomment:
Fixed in [6d788a0eb3|trunk], and core-9-0-branch Many thanks!
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- status changed to: "Closed"