Re: [chrony-dev] Patch: avoid infinite select() loop on chronyc |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
- To: chrony-dev@xxxxxxxxxxxxxxxxxxxx
- Subject: Re: [chrony-dev] Patch: avoid infinite select() loop on chronyc
- From: Chris Perl <cperl@xxxxxxxxxxxxxx>
- Date: Mon, 4 Dec 2017 09:02:44 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=ubcP3GvaEPFn1oRUo3zwG0NfduCTqEDfhX6YpQ4R/ms=; b=AsBG/kNIgeE6ehamDyg2+BSWfIgm068auxS9Q/PgmvTwqPhMgHzgdunaS1Ky0ieCDT /ZaBH2bdjlJ2zIzQJmRmjwEdSduIK56IUNmIFmRR6P6jxBy7rbwm5jNp/UsQ37VYGOGP syVFtQEaPO+IGU2TQGmCmc01cCCujvTuybpD0=
On Mon, Dec 4, 2017 at 5:14 AM, Miroslav Lichvar <mlichvar@xxxxxxxxxx> 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 chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.