From nobody Mon Oct 17 13:08:16 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 4MrckR0VJMz4fwMM for ; Mon, 17 Oct 2022 13:08:31 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-vs1-f50.google.com (mail-vs1-f50.google.com [209.85.217.50]) (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 4MrckQ27Lxz40MH for ; Mon, 17 Oct 2022 13:08:30 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-vs1-f50.google.com with SMTP id 63so11381293vse.2 for ; Mon, 17 Oct 2022 06:08:30 -0700 (PDT) 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=WlSg3AiQTDkUocKExrITMxHTdEhEb5mt7nnpBYXCjAE=; b=SglHzuUXgWyNgmsp59hda8bDtTlD07v1VAoSPs6cJ0nhd7zdWBN/96+ecJLAhkhMZO +lm0DE4AiZiQG023vJh7emq5zK6isdHCZoS170O+4VaoyuJtLLHnnmDYSMuuvPl5j9t7 JUmzVn0vfBUzBUTNDz+p3JJS8jV+Bq5KfdNHVHBIj64GZaIBi1o67wpex2zNFMbufkD7 mZhrlf+ULJhJs9CBkqBWNJzfMAzfdZ7qux6cY72Imygz0BYTk1m6SBO3ZXr3aJBdy9T4 j34vybT8S7HA4XZOtcdthd9OAA3yuMJznNwVH3N3fMOHyAQSx/k1ozze6qXKlVuuHP2U Dt8Q== X-Gm-Message-State: ACrzQf1iBKE4WvRhbbVwtGxdByD4lYbHfFlSUR4sbH+cYIs3Ctv9eXsm XSuNAPAaccf+7yhKDCeBOoRElggJC0JYvMgAHi4= X-Google-Smtp-Source: AMsMyM4FhWjTVOzvU6uHNcjYz+cOrKryl+sBJMUwE6i1Zm8X0Xcyfw1ej2jqpMCxEXCpESjn5M/U4hv4mQvwsLnkVt4= X-Received: by 2002:a67:c30d:0:b0:3a7:1ba3:dd0 with SMTP id r13-20020a67c30d000000b003a71ba30dd0mr4380072vsj.76.1666012108321; Mon, 17 Oct 2022 06:08:28 -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: Alan Somers Date: Mon, 17 Oct 2022 07:08:16 -0600 Message-ID: Subject: Re: host unresponsive when setting time very far in the future To: Michael Schuster Cc: Jan Schaumann , FreeBSD Hackers Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4MrckQ27Lxz40MH X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.217.50 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; FREEMAIL_TO(0.00)[gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.217.50:from]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; RCVD_IN_DNSWL_NONE(0.00)[209.85.217.50:from]; TO_DN_ALL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; FREEFALL_USER(0.00)[asomers]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCPT_COUNT_THREE(0.00)[3]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[freebsd.org]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N On Mon, Oct 17, 2022 at 12:03 AM Michael Schuster wrote: > > 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. On 14.0-CURRENT there is a panic if you try to set past the year 10000 AD. The commit message suggests that limitation is intended to prevent overflows when the time gets converted into BCD, using a 16-bit year. And other code suggests it's a limitation that can't be easily lifted, because it's baked into the RTC hardware (for at least some RTC chips, anyway). But still, the panic ought to be converted into an EINVAL. The panics are in clock_ts_to_ct . -Alan