Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Sep 2019 09:12:51 +0300
From:      Vladimir Zakharov <zakharov.vv@gmail.com>
To:        freebsd-current@freebsd.org
Subject:   ntpd segfaults on start
Message-ID:  <20190905061251.rrip6635ebbfimsv@vzakharov>

next in thread | raw e-mail | index | archive | help

--lpjeugckslqkz764
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline

Hello!

Accidentally it turned out that the ntpd does not start on boot.
Logs show that it core dumps:
2019-09-05T08:38:43.588563+03:00 vzakharov ntpd 34934 - - ntpd 4.2.8p12-a (1): Starting
2019-09-05T08:38:43.588717+03:00 vzakharov kernel - - - Security policy loaded: MAC/ntpd (mac_ntpd)
2019-09-05T08:38:43.718356+03:00 vzakharov kernel - - - pid 35074 (ntpd), jid 0, uid 123: exited on signal 11

Not sure how long does it happen. ktrace and gdb points to `setrlimit`
call. Clean rebuild has no effect. Does anyone have any idea what the
problem could be?

root@vzakharov:~ # uname -a
FreeBSD vzakharov 13.0-CURRENT FreeBSD 13.0-CURRENT r351834 GENERIC-NODEBUG  amd64
root@vzakharov:~ # ktrace -i sudo -u ntpd `which ntpd`
root@vzakharov:~ # kdump | tail -n 20
 29735 ntpd     CALL  dup2(0,0x2)
 29735 ntpd     RET   dup2 2
 29735 ntpd     CALL  socket(PF_LOCAL,0x10000002<SOCK_DGRAM|SOCK_CLOEXEC>,0)
 29735 ntpd     RET   socket 3
 29735 ntpd     CALL  connect(0x3,0x7fffff924f98,0x6a)
 29735 ntpd     STRU  struct sockaddr { AF_LOCAL, /var/run/logpriv }
 29735 ntpd     NAMI  "/var/run/logpriv"
 29735 ntpd     RET   connect -1 errno 13 Permission denied
 29735 ntpd     CALL  connect(0x3,0x7fffff924f98,0x6a)
 29735 ntpd     STRU  struct sockaddr { AF_LOCAL, /var/run/log }
 29735 ntpd     NAMI  "/var/run/log"
 29735 ntpd     RET   connect 0
 29735 ntpd     CALL  setsid
 29735 ntpd     RET   setsid 29735/0x7427
 29735 ntpd     CALL  getrlimit(RLIMIT_STACK,0x7fffff9250a0)
 29735 ntpd     RET   getrlimit 0
 29735 ntpd     CALL  setrlimit(RLIMIT_STACK,0x7fffff9250a0)
 29735 ntpd     RET   setrlimit 0
 29735 ntpd     PSIG  SIGSEGV SIG_DFL code=SEGV_ACCERR
 29735 ntpd     NAMI  "ntpd.core"
root@vzakharov:~ # ntpd
root@vzakharov:~ # gdb -c ntpd.core `which ntpd`
GNU gdb (GDB) 8.3 [GDB v8.3 for FreeBSD]
[...]
Reading symbols from /usr/sbin/ntpd...
Reading symbols from /usr/lib/debug//usr/sbin/ntpd.debug...
[New LWP 100946]
Core was generated by `ntpd'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  setrlimit () at setrlimit.S:4
4       RSYSCALL(setrlimit)
(gdb) bt
#0  setrlimit () at setrlimit.S:4
Backtrace stopped: Cannot access memory at address 0x7fffff3ce7c8
(gdb) quit
# cat /etc/src.conf
WITHOUT_ACCT=
WITHOUT_AMD=
WITHOUT_APM=
WITHOUT_ATM=
WITHOUT_AUTHPF=
WITHOUT_BLACKLIST=
WITHOUT_BLUETOOTH=
WITHOUT_BOOTPARAMD=
WITHOUT_BOOTPD=
WITHOUT_BSNMP=
WITHOUT_CCD=
WITHOUT_CROSS_COMPILER=
WITHOUT_CUSE=
WITHOUT_CXGBETOOL=
# WITHOUT_DEBUG_FILES=
WITHOUT_EE=
WITHOUT_FDT=
WITHOUT_FINGER=
WITHOUT_FLOPPY=
WITHOUT_FREEBSD_UPDATE=
WITHOUT_FTP=
WITHOUT_GDB=
WITHOUT_GNU_DIFF=
WITHOUT_GNU_GREP=
WITHOUT_GNU_GREP_COMPAT=
WITHOUT_GPIO=
WITHOUT_HAST=
WITHOUT_HTML=
WITHOUT_HYPERV=
WITHOUT_IPFILTER=
WITHOUT_ISCSI=
WITHOUT_KVM=
WITHOUT_LEGACY_CONSOLE=
WITHOUT_LIB32=
WITHOUT_LLVM_TARGET_ALL=
WITHOUT_LPR=
WITHOUT_MLX5TOOL=
WITHOUT_NDIS=
WITHOUT_NVME=
WITHOUT_PC_SYSINSTALL=
WITHOUT_PF=
WITHOUT_PMC=
WITHOUT_PPP=
WITHOUT_QUOTAS=
WITHOUT_RADIUS_SUPPORT=
WITHOUT_RBOOTD=
WITHOUT_SHAREDOCS=
WITHOUT_TALK=
WITHOUT_TELNET=
WITHOUT_TESTS=
WITHOUT_TFTP=
WITHOUT_TIMED=

WITH_BSD_GREP=
WITH_CCACHE_BUILD=
# WITH_CLANG_EXTRAS=
# WITH_CTF=
# WITH_RATELIMIT=
WITH_SORT_THREADS=
WITH_SVN=

BOOTSTRAP_ALL_TOOLS=

--
Regards,                 | "In theory there is no difference between theory
  Vladimir Zakharov      | and practice. In practice there is."- Yogi Berra

--lpjeugckslqkz764
Content-Type: application/pgp-signature; name="signature.asc"

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

iQEzBAABCAAdFiEEGigXAiE0PbwWpysjipH2KCLzK4cFAl1wp2MACgkQipH2KCLz
K4fuYwgAsfbRsJoLm64d2TDx1k1wbWhlsBVoEg2hp3/vlDga4kdwF0bt9dyVLEfd
AiSx/dM2E2kzso2RAv5pybPskY4JCq7Up0R0ZPniHrh7Eq798UVtgEdxUz2Usx8G
g4g3gvPCXtAZ6sN4l4i7Zj9TqVXeNjSR84d0F+7f5vs0G2FgVTffDAvkF+ba+YdR
58JBf7sllLtpTCclUIP6C/lhGWKN4uBpn8mUkPav4QG8vqwNMbbZRDIOXAB4dwhp
25nuxrsUA3jRE8i95Y/Na8indm1TFqnEKpdH+cPpVmkNCUDGVcHkgShF1preGhkN
10aAh42e1foU/gArfeA1b+n8eeOSiQ==
=sxCs
-----END PGP SIGNATURE-----

--lpjeugckslqkz764--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190905061251.rrip6635ebbfimsv>