Issue #3469 has been updated by tuxillo.
Unpatched: <pre> # ./drainwait before any session: drainwait 0 after the session leader exited: drainwait 1 # ./ptyeio after a session leader exited (drainwait 1): Input/output error after 0.99s after TIOCSDRAINWAIT 0 (drainwait 0): still blocking, stopped by alarm after 5.01s </pre> Patched: <pre> # uname -v DragonFly v6.5.0.2154.g4749e3-DEVELOPMENT #0: Wed Nov 18 00:02:13 CET 2026 # ./drainwait before any session: drainwait 0 after the session leader exited: drainwait 0 # ./ptyeio after a session leader exited (drainwait 0): still blocking, stopped by alarm after 5.00s after TIOCSDRAINWAIT 0 (drainwait 0): still blocking, stopped by alarm after 5.01s </pre> ---------------------------------------- Bug #3469: kernel: Writes to a reused pty fail with EIO after one second http://bugs.dragonflybsd.org/issues/3469#change-14958 * Author: tuxillo * Status: New * Priority: Normal * Target version: 6.6 * Start date: 2026-11-17 ---------------------------------------- As of 6.5-DEVELOPMENT (732cbb04c2), when the session leader on a tty exits, exit1() sets t_timeout to hz so ttywait() can't hang, but never puts it back. The tty outlives the session, and ttwrite() uses the same timeout when it waits for output space, so on the next session any write that blocks for more than a second returns EIO. dsynth hits this because it reuses one pty per slot for every phase of a build. When the worker falls behind reading the master, gmake fails with "write error: stdout". It happened with qgis, qgis-ltr, freecad, mixxx and sope here, and a ktrace of gmake shows write(1, ...) returning EIO 0.99s after the call. The attached ptyeio.c reproduces it: <pre> after a session leader exited (drainwait 1): Input/output error after 0.99s after TIOCSDRAINWAIT 0 (drainwait 0): still blocking, stopped by alarm after 5.01s </pre> With the attached patch the timeout is restored after the drain, and both cases keep blocking. ---Files-------------------------------- nodrain.c (1002 Bytes) drainwait.c (981 Bytes) ptyeio.c (1.85 KB) 0001-kernel-reset-the-tty-drain-timeout-after-a-session-exits.patch (1.53 KB) -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account
