From owner-svn-src-head@freebsd.org Wed Sep 11 22:05:36 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A13C4E160F for ; Wed, 11 Sep 2019 22:05:36 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2m.ore.mailhop.org (outbound2m.ore.mailhop.org [54.149.155.156]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46TGDc1w64z4T76 for ; Wed, 11 Sep 2019 22:05:35 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1568239534; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=R7N7H7Urg1ZvaaKZdL8vK1wGanENtuzCM59HHeZTP4pbbM6+3u0OpldgvrSVHypEpx2b0iq0GehXb jbGcAqk0ZFGI593AiiBK45WrqRrcgFuGYnfP+DqninsbigzWVf3fFct7Zrbcy8bMtyxDJPXhU8LBFw 03h4/hPGRquGHwY0kczp9Nw11aw7xKbW4cw+cj6SuiXFhZht+JCGnjI4xjuzZjZLe/vl7Hj3VTRFNP oy9JgFGHA2DVPGGRzg1Z4v8sluUP0S4U9W6oUhS0z9ja0N3hvq41tpRcf6Jv/h7gEr7/GfhaFV4dKy g5bxVBu3JGGNvKZep/bqbeUdGuM6Jmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=UjprSAEeNU1TmzhyEQxWiTz/5siIsZ5+QIju1i0PhAw=; b=nBTg4uAh/dFFqeEDIYAJ4aILzsTD7S1RIcweLlw8DW8KfVExR14y2Sak66bzMReQVBEcHw1HlPUkm aBIZHnghoD+2lD+VpO2F6rDmB3Xh44EU9gn+tPu7AMECv6hfkaOcGUsY8mR9Vz2Z8bnrbw2oeHX0Ng IIZdXBwq6DD2IAbFGSCgdiU0B4SRT/8+8AQ/klxzAnNtuAjHgvayl8vYpLHp04XOwt4Gc+NaF0ZhVF Mi4C9jtR+M9fyjhIuUpwM7Km3KTXCWmtltmYNrT2pEFRP2rcJIXtHBWqP6eQrNJZHHC2SYxAWofNB1 AYa7gPiGycXOsKHIbAsfzBsZStug2wQ== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=UjprSAEeNU1TmzhyEQxWiTz/5siIsZ5+QIju1i0PhAw=; b=P6lC5kGbWFI6i+qsQa8HoFuq9rQVnQnasjjTB8Hna3+bwUM7WBwK1fq3nZVMk/ktuJVRFfLh/y+/n 2G8ip/ZGTI7/LO8dSZ1B8R07k3OSe6ic3INRbEbPnTctzeizT9jMYkfw0+EZo1HsR41Ll59DzXAGo9 4/eNZrLy64jkaI0fNqjtE8goCCfrWBBDnwAj6KhwssR+c5QrAJ7a63Rg3Rq9Alp4PfhNnx2gs7sK9E 5d8YrYgjkjQzDIoFJpbS7L7cUTADmto+6pB8IHE/7pQEDcE+idzWmKnw7yvNM62iOiFwWVddGAqRH3 LIBJGKfRO8OseQ7T0amdtz7R2oOnEkw== X-MHO-RoutePath: aGlwcGll X-MHO-User: 45ba74c0-d4e0-11e9-85ed-13b9aae3a1d2 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id 45ba74c0-d4e0-11e9-85ed-13b9aae3a1d2; Wed, 11 Sep 2019 22:05:32 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x8BM5VZE074664; Wed, 11 Sep 2019 16:05:31 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: Subject: Re: svn commit: r352231 - head/lib/libc/sys From: Ian Lepore To: Alan Somers , Peter Holm Cc: src-committers , svn-src-all , svn-src-head Date: Wed, 11 Sep 2019 16:05:31 -0600 In-Reply-To: References: <201909111948.x8BJmWZn092483@repo.freebsd.org> <63cf915c92b92b07e19337849269ec6bd0dc0d1b.camel@freebsd.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 46TGDc1w64z4T76 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-2.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2019 22:05:36 -0000 On Wed, 2019-09-11 at 15:55 -0600, Alan Somers wrote: > On Wed, Sep 11, 2019 at 3:50 PM Ian Lepore wrote: > > > On Wed, 2019-09-11 at 19:48 +0000, Alan Somers wrote: > > > Author: asomers > > > Date: Wed Sep 11 19:48:32 2019 > > > New Revision: 352231 > > > URL: https://svnweb.freebsd.org/changeset/base/352231 > > > > > > Log: > > > getsockopt.2: clarify that SO_TIMESTAMP is not 100% reliable > > > > > > When SO_TIMESTAMP is set, the kernel will attempt to attach a > > > > timestamp as > > > ancillary data to each IP datagram that is received on the socket. > > > > However, > > > it may fail, for example due to insufficient memory. In that case the > > > packet will still be received but not timestamp will be attached. > > > > > > Reviewed by: kib > > > MFC after: 3 days > > > Differential Revision: https://reviews.freebsd.org/D21607 > > > > > > Modified: > > > head/lib/libc/sys/getsockopt.2 > > > > > > Modified: head/lib/libc/sys/getsockopt.2 > > > > > > > ============================================================================== > > > --- head/lib/libc/sys/getsockopt.2 Wed Sep 11 19:29:40 2019 > > > > (r352230) > > > +++ head/lib/libc/sys/getsockopt.2 Wed Sep 11 19:48:32 2019 > > > > (r352231) > > > @@ -28,7 +28,7 @@ > > > .\" @(#)getsockopt.2 8.4 (Berkeley) 5/2/95 > > > .\" $FreeBSD$ > > > .\" > > > -.Dd February 10, 2019 > > > +.Dd September 11, 2019 > > > .Dt GETSOCKOPT 2 > > > .Os > > > .Sh NAME > > > @@ -431,7 +431,8 @@ option is enabled on a > > > .Dv SOCK_DGRAM > > > socket, the > > > .Xr recvmsg 2 > > > -call will return a timestamp corresponding to when the datagram was > > > > received. > > > +call may return a timestamp corresponding to when the datagram was > > > > received. > > > +However, it may not, for example due to a resource shortage. > > > The > > > .Va msg_control > > > field in the > > > > > > > So I guess this actually happened to someone... is it a common thing > > for the timestamp to fail? I ask because ntpd relies on SO_TIMESTAMP > > and if this situation really happens and can persist for a long time, > > ntpd would effectively stop working. > > > > -- Ian > > > > pho discovered how to trigger it. If you start 50 ping processes > simultaneously, sometimes a few will fail. Will ntpd be ok with a single > failure, as long as the timestamp is received correctly in a subsequent > packet? > -Alan Yeah, nptd is resilient to missing data and intermittent comms, within reason. If it goes hours without getting a timestamp, system time would start to drift. Running 50 concurrent pings sounds like something that won't come up in the real world. :) -- Ian