[DragonFlyBSD - Bug #3469] (New) kernel: Writes to a reused pty fail with EIO after one second
tuxillo
bugtracker-admin at leaf.dragonflybsd.org
Mon Nov 16 15:41:58 PST 2026
Issue #3469 has been reported by tuxillo.
----------------------------------------
Bug #3469: kernel: Writes to a reused pty fail with EIO after one second
http://bugs.dragonflybsd.org/issues/3469
* 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)
--
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
More information about the Bugs
mailing list