Overview
| Artifact ID: | 8c833ee4e9dd8b668b51fc2ab02b531f3670ebe2efbad979aea6f9fd6cdcdcf9 |
|---|---|
| Ticket: | 7aa8fd34c4e8ed00e73e06aef189fae1b092d1c4
epoll notifier spins and never reports writable after EPOLLERR |
| User & Date: | serhiy.storchaka on 2026-10-16 21:46:10 |
Changes
- cmimetype changed to: "text/x-fossil-wiki"
- 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]. - foundin changed to: "9.0.5, 9.1.0"
- login: "serhiy.storchaka"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "serhiy.storchaka"
- subsystem changed to: "01. Notifier"
- title changed to:
epoll notifier spins and never reports writable after EPOLLERR
- type changed to: "Bug"