|
2026-11-14
| ||
| 12:20 | • Ticket [7aa8fd34c4] epoll notifier spins and never reports writable after EPOLLE... artifact: 481b38765a user: serhiy.storchaka | |
| 12:20 | Fix io-78.1 failing intermittently on Windows (see [7aa8fd34c4]): a non-blocking close with a backgr... check-in: ab172b573d user: serhiy.storchaka tags: core-9-0-branch | |
| 12:17 | Fix io-78.1 failing intermittently on Windows (see [7aa8fd34c4]): a non-blocking close with a backgr... check-in: 4fb793ca8f user: serhiy.storchaka tags: trunk, main | |
|
2026-11-02
| ||
| 22:29 | • Ticket [20ca033dee] Tcl 9.0.5 failing tests in valgrind status still Open wi... artifact: f82b6e9cbb user: serhiy.storchaka | |
|
2026-10-30
| ||
| 09:40 | • Closed ticket [7aa8fd34c4]: epoll notifier spins and never reports writable afte... artifact: d2c4d294fe user: jan.nijtmans | |
| 09:40 | Fix [7aa8fd34c4]: epoll notifier spins and never reports writable after EPOLLERR check-in: b4d7ea90a2 user: jan.nijtmans tags: core-9-0-branch | |
| 09:29 | Fix [7aa8fd34c4]: epoll notifier spins and never reports writable after EPOLLERR check-in: 6d788a0eb3 user: jan.nijtmans tags: trunk, main | |
|
2026-10-16
| ||
| 21:49 | • Closed ticket [653218ffff]: Channels CloseProc() not called on close plus 4 ... artifact: 005ad727f2 user: serhiy.storchaka | |
| 21:49 | • Ticket [7aa8fd34c4] epoll notifier spins and never reports writable after EPOLLE... artifact: 7ce8553e5e user: serhiy.storchaka | |
| 21:49 | Fix [7aa8fd34c4]: the epoll notifier reports an error condition as readable and writable, like selec... closed check-in: 94240eb7b7 user: serhiy.storchaka tags: epoll-error-writable | |
| 21:46 | • New ticket [7aa8fd34c4] epoll notifier spins and never reports writable after EP... artifact: 8c833ee4e9 user: serhiy.storchaka | |
epoll notifier spins and never reports writable after EPOLLERR
Closed / Fixed7aa8fd34c4e8ed00e73e06aef189fae1b092d1c4Created 47 days agoUpdated 18 days ago
Descriptionwiki2026-10-16 21:46:10
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 [close] reports no error although the data was lost.
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
select() reports such a descriptor as writable. The code is from [858569fb04].
Referenced by7
ab172b573dFix io-78.1 failing intermittently on Windows (see [7aa8fd34c4]): a non-blocking close with a background flush still scheduled completes in the background and does not report "broken pipe". Switch the channel to blocking before closing it. check-in2026-11-14 12:20:304fb793ca8fFix io-78.1 failing intermittently on Windows (see [7aa8fd34c4]): a non-blocking close with a background flush still scheduled completes in the background and does not report "broken pipe". Switch the channel to blocking before closing it. check-in2026-11-14 12:17:38f82b6e9cbbTicket [20ca033dee] Tcl 9.0.5 failing tests in valgrind status still Open with 3 other changes ticket2026-11-02 22:29:04b4d7ea90a2Fix [7aa8fd34c4]: epoll notifier spins and never reports writable after EPOLLERR check-in2026-10-30 09:40:186d788a0eb3Fix [7aa8fd34c4]: epoll notifier spins and never reports writable after EPOLLERR check-in2026-10-30 09:29:36005ad727f2Closed ticket [653218ffff]: Channels CloseProc() not called on close plus 4 other changes ticket2026-10-16 21:49:5794240eb7b7Fix [7aa8fd34c4]: the epoll notifier reports an error condition as readable and writable, like select(), so that a writable handler on a pipe whose reader has exited is called instead of the notifier spinning. check-in2026-10-16 21:49:12
serhiy.storchakawiki2026-10-16 21:49:57
Proposed fix in branch epoll-error-writable: report EPOLLERR as readable and writable, like select() does. Test io-78.1.
jan.nijtmanswiki2026-10-30 09:40:46
Fixed in [trunk], and core-9-0-branch
Many thanks!
serhiy.storchakawiki2026-11-14 12:20:38
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.
Log in (anonymous is fine) to add a comment.