GNU bug report logs - #43321
programs depending on libcap 2.31 are crashing (including ntpd, chrony, and potentially others)

Previous Next

Package: guix;

Reported by: Jesse Dowell <jesse.dowell <at> gmail.com>

Date: Thu, 10 Sep 2020 21:20:02 UTC

Severity: normal

Done: Leo Famulari <leo <at> famulari.name>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 43321 in the body.
You can then email your comments to 43321 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#43321; Package guix. (Thu, 10 Sep 2020 21:20:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jesse Dowell <jesse.dowell <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Thu, 10 Sep 2020 21:20:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jesse Dowell <jesse.dowell <at> gmail.com>
To: bug-guix <at> gnu.org
Subject: programs depending on libcap 2.31 are crashing (including ntpd,
 chrony, and potentially others)
Date: Thu, 10 Sep 2020 17:06:55 -0400
[Message part 1 (text/plain, inline)]
Hello,

I am experiencing issues with ntpd crashing after a recent `guix pull` and
`guix system reconfigure`. Messages like the following can be found in
/var/log/messages....

--8<---------------cut here---------------start------------->8---
Sep  9 10:04:06 localhost ntpd[10104]: Listen normally on 10 wlp2s0
[fda3:bae9:8e85:0:1421:58a2:ada:1923]:123
Sep  9 10:04:06 localhost vmunix: [13620.607643] traps: ntpd[10104] general
protection fault ip:7fc1baa34207 sp:7ffd6b331f80 error:0 in
libcap.so.2.31[7fc1baa33000+3000]
Sep  9 10:04:06 localhost ntpd[10104]: Listen normally on 11 wlp2s0
[2601:582:300:88a:58f1:d50e:9b9a:37d7]:123
Sep  9 10:04:06 localhost ntpd[10104]: Listen normally on 12 wlp2s0
[fe80::487a:7283:64fd:9e25%6]:123
Sep  9 10:04:06 localhost ntpd[10104]: Listen normally on 13 tun0
[fe80::7672:ef25:4507:33e7%7]:123
Sep  9 10:04:06 localhost ntpd[10104]: Listening on routing socket on fd
#30 for interface updates
Sep  9 10:04:06 localhost ntpd[10104]: kernel reports TIME_ERROR: 0x41:
Clock Unsynchronized
Sep  9 10:04:06 localhost ntpd[10104]: kernel reports TIME_ERROR: 0x41:
Clock Unsynchronized
Sep  9 10:04:06 localhost shepherd[1]: Service ntpd has been disabled.
Sep  9 10:04:06 localhost shepherd[1]:   (Respawning too fast.)
--8<---------------cut here---------------end--------------->8---

At first I thought this was ntpd specific so I tried switching to chronyd
and experienced the same problem.

--8<---------------cut here---------------start------------->8---
Sep  9 14:41:56 localhost shepherd[1]: Service chronyd has been started.
Sep  9 14:41:56 localhost chronyd[26478]: chronyd version 3.5.1 starting
(+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER -SIGND +ASYNCDNS +SECHASH
+IPV6 -DEBUG)
Sep  9 14:41:56 localhost vmunix: [30290.527369] traps: chronyd[26478]
general protection fault ip:7f1653729207 sp:7fffc9161900 error:0 in
libcap.so.2.31[7f1653728000+3000]
Sep  9 14:41:56 localhost shepherd[1]: Respawning chronyd.
--8<---------------cut here---------------end--------------->8---

I was able to fix the issue by rebuilding chronyd with the libcap/next
package.

To give more context - I'm using guix master and am using the latest 5.8
kernel. I'm wondering if it might be something related to recent kernel
upgrades but I haven't tried reverting to a previous kernel.

Is there a plan to go ahead and perform the switch described in the source
code for gnu/packages/linux.scm?

--8<---------------cut here---------------start------------->8---
;; libcap 2.31 causes problems for 'fakeroot', so provide this newer
variant.
;; To be merged with libcap on the next rebuild cycle.
(define-public libcap/next
  (package
    (inherit libcap)
    (version "2.34")
    (source (origin
              (method url-fetch)
              (uri (string-append
                    "mirror://kernel.org/linux/libs/security/linux-privs/"
                    "libcap2/libcap-" version ".tar.xz"))
              (sha256
               (base32
                "048n1gy2p48vl9hkrr9wymfxxcpwj2aslz2bv79nhl4m2lhd9kdf"))))))
--8<---------------cut here---------------end--------------->8---

Best,
Jesse
[Message part 2 (text/html, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#43321; Package guix. (Fri, 11 Sep 2020 02:21:01 GMT) Full text and rfc822 format available.

Message #8 received at 43321 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Jesse Dowell <jesse.dowell <at> gmail.com>
Cc: 43321 <at> debbugs.gnu.org
Subject: Re: bug#43321: programs depending on libcap 2.31 are crashing
 (including ntpd, chrony, and potentially others)
Date: Thu, 10 Sep 2020 22:19:54 -0400
On Thu, Sep 10, 2020 at 05:06:55PM -0400, Jesse Dowell wrote:
> I am experiencing issues with ntpd crashing after a recent `guix pull` and
> `guix system reconfigure`. Messages like the following can be found in
> /var/log/messages....

Oof... thank you for the report.

> I was able to fix the issue by rebuilding chronyd with the libcap/next
> package.

Great. I'm also testing the same solution for ntpd now. I'll make sure
that works and figure out what the situation is on the 5.4 kernel.




Information forwarded to bug-guix <at> gnu.org:
bug#43321; Package guix. (Fri, 11 Sep 2020 13:34:01 GMT) Full text and rfc822 format available.

Message #11 received at 43321 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Jesse Dowell <jesse.dowell <at> gmail.com>
Cc: 43321 <at> debbugs.gnu.org
Subject: Re: bug#43321: programs depending on libcap 2.31 are crashing
 (including ntpd, chrony, and potentially others)
Date: Fri, 11 Sep 2020 09:33:07 -0400
On Thu, Sep 10, 2020 at 10:19:54PM -0400, Leo Famulari wrote:
> Great. I'm also testing the same solution for ntpd now. I'll make sure
> that works and figure out what the situation is on the 5.4 kernel.

It works for ntpd on Linux 5.8. Now to test the older kernels...




Information forwarded to bug-guix <at> gnu.org:
bug#43321; Package guix. (Sat, 12 Sep 2020 03:48:02 GMT) Full text and rfc822 format available.

Message #14 received at 43321 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: guix-patches <at> gnu.org
Cc: 43321 <at> debbugs.gnu.org
Subject: [PATCH] gnu: Fix a crash in NTP and Chrony.
Date: Fri, 11 Sep 2020 23:47:22 -0400
Fixes <https://bugs.gnu.org/43321>.

* gnu/packages/ntp.scm (ntp, chrony)[inputs]: Replace libcap with libcap/next.
---
 gnu/packages/ntp.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/ntp.scm b/gnu/packages/ntp.scm
index 6b725c2b0f..5fa7d55845 100644
--- a/gnu/packages/ntp.scm
+++ b/gnu/packages/ntp.scm
@@ -80,7 +80,7 @@
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (inputs
-     `(("libcap" ,libcap)
+     `(("libcap" ,libcap/next)
        ("libseccomp" ,libseccomp)
        ("nettle" ,nettle)))
     (home-page "https://chrony.tuxfamily.org/")
@@ -143,7 +143,7 @@ time-stamping or reference clock, sub-microsecond accuracy is possible.")
       ;; to run as non-root (when invoked with '-u'.)
       ,@(if (string-suffix? "-linux"
                             (or (%current-target-system) (%current-system)))
-            `(("libcap" ,libcap))
+            `(("libcap" ,libcap/next))
             '())))
    (arguments
     `(#:phases
-- 
2.28.0





Reply sent to Leo Famulari <leo <at> famulari.name>:
You have taken responsibility. (Sun, 13 Sep 2020 19:50:02 GMT) Full text and rfc822 format available.

Notification sent to Jesse Dowell <jesse.dowell <at> gmail.com>:
bug acknowledged by developer. (Sun, 13 Sep 2020 19:50:02 GMT) Full text and rfc822 format available.

Message #19 received at 43321-done <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: 43349-done <at> debbugs.gnu.org
Cc: 43321-done <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: Fix a crash in NTP and Chrony.
Date: Sun, 13 Sep 2020 15:48:35 -0400
[Message part 1 (text/plain, inline)]
I tested on bare metal and virtualized x86-64 with NTP.

The bug reporter [0] tested that the fix worked for Chrony.

Pushed as 898fbb60b2354e82e5b7f259b44dbfed112a83aa

[0] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=43321#5
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 12 Oct 2020 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 194 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.