| Ticket UUID: | f1a25e8a5090333da9c02de51f04f2914fea7bfa | ||
| Title: | New thread panics "Tcl_InitNotifier: could not create trigger eventfd" when stdin is closed | ||
| Type: | Bug | Created on: | 2026-11-14 16:49:44 |
| Submitter: | serhiy.storchaka | Assigned to: | jan.nijtmans |
| Subsystem: | 01. Notifier | Severity: | Important |
| Priority: | 5 Medium | Last modified: | 2026-11-20 16:45:14 |
| Status: | Closed | Closed by: | jan.nijtmans |
| Resolution: | Fixed | Closed on: | 2026-11-20 16:45:14 |
| Version: | 9.0.5, 9.1.0 | ||
| Description: | ||||
run in tcltest panics with
Every new thread fails the same way. For example, thread::create or tpool::post from the Thread package after close stdin.
With stdin closed, fd 0 is free, so
Affects 9.0 and 9.1 on Linux, where epoll is the default notifier. 8.6 is not affected. | ||||
| User Comments: | ||||
serhiy.storchaka added on 2026-11-14 17:51:58:
Proposed fix in branch notifier-fd-zero: the epoll notifier now accepts an eventfd of 0. The epoll and kqueue notifiers now also close their trigger and epoll/kqueue descriptors when one is 0; until now the kqueue notifier leaked fd 0. Test thread-9.2. Tested on Linux (epoll) and FreeBSD (kqueue). jan.nijtmans added on 2026-11-17 11:27:12:
Fixed in [64ce9de2a3|trunk] OK for backport to 9.0 (not done yet) jan.nijtmans added on 2026-11-20 16:45:14:
Now also merged to core-9-0-branch Many thanks! | ||||
