Artifacts Associated With Ticket 7aa8fd34c4e8ed00
Ticket change [8c833ee4e9] (rid 258317) by serhiy.storchaka on 2026-10-16 21:46:10:
- cmimetype initialized to: "text/x-fossil-wiki"
- comment initialized 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 initialized to: "9.0.5, 9.1.0"
- login: "serhiy.storchaka"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "serhiy.storchaka"
- subsystem initialized to: "01. Notifier"
- title initialized to:
epoll notifier spins and never reports writable after EPOLLERR
- type initialized to: "Bug"
Ticket change [7ce8553e5e] (rid 258323) by serhiy.storchaka on 2026-10-16 21:49:57:
- icomment:
Proposed fix in branch [/timeline?r=epoll-error-writable|epoll-error-writable]: report EPOLLERR as readable and writable, like select() does. Test io-78.1.
- login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [d2c4d294fe] (rid 260849) by jan.nijtmans on 2026-10-30 09:40:46:
- 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"
Ticket change [481b38765a] (rid 261645) by serhiy.storchaka on 2026-11-14 12:20:38:
- icomment:
io-78.1 failed intermittently on Windows (about 1 run in 10): a non-blocking close with a background flush still scheduled completes in the background and does not report "broken pipe". The test now switches the channel to blocking before closing it: [4fb793ca8f] on trunk, also cherry-picked to core-9-0-branch.
- login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"
- icomment: