hwclock: fails to set time on glibc 2.31

Bug #1888543 reported by Jakob Haufe
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
busybox (Debian)
Fix Released
Unknown
busybox (Ubuntu)
Fix Released
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned
Groovy
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
 * With glibc 2.31, hwclock from busybox is unable to set the system time
   due to the changes in settimeofday behavior.

[Test Case]
* Run:
  sudo busybox hwclock -s

* It should succeed in the fixed version

[Where problems could occur]
* The fix calls the originally called glibc function twice, instead of passing both non-NULL parameters at once. If this compiles there should be no other issue.

[Original Bug Text]
With glibc 2.31, hwclock from busybox is unable to set the system time
due to the changes in settimeofday behavior.

The problem has been reported upstream in [1] which also contains a patch.

hwclock from busybox is important as it's used on the Raspberry Pi to set the system
time when an RTC is present.

This bug applies to focal and groovy.

[1] https://bugs.busybox.net/show_bug.cgi?id=12756

Changed in busybox (Debian):
status: Unknown → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in busybox (Ubuntu):
status: New → Confirmed
Balint Reczey (rbalint)
Changed in busybox (Ubuntu Focal):
status: New → Confirmed
Balint Reczey (rbalint)
description: updated
Revision history for this message
Balint Reczey (rbalint) wrote :

I've prepared test packages in https://launchpad.net/~rbalint/+archive/ubuntu/scratch/+packages and will upload them as SRUs after testing them.

Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Jakob, or anyone else affected,

Accepted busybox into groovy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/busybox/1:1.30.1-4ubuntu9.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-groovy to verification-done-groovy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-groovy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in busybox (Ubuntu Groovy):
status: New → Fix Committed
tags: added: verification-needed verification-needed-groovy
Changed in busybox (Ubuntu Focal):
status: Confirmed → Fix Committed
tags: added: verification-needed-focal
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Jakob, or anyone else affected,

Accepted busybox into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/busybox/1:1.30.1-4ubuntu6.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Balint Reczey (rbalint)
Changed in busybox (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Balint Reczey (rbalint) wrote :

Verified on Groovy with 1:1.30.1-4ubuntu9.1:

ubuntu@gg:~$ dpkg -l busybox-static | cat
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-=================-============-======================================================
ii busybox-static 1:1.30.1-4ubuntu9 amd64 Standalone rescue shell with tons of builtin utilities
ubuntu@gg:~$ sudo busybox hwclock -s
hwclock: settimeofday: Invalid argument
ubuntu@gg:~$ sudo apt -qq install busybox-static
The following packages will be upgraded:
  busybox-static
1 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
Need to get 915 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 64660 files and directories currently installed.)
Preparing to unpack .../busybox-static_1%3a1.30.1-4ubuntu9.1_amd64.deb ...
Unpacking busybox-static (1:1.30.1-4ubuntu9.1) over (1:1.30.1-4ubuntu9) ...
Setting up busybox-static (1:1.30.1-4ubuntu9.1) ...
Processing triggers for man-db (2.9.3-2) ...
Processing triggers for initramfs-tools (0.137ubuntu12) ...
update-initramfs: Generating /boot/initrd.img-5.8.0-29-generic
ubuntu@gg:~$ sudo busybox hwclock -s
ubuntu@gg:~$

Revision history for this message
Balint Reczey (rbalint) wrote :

Verified on Focal with 1:1.30.1-4ubuntu6.3:

ubuntu@ff:~$ dpkg -l busybox-static | cat
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-===================-============-======================================================
ii busybox-static 1:1.30.1-4ubuntu6.2 amd64 Standalone rescue shell with tons of builtin utilities
ubuntu@ff:~$ sudo busybox hwclock -s
hwclock: settimeofday: Invalid argument
ubuntu@ff:~$ sudo apt install busybox-static
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  busybox-static
1 upgraded, 0 newly installed, 0 to remove and 15 not upgraded.
Need to get 949 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal-proposed/main amd64 busybox-static amd64 1:1.30.1-4ubuntu6.3 [949 kB]
Fetched 949 kB in 1s (1849 kB/s)
(Reading database ... 63419 files and directories currently installed.)
Preparing to unpack .../busybox-static_1%3a1.30.1-4ubuntu6.3_amd64.deb ...
Unpacking busybox-static (1:1.30.1-4ubuntu6.3) over (1:1.30.1-4ubuntu6.2) ...
Setting up busybox-static (1:1.30.1-4ubuntu6.3) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for initramfs-tools (0.136ubuntu6.3) ...
update-initramfs: Generating /boot/initrd.img-5.4.0-54-generic
ubuntu@ff:~$ sudo busybox hwclock -s
ubuntu@ff:~$

tags: added: verification-done verification-done-focal verification-done-groovy
removed: verification-needed verification-needed-focal verification-needed-groovy
Revision history for this message
Chris Halse Rogers (raof) wrote : Update Released

The verification of the Stable Release Update for busybox has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package busybox - 1:1.30.1-4ubuntu6.3

---------------
busybox (1:1.30.1-4ubuntu6.3) focal; urgency=medium

  * cherry-pick settimeofday for glibc v2.31+ compatibility fix for upstream
    (LP: #1888543)

 -- Balint Reczey <email address hidden> Wed, 11 Nov 2020 13:15:02 +0100

Changed in busybox (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package busybox - 1:1.30.1-4ubuntu9.1

---------------
busybox (1:1.30.1-4ubuntu9.1) groovy; urgency=medium

  * cherry-pick settimeofday for glibc v2.31+ compatibility fix for upstream
    (LP: #1888543)

 -- Balint Reczey <email address hidden> Mon, 09 Nov 2020 15:55:05 +0100

Changed in busybox (Ubuntu Groovy):
status: Fix Committed → Fix Released
Changed in busybox (Debian):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.