Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 720006 - sys-apps/util-linux with sys-libs/glibc-2.31 hwclock: settimeofday() failed: Invalid argument
Summary: sys-apps/util-linux with sys-libs/glibc-2.31 hwclock: settimeofday() failed: ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: glibc-2.31
  Show dependency tree
 
Reported: 2020-04-29 11:40 UTC by Andrew Ammerlaan
Modified: 2020-05-01 19:03 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
dmesg (dmesg.txt,64.69 KB, text/plain)
2020-04-29 11:40 UTC, Andrew Ammerlaan
Details
strace.log (strace.log,5.14 KB, text/plain)
2020-04-29 15:43 UTC, Andrew Ammerlaan
Details
kernel config (config-5.6.7-gentoo,128.89 KB, text/plain)
2020-04-29 16:32 UTC, Andrew Ammerlaan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Ammerlaan gentoo-dev 2020-04-29 11:40:33 UTC
Created attachment 635158 [details]
dmesg

Since about a couple of days I've been getting an error at boot when setting the hwclock: hwclock: settimeofday() failed: Invalid argument

I didn't get this error about a week ago, and apart from (kernel) updates, I didn't really change anything.

Running `hwclock -w` is successful. However, `hwclock -s` results in the same error.

gentoo-sources-5.6.7-gentoo
openrc-0.42.1
The in-kernel method is disabled, as described on the wiki https://wiki.gentoo.org/wiki/System_time#System_clock

Portage 2.3.99 (python 3.7.7-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-9.3.0, glibc-2.31-r2, 5.6.7-gentoo x86_64)
=================================================================
System uname: Linux-5.6.7-gentoo-x86_64-Intel-R-_Core-TM-_i7-8700K_CPU_@_3.70GHz-with-gentoo-2.7
KiB Mem:    32764996 total,  24699064 free
KiB Swap:   16382972 total,  16382972 free
Timestamp of repository gentoo: Wed, 29 Apr 2020 09:39:13 +0000
Head commit of repository gentoo: cb01a057544ee22056614a6af3c60646ad521edc

Timestamp of repository steam-overlay: Sun, 19 Apr 2020 17:12:53 +0000
Head commit of repository steam-overlay: d7eea0702c044d94af5b8de9f57c89313f9f05cc

sh bash 5.0_p17
ld GNU ld (Gentoo 2.34 p1) 2.34.0
app-shells/bash:          5.0_p17::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.2::gentoo
dev-lang/python:          2.7.18::gentoo, 3.6.10-r2::gentoo, 3.7.7-r2::gentoo, 3.8.2-r2::gentoo
dev-util/cmake:           3.17.2::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.2::gentoo
sys-devel/binutils:       2.34::gentoo
sys-devel/gcc:            9.3.0::gentoo
sys-devel/gcc-config:     2.2.1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.6::gentoo (virtual/os-headers)
sys-libs/glibc:           2.31-r2::gentoo
Repositories:

gentoo
location: /var/db/repos/gentoo
sync-type: git
sync-uri: https://github.com/gentoo-mirror/gentoo.git
priority: -1000

guru
location: /home/andrew/Storage/Github/guru
masters: gentoo

localrepo
location: /var/db/repos/localrepo
masters: gentoo guru

steam-overlay
location: /var/db/repos/steam-overlay
sync-type: git
sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
masters: gentoo

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/sddm/scripts/Xsetup"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--ask --ask-enter-invalid"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms sign strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j12"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi activities alsa amd64 bash-completion berkdb bluray branding bzip2 cairo cdda cdr cdrom cli crypt cups dbus declarative dri dts dvd dvdr elogind emboss encode epub exif fdk ffmpeg flac fontconfig fortran gdbm gif git gpm gstreamer gtk gtk3 iconv icu id3tag ipv6 javascript jpeg jumbo-build kde kipi kwallet latex lcms ldap libnotify libtirpc lm-sensors mad matroska mng mp3 mp4 mpeg mtp multilib ncurses networkmanager nls nptl nsplugin ogg openal opencl opengl openmp opus pam pango pcre pdf phonon plasma png policykit ppds projectm pulseaudio qml qt5 readline sdl seccomp semantic-desktop speex spell split-usr ssl startup-notification svg taglib tcpd theora thumbnail tiff truetype udev udisks unicode upower usb v4l vaapi vdpau vlc vorbis vulkan wayland widgets wifi wxwidgets x264 x265 xattr xcb xcomposite xinerama xml xrandr xv xvid zeroconf zlib zsh-completion" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3"ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en en-US en-GB nl nl-NL en-NL" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="nlpsolver wiki-publisher" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python3_6 python3_7 python3_8 python3_9" RUBY_TARGETS="ruby27" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi intel i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Mike Gilbert gentoo-dev 2020-04-29 15:10:08 UTC
A kernel update would certainly be a significant change.

What version of sys-apps/util-linux is installed?

Please install dev-util/strace, and run the following:

strace -o strace.log hwclock -s

And attach strace.log to this bug.
Comment 2 Andrew Ammerlaan gentoo-dev 2020-04-29 15:43:43 UTC
Created attachment 635200 [details]
strace.log

> A kernel update would certainly be a significant change.

I also suspect that a kernel update might be the cause, but sadly I have already cleaned up the old kernel, so I can't test this.

> What version of sys-apps/util-linux is installed?

2.35.1-r1

> Please install dev-util/strace, and run the following:
>
> strace -o strace.log hwclock -s
>
> And attach strace.log to this bug.

Attached
Comment 3 Mike Gilbert gentoo-dev 2020-04-29 16:01:15 UTC
Could you also attach the config for the kernel you are currently running?
Comment 4 Mike Gilbert gentoo-dev 2020-04-29 16:13:34 UTC
I think this is due to glibc-2.31. We need to backport this change.

https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/commit/?id=cd781c405be82540484da3bfe3d3f17a39b8eb5c
Comment 5 Larry the Git Cow gentoo-dev 2020-04-29 16:29:41 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7ea8556fef6dcd2b7890e478bdfb3920e5a332a

commit c7ea8556fef6dcd2b7890e478bdfb3920e5a332a
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2020-04-29 16:25:37 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2020-04-29 16:25:37 +0000

    sys-apps/util-linux: backport hwclock fix for glibc-2.31
    
    Closes: https://bugs.gentoo.org/720006
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 .../util-linux-2.35.1-hwclock-glibc-2.31.patch     | 165 +++++++++++
 ....35.1-r1.ebuild => util-linux-2.35.1-r2.ebuild} |   1 +
 sys-apps/util-linux/util-linux-2.35.1.ebuild       | 314 ---------------------
 3 files changed, 166 insertions(+), 314 deletions(-)
Comment 6 Andrew Ammerlaan gentoo-dev 2020-04-29 16:32:01 UTC
Created attachment 635202 [details]
kernel config

> Could you also attach the config for the kernel you are currently running?

Attached
Comment 7 Mike Gilbert gentoo-dev 2020-04-29 16:38:20 UTC
Please try upgrading to sys-apps/util-linux-2.35.1-r2, and let me know how it goes.
Comment 8 Andrew Ammerlaan gentoo-dev 2020-04-29 17:08:17 UTC
Synced, upgraded, and rebooted. Works perfectly now:

* Loading module vboxnetadp ...
[ ok ]
* Setting system clock using the hardware clock [UTC] ...
[ ok ]
* Mounting misc binary format filesystem ...
[ ok ]

Thanks, that was one quick bug fix :)