Index: kern_timeout.c =================================================================== RCS file: /cvs/src/sys/kern/kern_timeout.c,v diff -u -p -r1.107 kern_timeout.c --- kern_timeout.c 3 Jun 2025 00:20:31 -0000 1.107 +++ kern_timeout.c 7 Jun 2025 08:19:15 -0000 @@ -360,8 +360,21 @@ timeout_add(struct timeout *new, int to_ static inline int timeout_add_ticks(struct timeout *to, uint64_t to_ticks) { - if (to_ticks > INT_MAX) + /* + * XXX to_ticks is added to the current ticks value, but + * timeouts are run in the next clock interrupt after ticks + * is incremented. however, the deadline comparison in + * softclock_process_tick_timeout will fire a timeout if it's + * deadline is at the current ticks value. eg, a to_ticks + * value of 1 plus the current ticks value will fire in the + * next interupt, which will be too early. add 1 here to + * ensure the requested time has elapsed. + */ + + if (to_ticks >= INT_MAX) to_ticks = INT_MAX; + else + to_ticks++; return timeout_add(to, (int)to_ticks); }