From owner-freebsd-current@freebsd.org Fri Sep 6 06:39:29 2019 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4D671EA766 for ; Fri, 6 Sep 2019 06:39:29 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 46PnwH3m2hz3xDs for ; Fri, 6 Sep 2019 06:39:27 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id 67txiBoOPIhW967tyis6Hp; Fri, 06 Sep 2019 00:39:24 -0600 X-Authority-Analysis: v=2.3 cv=FcFJO626 c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=J70Eh1EUuV4A:10 a=VxmjJ2MpAAAA:8 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=XRXNMI3TRygy5gFsLD8A:9 a=CjuIK1q_8ugA:10 a=i59JxQ1kvaAA:10 a=7gXAzLPJhVmCkEl4_tsf:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id D1CC4633; Thu, 5 Sep 2019 23:39:20 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id x866dKoA090179; Thu, 5 Sep 2019 23:39:20 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id x866dJ7f090176; Thu, 5 Sep 2019 23:39:20 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201909060639.x866dJ7f090176@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Vladimir Zakharov cc: Cy Schubert , Konstantin Belousov , freebsd-current@freebsd.org, Harlan Stenn Subject: Re: ntpd segfaults on start In-reply-to: <201909060355.x863tRhP089169@slippy.cwsent.com> References: <20190905061251.rrip6635ebbfimsv@vzakharov> <20190905063354.qxecqjkafikdtdyq@vzakharov> <201909051307.x85D7MGs034053@slippy.cwsent.com> <20190905142817.GB2559@kib.kiev.ua> <201909060355.x863tRhP089169@slippy.cwsent.com> Comments: In-reply-to Cy Schubert message dated "Thu, 05 Sep 2019 20:55:27 -0700." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 05 Sep 2019 23:39:19 -0700 X-CMAE-Envelope: MS4wfGeLdAxDdajAC/Wsa36txM/QGF4dbKijDj0mO8UGCi6dw9m0xV+zy0K3QhHfWlwQ8Y5jNtPNSAwXNDSL6n8746U2TkjgMyJMQwIlK2w6gntfJoU03j+m mWYyOZvGjlgs77Hjjh8m/TAzmMmT773QCG0/x/K5rptDpKzKKgT7OuXSYqT8rHDQ+G3I58RVWCQLvdKw5lpziUfk5Mz+beIvXvHwYtzarye9bI7jBD1iuprB X-Rspamd-Queue-Id: 46PnwH3m2hz3xDs X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 64.59.136.137) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [-4.88 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; HAS_XAW(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_HAM_SHORT(-0.99)[-0.986,0]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; RCVD_TLS_LAST(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; RCVD_COUNT_FIVE(0.00)[5]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[137.136.59.64.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; IP_SCORE(-2.29)[ip: (-5.86), ipnet: 64.59.128.0/20(-3.10), asn: 6327(-2.41), country: CA(-0.09)] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2019 06:39:29 -0000 In message <201909060355.x863tRhP089169@slippy.cwsent.com>, Cy Schubert writes: > In message <20190905142817.GB2559@kib.kiev.ua>, Konstantin Belousov writes: > > On Thu, Sep 05, 2019 at 06:07:22AM -0700, Cy Schubert wrote: > > > In message <20190905063354.qxecqjkafikdtdyq@vzakharov>, Vladimir Zakharov > > > > write > > > s: > > > > > > > > --ply3axd74k44nuk3 > > > > Content-Type: text/plain; charset=utf-8 > > > > Content-Disposition: inline > > > > Content-Transfer-Encoding: quoted-printable > > > > > > > > On Thu, Sep 05, 2019, Vladimir Zakharov wrote: > > > > > Hello! > > > > >=20 > > > > > 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.8p > 12 > > -a= > > > > (1): Starting > > > > > 2019-09-05T08:38:43.588717+03:00 vzakharov kernel - - - Security poli > cy > > l= > > > > oaded: MAC/ntpd (mac_ntpd) > > > > > 2019-09-05T08:38:43.718356+03:00 vzakharov kernel - - - pid 35074 (nt > pd > > ),= > > > > jid 0, uid 123: exited on signal 11 > > > > >=20 > > > > > 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? > > > > > > > > Accidental insight after sending initial mail: I've disabled > > > > ASLR related sysctls, and now ntpd starts and runs again. > > > > # grep aslr /boot/loader.conf > > > > kern.elf32.aslr.enable=3D0 > > > > kern.elf64.aslr.enable=3D0 > > > > # service ntpd status > > > > ntpd is running as pid 30528. > > > > > > I'll take a look at this. When you get a chance can you open a PR for thi > s > > > and assign the ticket to me, please. > > > > See the thread 'ntpd doesn't like ASLR on stable/12 post-r350672' on stable > . > > Read it to the end. > > Same setrlimit, different error NetBSD is experiencing. > > I'll investigate. Until this can be resolved the workaround is to put the following in your rc.conf: ntpd_prepend="/usr/bin/proccontrol -m aslr -s disable" -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.