Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Saint: A dead sinner revised and edited. -- Ambrose Bierce


devel / comp.protocols.time.ntp / ntpd logging to syslog, failed to log panic_stop message

SubjectAuthor
* ntpd logging to syslog, failed to log panic_stop messageEdward McGuire
`* Re: [questions] ntpd logging to syslog, failed to log panic_stop messageHarlan Stenn
 `- Re: [questions] ntpd logging to syslog, failed to log panic_stop messageEdward McGuire

1
ntpd logging to syslog, failed to log panic_stop message

<ea7d1e6b-b9da-4c71-9123-602bd961c909n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=434&group=comp.protocols.time.ntp#434

  copy link   Newsgroups: comp.protocols.time.ntp
X-Received: by 2002:a37:3c5:0:b0:6ce:3f31:e019 with SMTP id 188-20020a3703c5000000b006ce3f31e019mr5431000qkd.498.1663359364606;
Fri, 16 Sep 2022 13:16:04 -0700 (PDT)
X-Received: by 2002:a05:6808:120f:b0:349:f62:5c04 with SMTP id
a15-20020a056808120f00b003490f625c04mr3213418oil.100.1663359364362; Fri, 16
Sep 2022 13:16:04 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.protocols.time.ntp
Date: Fri, 16 Sep 2022 13:16:04 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=70.117.52.110; posting-account=99-szAoAAABeqjQXkwq9U3xS8fVveYhv
NNTP-Posting-Host: 70.117.52.110
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ea7d1e6b-b9da-4c71-9123-602bd961c909n@googlegroups.com>
Subject: ntpd logging to syslog, failed to log panic_stop message
From: metaed@gmail.com (Edward McGuire)
Injection-Date: Fri, 16 Sep 2022 20:16:04 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3303
 by: Edward McGuire - Fri, 16 Sep 2022 20:16 UTC

NTP ntpd 4.2.8p15
Slackware Linux 15.0

It took longer than it should have to figure out that ntpd was not running and why. ntpd exited with a panic_stop condition, but there was nothing in syslog. Once we understood what happened, it was easy to reproduce. Other messages from ntpd were routinely logged, but panic_stop was not logged.

Just to be clear, I understand why we got a panic_stop and I solved that. We didn't understand why a fatal error wasn't logged, when other messages, both fatal and non-fatal, were logged.

After a good bit of code reading, I decided that the panic_stop message is treated much differently from most ntpd messages associated with a fatal condition, in two ways.

(1) Messages associated with most fatal conditions are logged, without filtering, before the exit() call. But panic_stop is logged only when the syslog filter has "+sysevents". Strangely, that's not the out-of-box filter setting.

(2) Messages associated with most fatal conditions have a syslog severity of 3 "error". But panic_stop messages have a much lower syslog severity of 6 "info". That is lower even than "notice" which means "normal but significant condition".

I can't rely on the default filter setting to log a fatal condition, so as a precaution I turned off filtering: "logconfig =allall". Given the importance of fatal conditions, perhaps this can be made the out-of-box default, not "logconfig =syncall".

And perhaps the severity associated with the panic_stop message can be changed to "error", not "info". An exit() call does not in any useful way leave the ntpd daemon in a "normal but significant condition".

But the report_event() routine utilized by the panic_stop condition does not currently take a severity as an argument. It simply logs all sysevents at severity "info". So this would be kind of a big deal to patch.

I wanted to document this for anyone who might depend on syslog to monitor and diagnose problems with ntpd. Also I could have some wrong perceptions about what is going on with ntpd logging in general, and panic_stop logging in particular, so if you see something, please point it out.

Cheers!
Edward

Re: [questions] ntpd logging to syslog, failed to log panic_stop message

<2f535b6b-892f-b04f-d3fd-952820f1b46c@nwtime.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=435&group=comp.protocols.time.ntp#435

  copy link   Newsgroups: comp.protocols.time.ntp
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.gal.iecc.com!not-for-mail
From: stenn@nwtime.org (Harlan Stenn)
Newsgroups: comp.protocols.time.ntp
Subject: Re: [questions] ntpd logging to syslog, failed to log panic_stop message
Date: Fri, 16 Sep 2022 23:18:00 -0000 (UTC)
Organization: Taughannock Networks, Trumansburg NY
Message-ID: <2f535b6b-892f-b04f-d3fd-952820f1b46c@nwtime.org>
References: <ea7d1e6b-b9da-4c71-9123-602bd961c909n@googlegroups.com>
Reply-To: questions@lists.ntp.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 16 Sep 2022 23:18:00 -0000 (UTC)
Injection-Info: gal.iecc.com; posting-host="gal.iecc.com:64.57.183.53";
logging-data="63207"; mail-complaints-to="abuse@iecc.com"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv: 102.0) Gecko/20100101 Thunderbird/102.2.2
To: questions@lists.ntp.org
Return-Path: <questions+bounces-107-ntpquestions=iecc.com@lists.ntp.org>
Delivered-To: ntpquestions@iecc.com
Delivered-To: questions@lists.ntp.org
X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on gal.iecc.com
X-Spam-Status: No, score=-4.6 required=4.4 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.5
Authentication-Results: iecc.com; spf=pass spf.mailfrom=questions+bounces-107-ntpquestions=iecc.com@lists.ntp.org spf.helo=mail0.chi1.ntfo.org smtp.remote-ip="204.93.207.17"; dkim=pass header.d=nwtime.org header.s=mail header.a=rsa-sha256 header.b="KErCFb8/"; dmarc=pass header.from=nwtime.org polrec.p=none polrec.pct=100
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nwtime.org; s=mail; t=1663370088; bh=MRpvsCM+JU9lucqFvDoOEEuLfrW+fp9uBLPYsl3cgEo=; h=Message-ID:Date:Reply-To:List-unsubscribe:List-Id:MIME-Version: Subject:To:References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding; b=KErCFb8/b0rWkr4d7WFwsOUkcACbA8zsFGHj+tx+0lBxCuB27jZYY+W6PA8qy6ztZ jpSecOUOjjr4gto3OE1F/FKyOsIyFZ9zBz5SG2DQsZRNmvL18HkTrs3cxBv4zr20zB odPLd/kbAbKnhG9vDTxHG/J2VRe8M5Szqhu66opM=
X-Original-To: questions@lists.ntp.org
List-unsubscribe: mailto: questions+unsubscribe@lists.ntp.org
X-BeenThere: questions@lists.ntp.org
List-Id: questions.lists.ntp.org
Precedence: list
Content-Language: en-US
In-Reply-To: <ea7d1e6b-b9da-4c71-9123-602bd961c909n@googlegroups.com>
X-DCC-iecc-Metrics: gal.iecc.com 1107; Body=1 Fuz1=1 Fuz2=1
Mail-to-news: iecc.com
 by: Harlan Stenn - Fri, 16 Sep 2022 23:18 UTC

Open a report at bugs.ntp.org (gmail users probably need to be manually
approved because we get far too many spammers opening spam bug reports
otherwise) and it will likely be fixed in the upcoming p16.

H

On 9/16/2022 1:16 PM, Edward McGuire wrote:
> NTP ntpd 4.2.8p15
> Slackware Linux 15.0
>
> It took longer than it should have to figure out that ntpd was not running and why. ntpd exited with a panic_stop condition, but there was nothing in syslog. Once we understood what happened, it was easy to reproduce. Other messages from ntpd were routinely logged, but panic_stop was not logged.
>
> Just to be clear, I understand why we got a panic_stop and I solved that. We didn't understand why a fatal error wasn't logged, when other messages, both fatal and non-fatal, were logged.
>
> After a good bit of code reading, I decided that the panic_stop message is treated much differently from most ntpd messages associated with a fatal condition, in two ways.
>
> (1) Messages associated with most fatal conditions are logged, without filtering, before the exit() call. But panic_stop is logged only when the syslog filter has "+sysevents". Strangely, that's not the out-of-box filter setting.
>
> (2) Messages associated with most fatal conditions have a syslog severity of 3 "error". But panic_stop messages have a much lower syslog severity of 6 "info". That is lower even than "notice" which means "normal but significant condition".
>
> I can't rely on the default filter setting to log a fatal condition, so as a precaution I turned off filtering: "logconfig =allall". Given the importance of fatal conditions, perhaps this can be made the out-of-box default, not "logconfig =syncall".
>
> And perhaps the severity associated with the panic_stop message can be changed to "error", not "info". An exit() call does not in any useful way leave the ntpd daemon in a "normal but significant condition".
>
> But the report_event() routine utilized by the panic_stop condition does not currently take a severity as an argument. It simply logs all sysevents at severity "info". So this would be kind of a big deal to patch.
>
> I wanted to document this for anyone who might depend on syslog to monitor and diagnose problems with ntpd. Also I could have some wrong perceptions about what is going on with ntpd logging in general, and panic_stop logging in particular, so if you see something, please point it out.
>
> Cheers!
> Edward

--
Harlan Stenn <stenn@nwtime.org>
http://networktimefoundation.org - be a member!
--
This is questions@lists.ntp.org
Subscribe: questions+subscribe@lists.ntp.org
Unsubscribe: questions+unsubscribe@lists.ntp.org

Re: [questions] ntpd logging to syslog, failed to log panic_stop message

<33fbc309-78c8-4b52-b686-9c19b21c0695n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=437&group=comp.protocols.time.ntp#437

  copy link   Newsgroups: comp.protocols.time.ntp
X-Received: by 2002:a05:620a:4414:b0:6ce:610c:fe34 with SMTP id v20-20020a05620a441400b006ce610cfe34mr14622961qkp.659.1663621897405;
Mon, 19 Sep 2022 14:11:37 -0700 (PDT)
X-Received: by 2002:a05:6830:314d:b0:658:5246:af1 with SMTP id
c13-20020a056830314d00b0065852460af1mr8669719ots.149.1663621897140; Mon, 19
Sep 2022 14:11:37 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.protocols.time.ntp
Date: Mon, 19 Sep 2022 14:11:36 -0700 (PDT)
In-Reply-To: <2f535b6b-892f-b04f-d3fd-952820f1b46c@nwtime.org>
Injection-Info: google-groups.googlegroups.com; posting-host=70.117.52.110; posting-account=99-szAoAAABeqjQXkwq9U3xS8fVveYhv
NNTP-Posting-Host: 70.117.52.110
References: <ea7d1e6b-b9da-4c71-9123-602bd961c909n@googlegroups.com> <2f535b6b-892f-b04f-d3fd-952820f1b46c@nwtime.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <33fbc309-78c8-4b52-b686-9c19b21c0695n@googlegroups.com>
Subject: Re: [questions] ntpd logging to syslog, failed to log panic_stop message
From: metaed@gmail.com (Edward McGuire)
Injection-Date: Mon, 19 Sep 2022 21:11:37 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1956
 by: Edward McGuire - Mon, 19 Sep 2022 21:11 UTC

On Friday, September 16, 2022 at 6:18:02 PM UTC-5, Harlan Stenn wrote:
> Open a report at bugs.ntp.org (gmail users probably need to be manually
> approved [...]) and it will likely be fixed in the upcoming p16.

Thank you Harlan. And thanks to justdave who helped me get credentialed at bugs.ntp.org.

The process of opening a report surfaced bug no. 2410, "The ntpd daemon should never abnormally exit without logging a ERR level message". I believe my experience does not warrant a separate report because it is a duplicate of 2410. I will add a comment there including a simple proposal for solving this.

Please consider bug 2410 for p16.

Cheers!
Edward

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor