Subject: bug#847: util-linux: flock under i386 causes delay in /etc/init.d/ntpsec roughly equal to timeout value

From: Arthur Marsh <[email-masked]>
Date: Thu, 11 Apr 2024 12:51:26 +0930

Package: util-linux
Version: 2.39.3-6devuan1
Severity: normal

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?

Found delay in /etc/init.d/ntpsec startup script recently

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

Tried ntp related settings then notice flock(1) used with a timeout of 180 
used in /etc/init.d/ntpsec start-up script, changing timeout to 10 reduced
start-up delay.

Changed time-out back to 180 and downgraded util-linux:

downgrading util-linux from 2.40-5devuan1 to 2.39.3-6devuan1

which fixed the problem.

   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these template lines ***

-- System Information:
Distributor ID:	Devuan
Description:	Devuan GNU/Linux 6 (excalibur/ceres)
Release:	6
Codename:	excalibur ceres
Architecture: i686

Kernel: Linux 6.9.0-rc3 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages util-linux depends on:
ii  libblkid1              2.40-5devuan1
ii  libc6                  2.38-6
ii  libcap-ng0             0.8.4-2
ii  libcrypt1              1:4.4.36-4
ii  libeudev1              3.2.14-2
ii  libmount1              2.40-5devuan1
ii  libpam0t64 [libpam0g]  1.5.3-4
ii  libselinux1            3.5-2+b2
ii  libsmartcols1          2.40-5devuan1
ii  libtinfo6              6.4+20240113-1
ii  libuuid1               2.40-5devuan1
ii  zlib1g                 1:1.3.dfsg-3.1

Versions of packages util-linux recommends:
ii  sensible-utils  0.0.22

Versions of packages util-linux suggests:
ii  dosfstools          4.2-1.1
ii  kbd                 2.6.4-2
ii  util-linux-extra    2.39.3-6devuan1
ii  util-linux-locales  2.39.3-6devuan1

-- debconf-show failed

---

From: Arthur Marsh <[email-masked]>
Date: Thu, 11 Apr 2024 16:07:06 +0930

When using as per default 

flock -w 180 9

in /etc/init.d/ntpsec
I was geeting 170 seconds delay before ntpsec completed

When using

flock -w 10 9

I was getting zero delay

When using

flock -w 20 9 

I was getting 10 seconds delay

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

---

From: Mark Hindley <[email-masked]>
Date: Thu, 11 Apr 2024 07:43:54 +0100

Since you said this was arch:i386, I wonder if it is 64 time_t transition related.

Mark

---

From: Arthur Marsh <[email-masked]>
Date: Thu, 11 Apr 2024 17:26:53 +0930

Hi, it appears that ifupdown package calls

/etc/network/if-up.d/ntpsec-ntpdate

when the network interface is brought up, which happens before /etc/init.d/ntpsec start is called.

---

From: Lorenzo <[email-masked]>
Date: Thu, 11 Apr 2024 22:32:58 +0200

Hi,

On Thu, 11 Apr 2024 17:26:53 +0930

> /etc/init.d/ntpsec start is called. 

It looks there is already a report of this in Debian #1068796

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1068804

---

From: Mark Hindley <[email-masked]>
Date: Fri, 12 Apr 2024 18:51:57 +0100

Control: reassign -1 ntpsec-ntpdate
Control: tags -1 debian
Control: forwarded -1  https://bugs.debian.org/1068804

> It looks there is already a report of this in Debian #1068796

Thanks.

Mark