On Mon, Dec 4, 2017 at 5:14 AM, Miroslav Lichvar <[email protected]> wrote:
>
> I suspect the real problem is with the timeout. If it was negative,
> select() would return EINVAL and the loop would not terminate. I guess
> this could happen if chronyd (or something else) stepped the system
> clock forward right between the first gettimeofday() call before the
> request is sent and the second gettimeofday() call before select().

In one of my cases where I saved some strace output, it seems to show
what you suggest:

select(4, [3], [], [], {18446744073709203787, 668311}) = -1 EINVAL
(Invalid argument)
select(4, [3], [], [], {18446744073709203787, 668293}) = -1 EINVAL
(Invalid argument)
select(4, [3], [], [], {18446744073709203787, 668275}) = -1 EINVAL
(Invalid argument)
select(4, [3], [], [], {18446744073709203787, 668255}) = -1 EINVAL
(Invalid argument)
select(4, [3], [], [], {18446744073709203787, 668237}) = -1 EINVAL
(Invalid argument)
select(4, [3], [], [], {18446744073709203787, 668219}) = -1 EINVAL
(Invalid argument)
select(4, [3], [], [], {18446744073709203787, 668200}) = -1 EINVAL
(Invalid argument)
select(4, [3], [], [], {18446744073709203787, 668181}) = -1 EINVAL
(Invalid argument)
select(4, [3], [], [], {18446744073709203787, 668163}) = -1 EINVAL
(Invalid argument)
select(4, [3], [], [], {18446744073709203787, 668146}) = -1 EINVAL
(Invalid argument)
select(4, [3], [], [], {18446744073709203787, 668128}) = -1 EINVAL
(Invalid argument)
select(4, [3], [], [], {18446744073709203787, 668110}) = -1 EINVAL
(Invalid argument)

-- 
To unsubscribe email [email protected] with "unsubscribe" 
in the subject.
For help email [email protected] with "help" in the 
subject.
Trouble?  Email [email protected].

Reply via email to