From nobody Mon Oct 17 06:02:38 2022 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MrRHl6m06z4fx0G for ; Mon, 17 Oct 2022 06:03:15 +0000 (UTC) (envelope-from michaelsprivate@gmail.com) Received: from mail-oa1-x2f.google.com (mail-oa1-x2f.google.com [IPv6:2001:4860:4864:20::2f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MrRHl3GJsz46q6 for ; Mon, 17 Oct 2022 06:03:15 +0000 (UTC) (envelope-from michaelsprivate@gmail.com) Received: by mail-oa1-x2f.google.com with SMTP id 586e51a60fabf-1322d768ba7so12226929fac.5 for ; Sun, 16 Oct 2022 23:03:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Zd5Th1LGaXw8pM/KLuxoARm/IJ0TI9Q3WsSjNV/DN6w=; b=jXjqP1pW+2sKcGcceiuIWxxWZ8NKm3A75E5uD+/FmJfdql8v+JmI+tV7sXazhD82IP 7jbC32TCbxpspK8nDP00ZTH+FoIS80v07EePbw5C1gERdO7bKBfJ3BDvuyYFPn6E4+rY BzPPw2MF3sVGvrU+LNYtCTnhXcLQC/5ij645vtzCPFuewrlPeMwUExXXl6X/uLV97DbQ 84HUpz732JmtUtDG28VayPfz+L/GHUlCJ/Zrh4EzSSTEqQIVIzy0ya2Kc9RCSMAHTVkT nzklzGH69J2SH7x+/ojGoSKrr/U1/r8LS/Fse+gfwDVUr8QJttYZNWBvMXFbvTf0SRTn RRTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Zd5Th1LGaXw8pM/KLuxoARm/IJ0TI9Q3WsSjNV/DN6w=; b=JLrPaYWUS8/XpE2cg+3sRxuT7bVp1haXgndeAoDKFNj+twImWtzBSKgeMdonotVkyY muYk7kOqpUUh0Tz7K0VXxesXDW6WeyW/wrFPLiW+b5WoM+Ur1BC1PLrTQ6UHxqOuS0ky qCG33j5t7xwXHHjgVe+7ebIhb3lI88N0qgaLUxZqk/cdrn0PkF8IGQDY2degeyyaq+JS 34d8BH4RuNSGvV0R4w3ldj3h188VJQWzjJRLtsYZjL1Td5C4xl88Fer6MkYQ2m+lTMom lsGHVFyOpsVI5mpaPmyJzjfXUDnIkTmY/PCZJOb9PaecxI5REPF4oVxLkOHSwcc2d5Bw Z9qQ== X-Gm-Message-State: ACrzQf1U7TNK6YQdPDoBKFTdclZoCBF3foJF5STA4BoHMoeWnzUuR4AF uC2kZ8NNDw4bhN/83M5wn7h3n+knOY5Fi4hd37wrOpIDOnWFWKn0 X-Google-Smtp-Source: AMsMyM4JLTmGttJ0hIn3gD+V4qq7ki6dgm8HMR0NXwCNIh7+GdLD2L5oRfDfQEKC8be/oHGsdeDUNcizVwOiYzOcJNU= X-Received: by 2002:a05:6870:d626:b0:132:9149:dc8a with SMTP id a38-20020a056870d62600b001329149dc8amr14017180oaq.141.1665986594492; Sun, 16 Oct 2022 23:03:14 -0700 (PDT) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Michael Schuster Date: Mon, 17 Oct 2022 08:02:38 +0200 Message-ID: Subject: Re: host unresponsive when setting time very far in the future To: Jan Schaumann Cc: FreeBSD Hackers Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4MrRHl3GJsz46q6 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=jXjqP1pW; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of michaelsprivate@gmail.com designates 2001:4860:4864:20::2f as permitted sender) smtp.mailfrom=michaelsprivate@gmail.com X-Spamd-Result: default: False [-3.86 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; NEURAL_HAM_SHORT(-0.86)[-0.865]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2001:4860:4000::/36:c]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2001:4860:4864::/48, country:US]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROMTLD(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; FROM_HAS_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2001:4860:4864:20::2f:from]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; TO_DN_ALL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-ThisMailContainsUnwantedMimeParts: N to answer myself: On Mon, Oct 17, 2022 at 6:35 AM Michael Schuster wrote: > > Jan, > > On Mon, Oct 17, 2022, 04:10 Jan Schaumann wrote: >> >> Hello, >> >> I've observed that trying to set the date _very_ far >> in the future causes my FreeBSD AWS instance to become >> unresponsive and requiring a forced reboot to come >> back. (I don't see an actual kernel panic, however.) > > > A few questions that come to mind: > - Which version of FreeBSD? > - which architecture (I know nothing of AWS, perhaps that's implied)? > - have you tried this on a different platform (a VM or real HW)? on AMD-based HW from 2020, running 13.1-RELEASE-p2, I could not duplicate OP's observation. regards > > Out of curiosity: why? :-) > > One thing I'd do in a situation like this is display the numbers in hex, that may give you a clue. > > HTH > Michael > PS: make sure to keep the list included, this about the extent of what I can add here! > >> >> # date -f "%s" 44093078356492799 >> Fri Dec 31 23:59:59 UTC 1397255999 >> >> succeeds, but any second more (i.e., into the year >> 1397256000), and the system locks up. >> >> After setting the date as above and waiting a few >> seconds does increment the seconds since epoch just >> fine into the year 1397256000: >> >> # date +%s >> 44093078356492850 >> # date >> Sat Jan 1 00:00:51 UTC 1397256000 >> >> so gettimeofday(2) has no problem with these numbers, >> but it seems that settimeofday(2) does tickles the >> kernel in a funny way? >> >> What's the significance of this particular year? If >> tm_year is a 32-bit entity, then I'd expect it to max >> out at epoch 67768036191676799 aka 12/31 23:59:59 >> 2147485547, but that doesn't seem to be the case here. >> >> Any ideas (a) what this limit is, and (b) why the >> system doesn't handle it gracefully by e.g., returning >> EINVAL? >> >> -Jan >> -- Michael Schuster http://recursiveramblings.wordpress.com/ recursion, n: see 'recursion'