• ntpd does not start daemon control: got EOF

    From Marco Moock@mm@dorfdsl.de to comp.protocols.time.ntp on Tue Apr 21 21:08:18 2026
    From Newsgroup: comp.protocols.time.ntp

    Hello!

    I have a FreeBSD 15 system. I was able to use ntpd, but after I
    installed the latest updates 15.0-RELEASE-p6, it does not start. I dunno
    if that is the root cause, but after the restart I noticed the issue.

    [~]$ grep -v ^# /etc/ntp.conf

    tos minclock 3 maxclock 6
    pool -6 2.freebsd.pool.ntp.org iburst
    restrict default limited kod nomodify notrap noquery nopeer
    restrict source limited kod nomodify notrap noquery
    restrict 127.0.0.1
    restrict ::1
    leapfile "/var/db/ntpd.leap-seconds.list"

    How can I diagnose the issue?
    --
    kind regards
    Marco
    Muell und Spam bitte an abfalleimer2000@stinkedores.dorfdsl.de

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Harlan Stenn via questions Mailing List@questions@lists.ntp.org to Marco Moock on Tue Apr 21 19:58:00 2026
    From Newsgroup: comp.protocols.time.ntp

    Hi Marco,

    Where did you see the "got EOF" message?

    What is the output of 'ntpq -p' on your machine, preferably waiting a
    minute or few after ntpd starts?

    On 4/21/2026 12:08 PM, Marco Moock wrote:
    Hello!

    I have a FreeBSD 15 system. I was able to use ntpd, but after I
    installed the latest updates 15.0-RELEASE-p6, it does not start. I dunno
    if that is the root cause, but after the restart I noticed the issue.

    [~]$ grep -v ^#  /etc/ntp.conf

    tos minclock 3 maxclock 6
    pool -6 2.freebsd.pool.ntp.org iburst
    restrict default limited kod nomodify notrap noquery nopeer
    restrict source  limited kod nomodify notrap noquery
    restrict 127.0.0.1
    restrict ::1
    leapfile "/var/db/ntpd.leap-seconds.list"

    How can I diagnose the issue?

    --
    Harlan Stenn <stenn@ntp.org>
    NTP Project Lead. The NTP Project is part of:
    https://www.nwtime.org/ - be a member!

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Marco Moock@mm@dorfdsl.de to comp.protocols.time.ntp on Tue Apr 21 22:08:28 2026
    From Newsgroup: comp.protocols.time.ntp

    On 21.04.2026 19:58 Uhr Harlan Stenn via questions Mailing List wrote:

    Where did you see the "got EOF" message?

    When I try to start the daemon via the service command. This executes
    the startup script in FreeBSD.

    [~]$ sudo service ntpd start
    Starting ntpd.
    daemon control: got EOF
    /etc/rc.d/ntpd: WARNING: failed to start ntpd
    [~]$

    What is the output of 'ntpq -p' on your machine, preferably waiting a
    minute or few after ntpd starts?

    [ ~]$ ntpq -p
    remote refid st t when poll reach delay offset jitter ==============================================================================
    2.freebsd.pool. .POOL. 16 p - 64 0 0.000 +0.000 0.001 +basilisk.mybb.d 171.237.1.87 2 u 198 512 377 15.853 -1.130 1.459 -x1.ncomputers.o 2.34.109.103 3 u 752 1024 377 15.232 -0.881 0.319 +2003:a:47f:abe4 237.17.204.95 2 u 58 512 377 23.608 +1.292 2.623 *vps-fra1.orlean 195.145.119.188 2 u 24 512 377 9.119 +0.777 5.283 -2a01:4f8:c0c:c4 130.149.17.21 2 u 633 1024 377 18.587 -1.842 1.062 [~]$

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Harlan Stenn via questions Mailing List@questions@lists.ntp.org to Marco Moock on Tue Apr 21 20:43:00 2026
    From Newsgroup: comp.protocols.time.ntp

    On 4/21/2026 1:08 PM, Marco Moock wrote:
    On 21.04.2026 19:58 Uhr Harlan Stenn via questions Mailing List wrote:

    Where did you see the "got EOF" message?

    When I try to start the daemon via the service command. This executes
    the startup script in FreeBSD.

    [~]$ sudo service ntpd start
    Starting ntpd.
    daemon control: got EOF
    /etc/rc.d/ntpd: WARNING: failed to start ntpd
    [~]$

    That looks like an issue with FreeBSD's startup script, as the output
    below from ntpq shows ntpd is running.

    What is the output of 'ntpq -p' on your machine, preferably waiting a
    minute or few after ntpd starts?

    [ ~]$ ntpq -p
    remote refid st t when poll reach delay offset jitter
    ==============================================================================
    2.freebsd.pool. .POOL. 16 p - 64 0 0.000 +0.000 0.001
    +basilisk.mybb.d 171.237.1.87 2 u 198 512 377 15.853 -1.130 1.459
    -x1.ncomputers.o 2.34.109.103 3 u 752 1024 377 15.232 -0.881 0.319
    +2003:a:47f:abe4 237.17.204.95 2 u 58 512 377 23.608 +1.292 2.623
    *vps-fra1.orlean 195.145.119.188 2 u 24 512 377 9.119 +0.777 5.283
    -2a01:4f8:c0c:c4 130.149.17.21 2 u 633 1024 377 18.587 -1.842 1.062
    [~]$

    Thanks - this shows ntpd is running.

    Dave, Marco's ntp.conf file uses "minclock 3 maxclock 6". I know we
    have a pending fix for this - that fix does not count the "pool"
    directive as a "clock", right?
    --
    Harlan Stenn <stenn@nwtime.org>
    https://networktimefoundation.org - be a member!

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Dave Hart via questions Mailing List@questions@lists.ntp.org to Harlan Stenn on Tue Apr 21 20:58:00 2026
    From Newsgroup: comp.protocols.time.ntp

    --0000000000008ef90b064ffe9508
    Content-Type: text/plain; charset="UTF-8"
    Content-Transfer-Encoding: quoted-printable

    On Tue, Apr 21, 2026 at 20:37=E2=80=AFUTC Harlan Stenn <stenn@nwtime.org> w= rote:

    On 4/21/2026 1:08 PM, Marco Moock wrote:
    On 21.04.2026 19:58 Uhr Harlan Stenn via questions Mailing List wrote:

    Where did you see the "got EOF" message?

    When I try to start the daemon via the service command. This executes
    the startup script in FreeBSD.

    [~]$ sudo service ntpd start
    Starting ntpd.
    daemon control: got EOF
    /etc/rc.d/ntpd: WARNING: failed to start ntpd
    [~]$

    That looks like an issue with FreeBSD's startup script, as the output
    below from ntpq shows ntpd is running.


    It's hard to imagine FreeBSD suddenly got it wrong after years of bundling ntpd, but my first step would be to investigate the command line used to
    launch ntpd. It's logged at startup to syslog, or to a file given after "logfile" in ntp.conf. EOF might indicate the script expects it to not daemonize itself, and it is. If -n/--nofork isn't on the command line,
    modify the rc.d script to use it and try again.

    Dave, Marco's ntp.conf file uses "minclock 3 maxclock 6". I know we
    have a pending fix for this - that fix does not count the "pool"
    directive as a "clock", right?


    I have no such pending change. Pool lines count towards maxclock, as they always have. NTPsec recently changed to exclude them. I'd argue a change
    like that belongs in ntp-dev an eventually the next major stable release, similar to the off-by-one fix that will cause noncontributing pool &
    manycast associations to spin down and spur replacement.


    Cheers,
    Dave Hart

    --0000000000008ef90b064ffe9508
    Content-Type: text/html; charset="UTF-8"
    Content-Transfer-Encoding: quoted-printable

    <div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon= t-family:&quot;trebuchet ms&quot;,sans-serif"><span style=3D"font-family:Ar= ial,Helvetica,sans-serif">On Tue, Apr 21, 2026 at 20:37=E2=80=AFUTC Harlan = Stenn &lt;<a href=3D"mailto:stenn@nwtime.org">stenn@nwtime.org</a>&gt; wrot= e:</span></div></div><div class=3D"gmail_quote gmail_quote_container"><bloc= kquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:= 1px solid rgb(204,204,204);padding-left:1ex">On 4/21/2026 1:08 PM, Marco Mo= ock wrote:<br>
    &gt; On 21.04.2026 19:58 Uhr Harlan Stenn via questions Mailing List wrote:=

    &gt; <br>
    &gt;&gt; Where did you see the &quot;got EOF&quot; message?<br>
    &gt; <br>
    &gt; When I try to start the daemon via the service command. This executes<=

    &gt; the startup script in FreeBSD.<br>
    &gt; <br>
    &gt; [~]$ sudo service ntpd start<br>
    &gt; Starting ntpd.<br>
    &gt; daemon control: got EOF<br>
    &gt; /etc/rc.d/ntpd: WARNING: failed to start ntpd<br>
    &gt; [~]$<br>

    That looks like an issue with FreeBSD&#39;s startup script, as the output <=

    below from ntpq shows ntpd is running.<br></blockquote><div><br></div><div>= <div class=3D"gmail_default" style=3D"font-family:&quot;trebuchet ms&quot;,= sans-serif">It&#39;s hard to imagine FreeBSD suddenly got it wrong after ye= ars of bundling ntpd, but my first step would be to investigate the command=
    line used to launch ntpd.=C2=A0 It&#39;s logged at startup to syslog, or t=
    o a file given after &quot;logfile&quot; in ntp.conf.=C2=A0 EOF might indic= ate the script expects it to not daemonize itself, and it is.=C2=A0 If -n/-= -nofork isn&#39;t on the command line, modify the rc.d script to use it and=
    try again.</div><br></div><blockquote class=3D"gmail_quote" style=3D"margi= n:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex= ">Dave, Marco&#39;s ntp.conf file uses &quot;minclock 3 maxclock 6&quot;.= =C2=A0 I know we <br>
    have a pending fix for this - that fix does not count the &quot;pool&quot; =

    directive as a &quot;clock&quot;, right?<br></blockquote><div><br></div><di=
    v class=3D"gmail_default" style=3D"font-family:&quot;trebuchet ms&quot;,san= s-serif">I have no such pending change.=C2=A0 Pool lines count towards maxc= lock, as they always have.=C2=A0 NTPsec recently changed to exclude them.= =C2=A0 I&#39;d argue a change like that belongs in ntp-dev an eventually th=
    e next major stable release, similar to the off-by-one fix that will cause = noncontributing pool &amp; manycast associations to spin down and spur repl= acement.</div><div class=3D"gmail_default" style=3D"font-family:&quot;trebu= chet ms&quot;,sans-serif"><br></div></div><div><div dir=3D"ltr" class=3D"gm= ail_signature" data-smartmail=3D"gmail_signature"><div dir=3D"ltr"><div><fo=
    nt face=3D"tahoma, sans-serif" color=3D"#666666"><br></font></div><font fac= e=3D"tahoma, sans-serif" color=3D"#666666">Cheers,<br>Dave Hart</font></div= ></div></div></div>

    --0000000000008ef90b064ffe9508--

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Harlan Stenn via questions Mailing List@questions@lists.ntp.org to Dave Hart on Tue Apr 21 21:03:00 2026
    From Newsgroup: comp.protocols.time.ntp

    On 4/21/2026 1:51 PM, Dave Hart wrote:
    On Tue, Apr 21, 2026 at 20:37 UTC Harlan Stenn <stenn@nwtime.org <mailto:stenn@nwtime.org>> wrote:

    On 4/21/2026 1:08 PM, Marco Moock wrote:
    > On 21.04.2026 19:58 Uhr Harlan Stenn via questions Mailing List
    wrote:
    >
    >> Where did you see the "got EOF" message?
    >
    > When I try to start the daemon via the service command. This executes
    > the startup script in FreeBSD.
    >
    > [~]$ sudo service ntpd start
    > Starting ntpd.
    > daemon control: got EOF
    > /etc/rc.d/ntpd: WARNING: failed to start ntpd
    > [~]$

    That looks like an issue with FreeBSD's startup script, as the output
    below from ntpq shows ntpd is running.


    It's hard to imagine FreeBSD suddenly got it wrong after years of
    bundling ntpd, but my first step would be to investigate the command
    line used to launch ntpd.  It's logged at startup to syslog, or to a
    file given after "logfile" in ntp.conf.  EOF might indicate the script expects it to not daemonize itself, and it is.  If -n/--nofork isn't on
    the command line, modify the rc.d script to use it and try again.

    Yup.

    Dave, Marco's ntp.conf file uses "minclock 3 maxclock 6".  I know we
    have a pending fix for this - that fix does not count the "pool"
    directive as a "clock", right?


    I have no such pending change.  Pool lines count towards maxclock, as
    they always have.  NTPsec recently changed to exclude them.  I'd argue a change like that belongs in ntp-dev and eventually the next major stable release, similar to the off-by-one fix that will cause noncontributing
    pool & manycast associations to spin down and spur replacement.

    Agreed, and thanks - I bet I was remembering the "off-by-one" issue.


    Cheers,
    Dave Hart
    --
    Harlan Stenn <stenn@ntp.org>
    NTP Project Lead. The NTP Project is part of:
    https://www.nwtime.org/ - be a member!

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Marco Moock@mm@dorfdsl.de to comp.protocols.time.ntp on Wed Apr 22 05:25:43 2026
    From Newsgroup: comp.protocols.time.ntp

    Am 21.04.26 um 22:43 schrieb Harlan Stenn via questions Mailing List:
    On 4/21/2026 1:08 PM, Marco Moock wrote:
    On 21.04.2026 19:58 Uhr Harlan Stenn via questions Mailing List wrote:

    Where did you see the "got EOF" message?

    When I try to start the daemon via the service command. This executes
    the startup script in FreeBSD.

    [~]$ sudo service ntpd start
    Starting ntpd.
    daemon control: got EOF
    /etc/rc.d/ntpd: WARNING: failed to start ntpd
    [~]$

    That looks like an issue with FreeBSD's startup script, as the output
    below from ntpq shows ntpd is running.
    I now ran the script using sh -x /etc/rc.d/ntpd:
    It seems the limits command is causing the message.
    Indeed ntpd was already running.
    I killed it and the service starts properly.

    I am asking myself what can cause that. Maybe I need to set up a virtual machine to test and find the cause for that process without the service running or the issue the check fails.

    + echo 'Starting ntpd.'
    Starting ntpd.
    + [ -n '' ]
    + _cd=''
    + _doit=' /usr/sbin/ntpd -p /var/db/ntp/ntpd.pid -c /etc/ntp.conf -f /var/db/ntp/ntpd.drift -g'
    + [ -n ntpd ]
    + _doit=$'su -m ntpd -c \'sh -c " /usr/sbin/ntpd -p
    /var/db/ntp/ntpd.pid -c /etc/ntp.conf -f /var/db/ntp/ntpd.drift -g"\''
    + [ -n '' ]
    + [ -n '' ]
    + _doit=$' limits -C daemon su -m ntpd -c \'sh -c " /usr/sbin/ntpd -p /var/db/ntp/ntpd.pid -c /etc/ntp.conf -f /var/db/ntp/ntpd.drift -g"\''
    + local '_really_run_it=true'
    + checkyesno ntpd_svcj
    + eval '_value=$ntpd_svcj'
    + _value=NO
    + debug 'checkyesno: ntpd_svcj is set to NO.'
    + return 1
    + [ true '=' true ]
    + _run_rc_doit $' limits -C daemon su -m ntpd -c \'sh -c "
    /usr/sbin/ntpd -p /var/db/ntp/ntpd.pid -c /etc/ntp.conf -f /var/db/ntp/ntpd.drift -g"\''
    + local _m
    + debug $'run_rc_command: doit: limits -C daemon su -m ntpd -c \'sh -c
    " /usr/sbin/ntpd -p /var/db/ntp/ntpd.pid -c /etc/ntp.conf -f /var/db/ntp/ntpd.drift -g"\''
    + umask
    + _m=0022
    +
    + eval $' limits -C daemon su -m ntpd -c \'sh -c " /usr/sbin/ntpd -p /var/db/ntp/ntpd.pid -c /etc/ntp.conf -f /var/db/ntp/ntpd.drift -g"\''
    + limits -C daemon su -m ntpd -c 'sh -c " /usr/sbin/ntpd -p /var/db/ntp/ntpd.pid -c /etc/ntp.conf -f /var/db/ntp/ntpd.drift -g"'
    daemon control: got EOF
    + _return=1
    + umask 0022
    + [ 1 -ne 0 ]
    + [ -z '' ]
    + return 1
    + warn 'failed to start ntpd'
    + [ -x /usr/bin/logger ]
    + logger '/etc/rc.d/ntpd: WARNING: failed to start ntpd'
    + echo '/etc/rc.d/ntpd: WARNING: failed to start ntpd'
    /etc/rc.d/ntpd: WARNING: failed to start ntpd
    + return 1
    [ ~]$
    --
    Gruß
    Marco

    Junk-Mail bitte an trashcan@stinkedores.dorfdsl.de
    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Alexander Ziaee@ziaee@FreeBSD.org to Harlan Stenn on Wed Apr 22 10:03:00 2026
    From Newsgroup: comp.protocols.time.ntp

    On 4/21/2026 1:51 PM, Dave Hart wrote:
    On Tue, Apr 21, 2026 at 20:37 UTC Harlan Stenn <stenn@nwtime.org > <mailto:stenn@nwtime.org>> wrote:
    On 4/21/2026 1:08 PM, Marco Moock wrote:
    > On 21.04.2026 19:58 Uhr Harlan Stenn via questions Mailing List
    wrote:
    >
    >> Where did you see the "got EOF" message?
    >
    > When I try to start the daemon via the service command. This executes >> > the startup script in FreeBSD.
    >
    > [~]$ sudo service ntpd start
    > Starting ntpd.
    > daemon control: got EOF
    > /etc/rc.d/ntpd: WARNING: failed to start ntpd
    > [~]$
    That looks like an issue with FreeBSD's startup script, as the output >> below from ntpq shows ntpd is running.
    Maybe append -x to the first line of /etc/rc.d/ntpd so we can see where it's going wrong?
    Best,
    Alex--- Synchronet 3.21f-Linux NewsLink 1.2
  • From Marco Moock@mm@dorfdsl.de to comp.protocols.time.ntp on Wed Apr 22 12:37:36 2026
    From Newsgroup: comp.protocols.time.ntp

    Am 22.04.26 um 12:03 schrieb Alexander Ziaee:
    Maybe append -x to the first line of /etc/rc.d/ntpd so we can see where it's going wrong?

    See my post from this morning:
    Message-ID: <10s9f3n$3frad$1@paganini.bofh.team>

    Subject: Re: ntpd does not start daemon control: got EOF
    Date: Wed, 22 Apr 2026 05:25:43 +0200
    --
    Gruß
    Marco

    Junk-Mail bitte an trashcan@stinkedores.dorfdsl.de
    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Alexander Ziaee@ziaee@FreeBSD.org to Marco Moock on Wed Apr 22 14:33:00 2026
    From Newsgroup: comp.protocols.time.ntp

    Good morning, I looped in my senior colleague and am investigating now, but I'm not the best at debugging.
    Best,
    Alex
    On 2026-04-22 06:37 -04:00 EDT, "Marco Moock" <mm@dorfdsl.de> wrote:
    Am 22.04.26 um 12:03 schrieb Alexander Ziaee:
    Maybe append -x to the first line of /etc/rc.d/ntpd so we can see where it's going wrong?

    See my post from this morning:
    Message-ID: <10s9f3n$3frad$1@paganini.bofh.team>

    Subject: Re: ntpd does not start daemon control: got EOF
    Date: Wed, 22 Apr 2026 05:25:43 +0200

    --
    Gruß
    Marco

    Junk-Mail bitte an trashcan@stinkedores.dorfdsl.de

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Cy Schubert@Cy.Schubert@cschubert.com to Alexander Ziaee on Wed Apr 22 14:58:00 2026
    From Newsgroup: comp.protocols.time.ntp

    Just to let everyone know, I'm virtually AFK for most of the day today. I
    will be back in my office tonight (west coast Canada time). I will be back full time tomorrow.
    --
    Cheers,
    Cy Schubert <Cy.Schubert@cschubert.com>
    FreeBSD UNIX: <cy@FreeBSD.org> Web: https://FreeBSD.org
    NTP: <cy@nwtime.org> Web: https://nwtime.org

    e**(i*pi)+1=0



    In message <E1wFY5q-0005N8-D6@rmmprod06.runbox>, "Alexander Ziaee" writes:
    Good morning, I looped in my senior colleague and am investigating now, but=
    I'm not the best at debugging.

    Best,
    Alex

    On 2026-04-22 06:37 -04:00 EDT, "Marco Moock" <mm@dorfdsl.de> wrote:
    Am 22.04.26 um 12:03 schrieb Alexander Ziaee:
    Maybe append -x to the first line of /etc/rc.d/ntpd so we can see where = it's going wrong?
    =20
    See my post from this morning:
    Message-ID: <10s9f3n$3frad$1@paganini.bofh.team>
    =20
    Subject: Re: ntpd does not start daemon control: got EOF
    Date: Wed, 22 Apr 2026 05:25:43 +0200
    =20
    --=20
    Gru=C3=9F
    Marco
    =20
    Junk-Mail bitte an trashcan@stinkedores.dorfdsl.de
    =20
    =20=


    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Marco Moock@mm@dorfdsl.de to Cy Schubert on Wed Apr 22 16:18:00 2026
    From Newsgroup: comp.protocols.time.ntp

    Am 22.04.26 um 16:54 schrieb Cy Schubert:
    Just to let everyone know, I'm virtually AFK for most of the day today. I will be back in my office tonight (west coast Canada time). I will be back full time tomorrow.

    Thanks for your support. There is no need to hurry.
    --
    Gruß
    Marco

    Junk-Mail bitte an trashcan@stinkedores.dorfdsl.de

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Marco Moock@mm@dorfdsl.de to comp.protocols.time.ntp on Wed Apr 22 19:43:05 2026
    From Newsgroup: comp.protocols.time.ntp

    Am 21.04.26 um 22:08 schrieb Marco Moock:
    When I try to start the daemon via the service command. This executes
    the startup script in FreeBSD.

    Another thing I would like to let you know is that I have monit running
    that is configured to start ntpd if it is currently not running.
    Depending on which will be started first and how race conditions are
    handled, this might be part of the problem.
    --
    Gruß
    Marco
    Muell und Spam bitte an abfalleimer2000@stinkedores.dorfdsl.de
    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Dave Hart@davehart@gmail.com to Marco Moock on Wed Apr 22 18:33:00 2026
    From Newsgroup: comp.protocols.time.ntp

    --0000000000001c8b4e065010b120
    Content-Type: text/plain; charset="UTF-8"
    Content-Transfer-Encoding: quoted-printable

    On Wed, Apr 22, 2026 at 17:47=E2=80=AFUTC Marco Moock <mm@dorfdsl.de> wrote=
    :

    Am 21.04.26 um 22:08 schrieb Marco Moock:
    When I try to start the daemon via the service command. This executes
    the startup script in FreeBSD.

    Another thing I would like to let you know is that I have monit running
    that is configured to start ntpd if it is currently not running.
    Depending on which will be started first and how race conditions are
    handled, this might be part of the problem.


    That could easily be the problem. Is monit configured to use "service ntpd start"?


    Cheers,
    Dave Hart

    --0000000000001c8b4e065010b120
    Content-Type: text/html; charset="UTF-8"
    Content-Transfer-Encoding: quoted-printable

    <div dir=3D"ltr"><div dir=3D"ltr"><div><div class=3D"gmail_default" style= =3D"font-family:&quot;trebuchet ms&quot;,sans-serif"><span style=3D"font-fa= mily:Arial,Helvetica,sans-serif">On Wed, Apr 22, 2026 at </span><span class= =3D"gmail_default"></span><span style=3D"font-family:Arial,Helvetica,sans-s= erif">1</span><span class=3D"gmail_default">7</span><span style=3D"font-fam= ily:Arial,Helvetica,sans-serif">:47=E2=80=AF</span><span class=3D"gmail_def= ault"></span><span style=3D"font-family:Arial,Helvetica,sans-serif">U</span= ><span class=3D"gmail_default">TC</span><span style=3D"font-family:Arial,He= lvetica,sans-serif"> Marco Moock &lt;<a href=3D"mailto:mm@dorfdsl.de">mm@do= rfdsl.de</a>&gt; wrote:</span></div></div></div><div class=3D"gmail_quote g= mail_quote_container"><blockquote class=3D"gmail_quote" style=3D"margin:0px=
    0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Am = 21.04.26 um 22:08 schrieb Marco Moock:<br>
    &gt; When I try to start the daemon via the service command. This executes<=

    &gt; the startup script in FreeBSD.<br>

    Another thing I would like to let you know is that I have monit running <br=

    that is configured to start ntpd if it is currently not running. <br>
    Depending on which will be started first and how race conditions are <br> handled, this might be part of the problem.<br></blockquote><div><br></div>= <div class=3D"gmail_default" style=3D"font-family:&quot;trebuchet ms&quot;,= sans-serif">That could easily be the problem.=C2=A0 Is monit configured to = use &quot;service ntpd start&quot;?</div><div class=3D"gmail_default" style= =3D"font-family:&quot;trebuchet ms&quot;,sans-serif"><div style=3D"font-fam= ily:Arial,Helvetica,sans-serif"><br clear=3D"all"></div><div style=3D"font-= family:Arial,Helvetica,sans-serif"><div dir=3D"ltr" class=3D"gmail_signatur= e"><div dir=3D"ltr"><div><font face=3D"tahoma, sans-serif" color=3D"#666666= "><br></font></div><font face=3D"tahoma, sans-serif" color=3D"#666666">Chee= rs,<br>Dave Hart</font></div></div></div><br class=3D"gmail-Apple-interchan= ge-newline"></div><div class=3D"gmail_default" style=3D"font-family:&quot;t= rebuchet ms&quot;,sans-serif"><br></div></div></div>

    --0000000000001c8b4e065010b120--

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Marco Moock@mm@dorfdsl.de to comp.protocols.time.ntp on Wed Apr 22 20:54:05 2026
    From Newsgroup: comp.protocols.time.ntp

    Am 22.04.26 um 20:33 schrieb Dave Hart:
    On Wed, Apr 22, 2026 at 17:47 UTC Marco Moock <mm@dorfdsl.de> wrote:

    Am 21.04.26 um 22:08 schrieb Marco Moock:
    When I try to start the daemon via the service command. This executes
    the startup script in FreeBSD.

    Another thing I would like to let you know is that I have monit running
    that is configured to start ntpd if it is currently not running.
    Depending on which will be started first and how race conditions are
    handled, this might be part of the problem.


    That could easily be the problem. Is monit configured to use "service ntpd start"?

    Yes, as in case the service fails, it should start it again. Is there
    anything wrong with that?

    Does the BSD init system use any parallel mechanisms like systemd?
    --
    Gruß
    Marco
    Muell und Spam bitte an abfalleimer2000@stinkedores.dorfdsl.de
    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Harlan Stenn via questions Mailing List@questions@lists.ntp.org to Marco Moock on Wed Apr 22 22:03:00 2026
    From Newsgroup: comp.protocols.time.ntp

    On 4/22/2026 10:43 AM, Marco Moock wrote:
    Am 21.04.26 um 22:08 schrieb Marco Moock:
    When I try to start the daemon via the service command. This executes
    the startup script in FreeBSD.

    Another thing I would like to let you know is that I have monit running
    that is configured to start ntpd if it is currently not running.
    Depending on which will be started first and how race conditions are handled, this might be part of the problem.

    Have you looked at the 'ntp-wait' script as a means to make sure ntpd is running and the clock is stable before starting a time-dependent subsystem?
    --
    Harlan Stenn <stenn@ntp.org>
    NTP Project Lead. The NTP Project is part of:
    https://www.nwtime.org/ - be a member!

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Harlan Stenn via questions Mailing List@questions@lists.ntp.org to Marco Moock on Wed Apr 22 22:13:00 2026
    From Newsgroup: comp.protocols.time.ntp

    On 4/22/2026 11:54 AM, Marco Moock wrote:
    Am 22.04.26 um 20:33 schrieb Dave Hart:
    On Wed, Apr 22, 2026 at 17:47 UTC Marco Moock <mm@dorfdsl.de> wrote:

    Am 21.04.26 um 22:08 schrieb Marco Moock:
    When I try to start the daemon via the service command. This executes
    the startup script in FreeBSD.

    Another thing I would like to let you know is that I have monit running
    that is configured to start ntpd if it is currently not running.
    Depending on which will be started first and how race conditions are
    handled, this might be part of the problem.


    That could easily be the problem.  Is monit configured to use "service
    ntpd
    start"?

    Yes, as in case the service fails, it should start it again. Is there anything wrong with that?

    There is a potential issue of the restart process assumes a cold-start
    of ntpd, as opposed to a simpler warm restart.

    Does the BSD init system use any parallel mechanisms like systemd?

    --
    Harlan Stenn <stenn@ntp.org>
    NTP Project Lead. The NTP Project is part of:
    https://www.nwtime.org/ - be a member!

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Cy Schubert@Cy.Schubert@cschubert.com to Harlan Stenn on Thu Apr 23 04:13:00 2026
    From Newsgroup: comp.protocols.time.ntp

    In message <862cff25-2b2f-4caf-b2f0-6fa42b73d603@ntp.org>, "Harlan Stenn" write
    s:
    On 4/22/2026 11:54 AM, Marco Moock wrote:
    Am 22.04.26 um 20:33 schrieb Dave Hart:
    On Wed, Apr 22, 2026 at 17:47 UTC Marco Moock <mm@dorfdsl.de> wrote:

    Am 21.04.26 um 22:08 schrieb Marco Moock:
    When I try to start the daemon via the service command. This executes >>>> the startup script in FreeBSD.

    Another thing I would like to let you know is that I have monit running >>> that is configured to start ntpd if it is currently not running.
    Depending on which will be started first and how race conditions are
    handled, this might be part of the problem.


    That could easily be the problem.  Is monit configured to use "service >> ntpd
    start"?

    Yes, as in case the service fails, it should start it again. Is there anything wrong with that?

    There is a potential issue of the restart process assumes a cold-start
    of ntpd, as opposed to a simpler warm restart.

    Does the BSD init system use any parallel mechanisms like systemd?

    No. (I do have a patch in a git branch that implements parallel service
    start but it hasn't been fully tested BTW.)

    It's not init(8) that starts services. It's the /etc/rc script that does.

    P.S. I am new to this ML, hence jumping in here.



    --
    Harlan Stenn <stenn@ntp.org>
    NTP Project Lead. The NTP Project is part of:
    https://www.nwtime.org/ - be a member!
    --
    Cheers,
    Cy Schubert <Cy.Schubert@cschubert.com>
    FreeBSD UNIX: <cy@FreeBSD.org> Web: https://FreeBSD.org
    NTP: <cy@nwtime.org> Web: https://nwtime.org

    e**(i*pi)+1=0


    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Marco Moock@mm@dorfdsl.de to comp.protocols.time.ntp on Thu Apr 23 06:51:54 2026
    From Newsgroup: comp.protocols.time.ntp

    Am 23.04.26 um 00:03 schrieb Harlan Stenn via questions Mailing List:
    On 4/22/2026 10:43 AM, Marco Moock wrote:
    Am 21.04.26 um 22:08 schrieb Marco Moock:
    When I try to start the daemon via the service command. This executes
    the startup script in FreeBSD.

    Another thing I would like to let you know is that I have monit
    running that is configured to start ntpd if it is currently not
    running. Depending on which will be started first and how race
    conditions are handled, this might be part of the problem.

    Have you looked at the 'ntp-wait' script as a means to make sure ntpd is running and the clock is stable before starting a time-dependent subsystem?

    Not yet, but for my understanding such tests belong to the start/restart operations of the service scripts. Maybe the FreeBSD people can give
    more information about this.
    --
    Gruß
    Marco

    Junk-Mail bitte an trashcan@stinkedores.dorfdsl.de
    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Cy Schubert@Cy.Schubert@cschubert.com to Marco Moock on Sat Apr 25 05:28:00 2026
    From Newsgroup: comp.protocols.time.ntp

    In message <10sc8ha$3r263$1@paganini.bofh.team>, Marco Moock writes:
    Am 23.04.26 um 00:03 schrieb Harlan Stenn via questions Mailing List:
    On 4/22/2026 10:43 AM, Marco Moock wrote:
    Am 21.04.26 um 22:08 schrieb Marco Moock:
    When I try to start the daemon via the service command. This executes
    the startup script in FreeBSD.

    Another thing I would like to let you know is that I have monit
    running that is configured to start ntpd if it is currently not
    running. Depending on which will be started first and how race
    conditions are handled, this might be part of the problem.

    Have you looked at the 'ntp-wait' script as a means to make sure ntpd is running and the clock is stable before starting a time-dependent subsystem?

    Not yet, but for my understanding such tests belong to the start/restart operations of the service scripts. Maybe the FreeBSD people can give
    more information about this.

    I'd like to try to get a fuller understanding of the problem.

    Is it correct to understand the problem began after an upgrade from FreeBSD
    14 to FreeBSD 15?

    Was monit also used to start ntpd on FreeBSD 14?

    Is mac_ntpd in use? Was it also used on FreeBSD 14?


    --
    Gruß
    Marco

    Junk-Mail bitte an trashcan@stinkedores.dorfdsl.de
    --
    Cheers,
    Cy Schubert <Cy.Schubert@cschubert.com>
    FreeBSD UNIX: <cy@FreeBSD.org> Web: https://FreeBSD.org
    NTP: <cy@nwtime.org> Web: https://nwtime.org

    e**(i*pi)+1=0


    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Marco Moock@mm@dorfdsl.de to questions on Sat Apr 25 09:38:00 2026
    From Newsgroup: comp.protocols.time.ntp

    Am 25.04.26 um 07:23 schrieb Cy Schubert:
    In message <10sc8ha$3r263$1@paganini.bofh.team>, Marco Moock writes:
    Am 23.04.26 um 00:03 schrieb Harlan Stenn via questions Mailing List:
    On 4/22/2026 10:43 AM, Marco Moock wrote:
    Am 21.04.26 um 22:08 schrieb Marco Moock:
    When I try to start the daemon via the service command. This executes >>>>> the startup script in FreeBSD.

    Another thing I would like to let you know is that I have monit
    running that is configured to start ntpd if it is currently not
    running. Depending on which will be started first and how race
    conditions are handled, this might be part of the problem.

    Have you looked at the 'ntp-wait' script as a means to make sure ntpd is >>> running and the clock is stable before starting a time-dependent subsystem? >>
    Not yet, but for my understanding such tests belong to the start/restart
    operations of the service scripts. Maybe the FreeBSD people can give
    more information about this.

    I'd like to try to get a fuller understanding of the problem.

    Is it correct to understand the problem began after an upgrade from FreeBSD 14 to FreeBSD 15?

    I assume this was just a correlation I noticed. I do not think this is
    the cause. I also only updates from 15 p5 to p6, no 14 involved.

    Was monit also used to start ntpd on FreeBSD 14?

    This reboot was the first after I configured ntpd.
    I assume that both the init system and monit run service ntpd start at
    the same time. I also have issues with sendmail in that case.

    Is my assumption right that the service command does not check if
    another service command ist running at the same time?

    If so, I assume this is the cause of the problem.

    Is mac_ntpd in use? Was it also used on FreeBSD 14?

    security.mac.ntpd.uid: 123
    security.mac.ntpd.enabled: 1

    I haven't changed anything here.
    --
    Gruß
    Marco
    Muell und Spam bitte an abfalleimer2000@stinkedores.dorfdsl.de

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Cy Schubert@Cy.Schubert@cschubert.com to Marco Moock on Mon Apr 27 15:13:00 2026
    From Newsgroup: comp.protocols.time.ntp

    In message <c932db69-7d5c-401e-aea1-83295f3e66ad@dorfdsl.de>, Marco Moock write
    s:
    Am 25.04.26 um 07:23 schrieb Cy Schubert:
    In message <10sc8ha$3r263$1@paganini.bofh.team>, Marco Moock writes:
    Am 23.04.26 um 00:03 schrieb Harlan Stenn via questions Mailing List:
    On 4/22/2026 10:43 AM, Marco Moock wrote:
    Am 21.04.26 um 22:08 schrieb Marco Moock:
    When I try to start the daemon via the service command. This executes >>>>> the startup script in FreeBSD.

    Another thing I would like to let you know is that I have monit
    running that is configured to start ntpd if it is currently not
    running. Depending on which will be started first and how race
    conditions are handled, this might be part of the problem.

    Have you looked at the 'ntp-wait' script as a means to make sure ntpd is >>> running and the clock is stable before starting a time-dependent subsyste m?

    Not yet, but for my understanding such tests belong to the start/restart >> operations of the service scripts. Maybe the FreeBSD people can give
    more information about this.

    I'd like to try to get a fuller understanding of the problem.

    Is it correct to understand the problem began after an upgrade from FreeBSD 14 to FreeBSD 15?

    I assume this was just a correlation I noticed. I do not think this is
    the cause. I also only updates from 15 p5 to p6, no 14 involved.

    Was monit also used to start ntpd on FreeBSD 14?

    This reboot was the first after I configured ntpd.
    I assume that both the init system and monit run service ntpd start at
    the same time. I also have issues with sendmail in that case.

    As sendmail is also similarly affected, this is not an ntp issue. As the services start without monit, there may be a monit issue when run under FreeBSD 15+.

    The issue with ntpd is that it forks a subprocess, with a pipe between both processes. The child process write "R\n" to the pipe. If the parent does
    not read two bytes it exits with an error. Just a guess here that monit
    might have its fingers in the pipe.

    Also as this also affects sendmail under monit it's suggested a FreeBSD PR (bugzilla bug) be opened WRT monit. Let's have the monit maintainer look at
    it first.


    Is my assumption right that the service command does not check if
    another service command ist running at the same time?

    It does (within /etc/rc.subr).


    If so, I assume this is the cause of the problem.

    No, your assumption is incorrect. This smells of a monit issue.


    Is mac_ntpd in use? Was it also used on FreeBSD 14?

    security.mac.ntpd.uid: 123
    security.mac.ntpd.enabled: 1

    I haven't changed anything here.


    --
    Gruß
    Marco
    Muell und Spam bitte an abfalleimer2000@stinkedores.dorfdsl.de
    --
    Cheers,
    Cy Schubert <Cy.Schubert@cschubert.com>
    FreeBSD UNIX: <cy@FreeBSD.org> Web: https://FreeBSD.org
    NTP: <cy@nwtime.org> Web: https://nwtime.org

    e**(i*pi)+1=0


    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Marco Moock@mm@dorfdsl.de to Cy Schubert on Mon Apr 27 16:13:00 2026
    From Newsgroup: comp.protocols.time.ntp

    This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------iWypnzPbZy0DBK77QQMf6PSS
    Content-Type: multipart/mixed; boundary="------------CoRKYgFDUJMg7Np0WxWqCflE";
    protected-headers="v1"
    From: Marco Moock <mm@dorfdsl.de>
    To: Cy Schubert <Cy.Schubert@cschubert.com>
    Cc: questions@lists.ntp.org
    Message-ID: <a1412ba0-5152-4102-b203-a41a35b4bec9@dorfdsl.de>
    Subject: Re: ntpd does not start daemon control: got EOF
    References: <10s8hv2$38nht$1@paganini.bofh.team>
    <10sb1b9$3j4cj$3@paganini.bofh.team>
    <f2767d42-f578-4553-9e8a-d1e2d2c2e151@ntp.org>
    <10s8lfs$1n3e3$16@dont-email.me>
    <8d050e53-2600-4f2d-a504-15780b0d53cb@ntp.org>
    <10sc8ha$3r263$1@paganini.bofh.team>
    <20260425052318.07925C6@slippy.cwsent.com>
    <c932db69-7d5c-401e-aea1-83295f3e66ad@dorfdsl.de>
    <20260427151055.E6833381@slippy.cwsent.com>
    In-Reply-To: <20260427151055.E6833381@slippy.cwsent.com>

    --------------CoRKYgFDUJMg7Np0WxWqCflE
    Content-Type: multipart/mixed; boundary="------------T9AO0GyUt0WVE6cMaZFNIaiW"

    --------------T9AO0GyUt0WVE6cMaZFNIaiW
    Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64

    QW0gMjcuMDQuMjYgdW0gMTc6MTAgc2NocmllYiBDeSBTY2h1YmVydDoNCj4gTm8sIHlvdXIg YXNzdW1wdGlvbiBpcyBpbmNvcnJlY3QuIFRoaXMgc21lbGxzIG9mIGEgbW9uaXQgaXNzdWUu DQoNClRoYW5rcyENCg0KSSB3aWxsIHRyeSB0byBhc2sgdGhlcmUuDQoNCi0tIA0KR3J1w58N Ck1hcmNvDQpNdWVsbCB1bmQgU3BhbSBiaXR0ZSBhbiBhYmZhbGxlaW1lcjIwMDBAc3Rpbmtl ZG9yZXMuZG9yZmRzbC5kZQ0K
    --------------T9AO0GyUt0WVE6cMaZFNIaiW
    Content-Type: application/pgp-keys; name="OpenPGP_0x559E1A331A46B463.asc" Content-Disposition: attachment; filename="OpenPGP_0x559E1A331A46B463.asc" Content-Description: OpenPGP public key
    Content-Transfer-Encoding: quoted-printable

    -----BEGIN PGP PUBLIC KEY BLOCK-----

    xsDNBGnlI3gBDADDY5KSROZxxR7vS37LLqDMm0DyhP+6ou/D79MU+w+44OuNicr3 84mEMVAgPRSoig//mla8oso9fhwcu8G2IqWGzIzE8YKVq40veyJPGeOATMIbsI69 oIKBjYZt7Vnw8g0Z6iQq/9JqYRmHprtm9DPS4PME528f29jCTXOhmd7+RIHnNPiA a8Q7DDILZADRY03ksxDPYmRY543dnDqIEuECamRfaahfJrMSJkmTt4UJEe1ZxCp1 rUdgBbxrOyQyF5gVIdWr06+fyFnxpg6uYfuHl7OzPHYzHoOrNY0U9AEldW4QrNDI OqAJZVjxeWa9u2oxnIUCGMxQ/dHg5tTk+CDl2mXEaCAqOaQ5lcKFsxx7KR/BQfuR QW+Sm6meJmQQLHcWablpafAWSnqrZjz+5qflYj3CiN3vYXjErpjLzPov3gOlfOGD XqkHTXmaenmB1HUybdpKRX0PH0r+LGJlA5U1cfy1IlvB9ZY8C2gGGRE7LQTl228a 1nvCis7+MRQm/pkAEQEAAc0bTWFyY28gTW9vY2sgPG1tQGRvcmZkc2wuZGU+wsEO BBMBCgA4FiEEGHxuJD2s+A3zICvbVZ4aMxpGtGMFAmnlI3gCGwMFCwkIBwIGFQoJ CAsCBBYCAwECHgECF4AACgkQVZ4aMxpGtGOiwQv8D202XflE5ipU1uhx6VyqcZ/I Q5/eiMs+gGbm3GFKSIBpQBy2c+QDRFf7zhB/r3omVB6PHrVJGBU/T1m3BKNmCdnp 1JaczjOybt+MNQGtm5RgWhpk3he7gyp0vnT3Vy8fs2fF+pnnrt4IOnHu6hKWGXIN SUxcZknRI2SFcJuYYbg+EXD/ShyDIPA0qihw74kSY+yoa09D+W6qxrSf0+dgUUWo bPwhIrPG6ypFqu5rcy/ByvifRH4vz2+C7iWF4Rtt1U+74CqiEspF/b9B6zzg3Psd EaiuRBI4S6bJXZiMLH1cUFY4sGjSW8Qbt5/hZB9NiToW3VoYlBHohdCPRI4haEJT yZ5n7irXozO6Z/3Ikq+7jDS5I4c5v1PqFgorqiRbbh2yMKi7F2WfJcjKb2JNz7wv LAKmfqH1JO0TmmzdzCidXUOJd3zti5PyTrRrZHNWK1aAG72mhug67zTgr81zW0ph F9diJYbQVBCe27TVssm9gN3eNGrZIBQkHfI/wNaBzsDNBGnlI3gBDADjXrGqJttd 4WsQ/iiZcUA+2Qh5HMJuLSuIjBTkv/sZX5kUwWhDbXFW28TlNwEk5ogtByLOq4km gsygZU0nk1DfpDKwyumc1n6+ReBpYNTkWUfxF3unpMuO4BE+sfEFlCJe6fjC2yTz wrC/Ls+EjkbvRzHiCfJrddQx/iKEBWCJVlWuwB4iEvO0EZh9eYPulx+p0iJRRGdR H3RBIJyQXK8sEFsfMTzOCXHwVfjkVmBcCZHviGaG5Urn7f7aHfpfxV9mN8Idxa1E ksgi/9aCuTHFQwfeyrTsNVfp1MUKG/H85/uRieXc5MnF8i7f7luBSJCnZcqTjN0q /jLD6GJyMbnoKA71pzAlEC0EaK9MIZgSz7m4nh/JCBXPL6+tbc26lD6HDNLqMCfD 2uvbpdkY/gjOo661W9fIZ+V33N+veH0ckCI8SByiJRSOotYK2rBFlfnhJzucC0yQ vNxtcxlnrPvb5mt5cUMlxI1xWO4aQ+pHmZALLItna0ODS6jujxZZNkkAEQEAAcLA 9gQYAQoAIBYhBBh8biQ9rPgN8yAr21WeGjMaRrRjBQJp5SN4AhsMAAoJEFWeGjMa RrRjNUQMAKivzYaSLxYCB/IVLZpexHssAN0IBOwuEFkfMfmzSRNPLakMA0PhzJvy 0HkNVT9l+7X4Uu3X+5KkPdLKPs0Z8h8h18vxKUCkknEUY3dT5EVeNAgSshxjxmCA VvQvHdW6ZBxYNJoHQrU1xpkrEHwNP6I/VqH+C6aSncXq8TU3LeBT9l58douj6Jkn XaiEblQj9SUWtYWVVK4/+PqOpWrbE1kBfwkMGlFHpRQzIsAkIGqnUes/RoM1Esze YNjvKAuNaw5ghUDwgQbd8MIIoi0S82kpvflJSLzQKziNuzyunAUeJeFW9PQ2BzOf 4gK9G3+pqkpLQ2OdwDL/TAqlzElWX7O2hW0X+L2+6dPOYGeyHTsU2eYMeB2q6VQp JEas3ebWHRANt31wA2mvSQKbYJJYofxThfCMUcKD0CUHduEXwdahB7VyPDCIU7kw mN2JG5n4foywEym/i942UyTQu30MtPpuhwBhpka5jG6wiFfpQAdwsb0QF0Gpzcet MCwzZXR/AA=3D=3D
    =3DEvzF
    -----END PGP PUBLIC KEY BLOCK-----

    --------------T9AO0GyUt0WVE6cMaZFNIaiW--

    --------------CoRKYgFDUJMg7Np0WxWqCflE--

    --------------iWypnzPbZy0DBK77QQMf6PSS
    Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature
    Content-Disposition: attachment; filename="OpenPGP_signature.asc"

    -----BEGIN PGP SIGNATURE-----

    wsD5BAABCAAjFiEEGHxuJD2s+A3zICvbVZ4aMxpGtGMFAmnvfRoFAwAAAAAACgkQVZ4aMxpGtGNj vAv/fIk21yZCck3jMmwb+aDJe+DKITXWUA5yoD5gm5x24KTrvFwiW2hO+r5D4hbeAM1H/0LKcNgT 1U7qpz+3RycyDHhiBs4trxHAR5QUUH0777MmQfptINDwy1wlcu74tOl/8ndbN1Y4+gIalNh6PNad uvFflOERW2r0xp0SofM/fBRhFAt7Cbwhh/Ws/ugcC+WG2wHE04vx6cP1Ql1URUD6H8eGlGQgS3HL GD3Rm8sFs8BHhLEvyJbn2XYnbTfLrHUWjnlq6kfdBBSjvaIw915Zc39jboFRdD9MinYZxwEHtoYn 1VjWJb+H1LV4cRBpeF8DuQJl+iH9EPwwwSD+xbfzpErCP8YRop3bAwkYcnhNqTfarGxkeXjboBZL 3ES5OwQHN/GmZE0FM6o9wrhaqc04RO6DQMEmZWuMsl7ROoP8k2nRKHuBgLkgSf0M6Wtif/eEUqoj LWRFe73m/noHCqlwh0its/BpkaCPrftvWC3URDEdGcUtPUnZ+4eDA816o8Lj
    =skxU
    -----END PGP SIGNATURE-----

    --------------iWypnzPbZy0DBK77QQMf6PSS--

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Dave Hart@davehart@gmail.com to Cy Schubert on Mon Apr 27 19:43:00 2026
    From Newsgroup: comp.protocols.time.ntp

    --0000000000009ce1f506507643e2
    Content-Type: text/plain; charset="UTF-8"
    Content-Transfer-Encoding: quoted-printable

    On Mon, Apr 27, 2026 at 14:11=E2=80=AFUTC Cy Schubert wrote:

    The issue with ntpd is that it forks a subprocess, with a pipe between
    both
    processes. The child process write "R\n" to the pipe. If the parent does
    not read two bytes it exits with an error. Just a guess here that monit
    might have its fingers in the pipe.


    ntpd does have --nofork/-n to avoid forking to daemonize. I have not
    tested, but intuitively it seems like a better solution for FreeBSD's rc.d script.

    --0000000000009ce1f506507643e2
    Content-Type: text/html; charset="UTF-8"
    Content-Transfer-Encoding: quoted-printable

    <div dir=3D"ltr"><div dir=3D"ltr"><div>On Mon, Apr 27, 2026 at <span class= =3D"gmail_default" style=3D"font-family:&quot;trebuchet ms&quot;,sans-serif= ">14</span>:11=E2=80=AF<span class=3D"gmail_default" style=3D"font-family:&= quot;trebuchet ms&quot;,sans-serif"></span>U<span class=3D"gmail_default" s= tyle=3D"font-family:&quot;trebuchet ms&quot;,sans-serif">TC</span> Cy Schub= ert wrote:</div></div><div class=3D"gmail_quote gmail_quote_container"><blo= ckquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left= :1px solid rgb(204,204,204);padding-left:1ex">The issue with ntpd is that i=
    t forks a subprocess, with a pipe between both <br>
    processes. The child process write &quot;R\n&quot; to the pipe. If the pare=
    nt does <br>
    not read two bytes it exits with an error. Just a guess here that monit <br=

    might have its fingers in the pipe.<br></blockquote><div>=C2=A0</div><div><= div class=3D"gmail_default" style=3D"font-family:&quot;trebuchet ms&quot;,s= ans-serif">ntpd does have --nofork/-n to avoid forking to daemonize.=C2=A0 =
    I have not tested, but intuitively it seems like a better solution for Free= BSD&#39;s rc.d script.</div><br></div></div></div>

    --0000000000009ce1f506507643e2--

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Cy Schubert@Cy.Schubert@cschubert.com to Dave Hart on Mon Apr 27 20:03:00 2026
    From Newsgroup: comp.protocols.time.ntp

    In message <CAMbSiYD=phHqGb=DjmYoZmYOjXWvv1r+TLex=ZjiyZHfaPYBAA@mail.gmail.c

    , Dave Hart writes:

    On Mon, Apr 27, 2026 at 14:11=E2=80=AFUTC Cy Schubert wrote:

    The issue with ntpd is that it forks a subprocess, with a pipe between
    both
    processes. The child process write "R\n" to the pipe. If the parent does not read two bytes it exits with an error. Just a guess here that monit might have its fingers in the pipe.


    ntpd does have --nofork/-n to avoid forking to daemonize. I have not
    tested, but intuitively it seems like a better solution for FreeBSD's rc.d script.


    I suppose users of monit could use that. rcng uses the .pid file to manage services. I don't see any benefit of changing the FreeBSD rc file to
    support an esoteric process monitoring application. Applications should conform to and work within the O/S, not the other way around. Though not
    posix pidfiles are a common UNIX-like management tool.
    --
    Cheers,
    Cy Schubert <Cy.Schubert@cschubert.com>
    FreeBSD UNIX: <cy@FreeBSD.org> Web: https://FreeBSD.org
    NTP: <cy@nwtime.org> Web: https://nwtime.org

    e**(i*pi)+1=0


    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Ralph Blach@chip.from.nc@gmail.com to questions on Mon Apr 27 20:08:00 2026
    From Newsgroup: comp.protocols.time.ntp

    --00000000000093df9a065076a02a
    Content-Type: text/plain; charset="UTF-8"
    Content-Transfer-Encoding: quoted-printable

    I used the nofork option on Linux ARM quite successfully, and it works as advertised.

    Chip

    On Mon, Apr 27, 2026 at 3:39=E2=80=AFPM Dave Hart <davehart@gmail.com> wrot=
    e:

    On Mon, Apr 27, 2026 at 14:11=E2=80=AFUTC Cy Schubert wrote:

    The issue with ntpd is that it forks a subprocess, with a pipe between
    both
    processes. The child process write "R\n" to the pipe. If the parent does
    not read two bytes it exits with an error. Just a guess here that monit
    might have its fingers in the pipe.


    ntpd does have --nofork/-n to avoid forking to daemonize. I have not
    tested, but intuitively it seems like a better solution for FreeBSD's rc.=
    d
    script.



    --=20
    Ralph "Chip" Blach
    (919) 260-0097

    --00000000000093df9a065076a02a
    Content-Type: text/html; charset="UTF-8"
    Content-Transfer-Encoding: quoted-printable

    <div dir=3D"ltr">I used the nofork option on Linux ARM quite successfully, = and it works as advertised.<div><br></div><div>Chip</div></div><br><div cla= ss=3D"gmail_quote gmail_quote_container"><div dir=3D"ltr" class=3D"gmail_at= tr">On Mon, Apr 27, 2026 at 3:39=E2=80=AFPM Dave Hart &lt;<a href=3D"mailto= :davehart@gmail.com">davehart@gmail.com</a>&gt; wrote:<br></div><blockquote=
    class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px so= lid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div dir=3D"ltr"><d= iv>On Mon, Apr 27, 2026 at <span class=3D"gmail_default" style=3D"font-fami= ly:&quot;trebuchet ms&quot;,sans-serif">14</span>:11=E2=80=AF<span class=3D= "gmail_default" style=3D"font-family:&quot;trebuchet ms&quot;,sans-serif"><= /span>U<span class=3D"gmail_default" style=3D"font-family:&quot;trebuchet m= s&quot;,sans-serif">TC</span> Cy Schubert wrote:</div></div><div class=3D"g= mail_quote"><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0= .8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The issue wit=
    h ntpd is that it forks a subprocess, with a pipe between both <br>
    processes. The child process write &quot;R\n&quot; to the pipe. If the pare=
    nt does <br>
    not read two bytes it exits with an error. Just a guess here that monit <br=

    might have its fingers in the pipe.<br></blockquote><div>=C2=A0</div><div><= div class=3D"gmail_default" style=3D"font-family:&quot;trebuchet ms&quot;,s= ans-serif">ntpd does have --nofork/-n to avoid forking to daemonize.=C2=A0 =
    I have not tested, but intuitively it seems like a better solution for Free= BSD&#39;s rc.d script.</div><br></div></div></div>
    </blockquote></div><div><br clear=3D"all"></div><div><br></div><span class= =3D"gmail_signature_prefix">-- </span><br><div dir=3D"ltr" class=3D"gmail_s= ignature">Ralph &quot;Chip&quot; Blach<br>(919) 260-0097<br><br><br><br></d=


    --00000000000093df9a065076a02a--

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Harlan Stenn via questions Mailing List@questions@lists.ntp.org to Cy Schubert on Mon Apr 27 21:38:00 2026
    From Newsgroup: comp.protocols.time.ntp

    On 4/27/2026 12:59 PM, Cy Schubert wrote:
    In message <CAMbSiYD=phHqGb=DjmYoZmYOjXWvv1r+TLex=ZjiyZHfaPYBAA@mail.gmail.c

    , Dave Hart writes:

    On Mon, Apr 27, 2026 at 14:11=E2=80=AFUTC Cy Schubert wrote:

    The issue with ntpd is that it forks a subprocess, with a pipe between
    both
    processes. The child process write "R\n" to the pipe. If the parent does >>> not read two bytes it exits with an error. Just a guess here that monit
    might have its fingers in the pipe.


    ntpd does have --nofork/-n to avoid forking to daemonize. I have not
    tested, but intuitively it seems like a better solution for FreeBSD's rc.d >> script.


    I suppose users of monit could use that. rcng uses the .pid file to manage services. I don't see any benefit of changing the FreeBSD rc file to
    support an esoteric process monitoring application. Applications should conform to and work within the O/S, not the other way around. Though not posix pidfiles are a common UNIX-like management tool.

    We believe we provide a robust mechanism for ntpd startup. If there is missing functionality here, please open a bug report.

    There are a staggering number of systems out there that use a myriad of different startup schemes. Any given system can undergo spontaneous
    changes in its startup framework.

    It seems unreasonable to me to expect *any* application project
    (including NTP) to conform to an OS.

    But it *is* perfectly reasonable to expect an application project to
    offer command-line and configuration options that are sufficiently
    robust to allow an arbitrary OS to reliably start/stop the application.

    Are we agreed on this?
    --
    Harlan Stenn <stenn@ntp.org>
    NTP Project Lead. The NTP Project is part of:
    https://www.nwtime.org/ - be a member!

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Cy Schubert@Cy.Schubert@cschubert.com to Harlan Stenn on Mon Apr 27 23:38:00 2026
    From Newsgroup: comp.protocols.time.ntp

    In message <c125bd87-a762-4468-b214-5ead5147b82c@ntp.org>, "Harlan Stenn" write
    s:
    On 4/27/2026 12:59 PM, Cy Schubert wrote:
    In message <CAMbSiYD=phHqGb=DjmYoZmYOjXWvv1r+TLex=ZjiyZHfaPYBAA@mail.gmail.
    c

    , Dave Hart writes:

    On Mon, Apr 27, 2026 at 14:11=E2=80=AFUTC Cy Schubert wrote:

    The issue with ntpd is that it forks a subprocess, with a pipe between >>> both
    processes. The child process write "R\n" to the pipe. If the parent does >>> not read two bytes it exits with an error. Just a guess here that monit >>> might have its fingers in the pipe.


    ntpd does have --nofork/-n to avoid forking to daemonize. I have not
    tested, but intuitively it seems like a better solution for FreeBSD's rc.d >> script.


    I suppose users of monit could use that. rcng uses the .pid file to manage services. I don't see any benefit of changing the FreeBSD rc file to support an esoteric process monitoring application. Applications should conform to and work within the O/S, not the other way around. Though not posix pidfiles are a common UNIX-like management tool.

    We believe we provide a robust mechanism for ntpd startup. If there is missing functionality here, please open a bug report.

    There are a staggering number of systems out there that use a myriad of different startup schemes. Any given system can undergo spontaneous
    changes in its startup framework.

    It seems unreasonable to me to expect *any* application project
    (including NTP) to conform to an OS.

    But it *is* perfectly reasonable to expect an application project to
    offer command-line and configuration options that are sufficiently
    robust to allow an arbitrary OS to reliably start/stop the application.

    Are we agreed on this?

    In this regard ntp (and sendmail) are working correctly. The issue only
    occurs when run under monit. Monit might be inserting itself between the parent and the child in order to cause the parent not to read "R\n" on the pipe.

    I have confirmed, in a jail on a 16-CURRENT system, that the problem only occurs under monit. This is why I suggested the O/P open a bugzilla bug for the problem. It's one of the following:

    - a monit bug, or
    - a bug uncovered by monit in the FreeBSD kernel or libc.

    What ntpd is doing by opening a pipe so the child can notify the parent it
    can terminate itself looks reasonable.



    --
    Harlan Stenn <stenn@ntp.org>
    NTP Project Lead. The NTP Project is part of:
    https://www.nwtime.org/ - be a member!
    --
    Cheers,
    Cy Schubert <Cy.Schubert@cschubert.com>
    FreeBSD UNIX: <cy@FreeBSD.org> Web: https://FreeBSD.org
    NTP: <cy@nwtime.org> Web: https://nwtime.org

    e**(i*pi)+1=0


    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Harlan Stenn via questions Mailing List@questions@lists.ntp.org to Cy Schubert on Tue Apr 28 00:08:00 2026
    From Newsgroup: comp.protocols.time.ntp

    On 4/27/2026 4:33 PM, Cy Schubert wrote:
    In message <c125bd87-a762-4468-b214-5ead5147b82c@ntp.org>, "Harlan Stenn" write
    s:
    On 4/27/2026 12:59 PM, Cy Schubert wrote:
    In message <CAMbSiYD=phHqGb=DjmYoZmYOjXWvv1r+TLex=ZjiyZHfaPYBAA@mail.gmail. >> c

    , Dave Hart writes:

    On Mon, Apr 27, 2026 at 14:11=E2=80=AFUTC Cy Schubert wrote:

    The issue with ntpd is that it forks a subprocess, with a pipe between >>>>> both
    processes. The child process write "R\n" to the pipe. If the parent does >>>>> not read two bytes it exits with an error. Just a guess here that monit >>>>> might have its fingers in the pipe.


    ntpd does have --nofork/-n to avoid forking to daemonize. I have not
    tested, but intuitively it seems like a better solution for FreeBSD's rc.d >>>> script.


    I suppose users of monit could use that. rcng uses the .pid file to manage >>> services. I don't see any benefit of changing the FreeBSD rc file to
    support an esoteric process monitoring application. Applications should
    conform to and work within the O/S, not the other way around. Though not >>> posix pidfiles are a common UNIX-like management tool.

    We believe we provide a robust mechanism for ntpd startup. If there is
    missing functionality here, please open a bug report.

    There are a staggering number of systems out there that use a myriad of
    different startup schemes. Any given system can undergo spontaneous
    changes in its startup framework.

    It seems unreasonable to me to expect *any* application project
    (including NTP) to conform to an OS.

    But it *is* perfectly reasonable to expect an application project to
    offer command-line and configuration options that are sufficiently
    robust to allow an arbitrary OS to reliably start/stop the application.

    Are we agreed on this?

    In this regard ntp (and sendmail) are working correctly. The issue only occurs when run under monit. Monit might be inserting itself between the parent and the child in order to cause the parent not to read "R\n" on the pipe.

    Cool, thanks!

    I have confirmed, in a jail on a 16-CURRENT system, that the problem only occurs under monit. This is why I suggested the O/P open a bugzilla bug for the problem. It's one of the following:

    - a monit bug, or
    - a bug uncovered by monit in the FreeBSD kernel or libc.

    What ntpd is doing by opening a pipe so the child can notify the parent it can terminate itself looks reasonable.



    --
    Harlan Stenn <stenn@ntp.org>
    NTP Project Lead. The NTP Project is part of:
    https://www.nwtime.org/ - be a member!


    --
    Harlan Stenn <stenn@ntp.org>
    NTP Project Lead. The NTP Project is part of:
    https://www.nwtime.org/ - be a member!

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Cy Schubert@Cy.Schubert@cschubert.com to Harlan Stenn on Tue Apr 28 04:33:00 2026
    From Newsgroup: comp.protocols.time.ntp

    In message <d3493e70-2276-4c63-a4a4-7de5e6518cc0@ntp.org>, "Harlan Stenn" write
    s:
    On 4/27/2026 4:33 PM, Cy Schubert wrote:
    In message <c125bd87-a762-4468-b214-5ead5147b82c@ntp.org>, "Harlan Stenn" write
    s:
    On 4/27/2026 12:59 PM, Cy Schubert wrote:
    In message <CAMbSiYD=phHqGb=DjmYoZmYOjXWvv1r+TLex=ZjiyZHfaPYBAA@mail.gmai l.
    c

    , Dave Hart writes:

    On Mon, Apr 27, 2026 at 14:11=E2=80=AFUTC Cy Schubert wrote:

    The issue with ntpd is that it forks a subprocess, with a pipe between >>>>> both
    processes. The child process write "R\n" to the pipe. If the parent doe s
    not read two bytes it exits with an error. Just a guess here that monit >>>>> might have its fingers in the pipe.


    ntpd does have --nofork/-n to avoid forking to daemonize. I have not >>>> tested, but intuitively it seems like a better solution for FreeBSD's rc .d
    script.


    I suppose users of monit could use that. rcng uses the .pid file to manag e
    services. I don't see any benefit of changing the FreeBSD rc file to
    support an esoteric process monitoring application. Applications should >>> conform to and work within the O/S, not the other way around. Though not >>> posix pidfiles are a common UNIX-like management tool.

    We believe we provide a robust mechanism for ntpd startup. If there is
    missing functionality here, please open a bug report.

    There are a staggering number of systems out there that use a myriad of
    different startup schemes. Any given system can undergo spontaneous
    changes in its startup framework.

    It seems unreasonable to me to expect *any* application project
    (including NTP) to conform to an OS.

    But it *is* perfectly reasonable to expect an application project to
    offer command-line and configuration options that are sufficiently
    robust to allow an arbitrary OS to reliably start/stop the application.

    Are we agreed on this?

    In this regard ntp (and sendmail) are working correctly. The issue only occurs when run under monit. Monit might be inserting itself between the parent and the child in order to cause the parent not to read "R\n" on the pipe.

    Cool, thanks!

    I have confirmed, in a jail on a 16-CURRENT system, that the problem only occurs under monit. This is why I suggested the O/P open a bugzilla bug for the problem. It's one of the following:

    - a monit bug, or
    - a bug uncovered by monit in the FreeBSD kernel or libc.

    What ntpd is doing by opening a pipe so the child can notify the parent it can terminate itself looks reasonable.



    --
    Harlan Stenn <stenn@ntp.org>
    NTP Project Lead. The NTP Project is part of:
    https://www.nwtime.org/ - be a member!



    --
    Harlan Stenn <stenn@ntp.org>
    NTP Project Lead. The NTP Project is part of:
    https://www.nwtime.org/ - be a member!

    I'll try to nail this down this week. Just to rule out whether the child is terminating the following DTrace probes will, hopefully, point me in a direction to better understand this.

    diff --git a/contrib/ntp/ntpd/ntpd.c b/contrib/ntp/ntpd/ntpd.c
    index b64caae06da1..6095e2144925 100644
    --- a/contrib/ntp/ntpd/ntpd.c
    +++ b/contrib/ntp/ntpd/ntpd.c
    @@ -134,6 +134,9 @@
    # include <sys/resource.h>
    # include <seccomp.h>
    #endif /* LIBSECCOMP and KERN_SECCOMP */
    +#if defined(__FreeBSD__)
    +#include <sys.sdt.h>
    +#endif

    #if defined(__FreeBSD__) && __FreeBSD_version < 1400037 && defined(HAVE_SYS_PROCCTL_H)
    # include <sys/procctl.h>
    @@ -1444,7 +1447,15 @@ int scmp_sc[] = {
    if (daemon_pipe[1] != -1 && 0 == wait_sync) {
    if (2 != write(daemon_pipe[1], "R\n", 2)) {
    msyslog(LOG_ERR, "daemon failed to notify parent ntpd after init");
    +#if defined(__FreeBSD__)
    + DTRACE_PROBE(ntpd, child_notify_parent_fail)
    +#endif
    }
    +#if defined(__FreeBSD__)
    + else {
    + DTRACE_PROBE(ntpd, child_notify_success)
    + }
    +#endif
    close(daemon_pipe[1]);
    daemon_pipe[1] = -1;
    }
    @@ -1694,16 +1705,25 @@ wait_child_sync_if(
    if (rc == 0) {
    /* DPRINTF is useless here as -d/-D disable forking */
    fprintf(stderr, "daemon control: got EOF\n");
    +#if defined(__FreeBSD__)
    + DTRACE_PROBE(ntpd, parent_got_eof)
    +#endif
    return -1; /* unexpected EOF, check daemon */
    } else if (rc == 1) {
    if ( ('S' == ch && wait_sync > 0)
    || ('R' == ch && 0 == wait_sync)) {
    +#if defined(__FreeBSD__)
    + DTRACE_PROBE(ntpd, parent_got_char)
    +#endif
    return 0;
    }
    } else {
    mfprintf(stderr, "%s: daemon control: read 1 char failed: %m\n",
    progname);
    msyslog(LOG_ERR, "daemon control: read 1 char failed: %m");
    +#if defined(__FreeBSD__)
    + DTRACE_PROBE(ntpd, parent_pipe_read_fail)
    +#endif
    return EX_IOERR;
    }
    } while (wait_rem > 0);
    --
    Cheers,
    Cy Schubert <Cy.Schubert@cschubert.com>
    FreeBSD UNIX: <cy@FreeBSD.org> Web: https://FreeBSD.org
    NTP: <cy@nwtime.org> Web: https://nwtime.org

    e**(i*pi)+1=0


    --- Synchronet 3.21f-Linux NewsLink 1.2