Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 931920 - app-portage/portage-utils-0.96.1: qcheck mtime results not reliable
Summary: app-portage/portage-utils-0.96.1: qcheck mtime results not reliable
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Fabian Groffen
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-14 19:58 UTC by Johannes Niess
Modified: 2024-05-21 17:50 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Niess 2024-05-14 19:58:35 UTC
Some mtime checks are reproducibly off by a tiny bit and for the same files. Please note that the file content did not change (no difference in MD5 hash).

Overall I'd classify most files as cache files that are changing by design and therefore maybe shouldn't even be checked like static files. I have no idea if this is caused by qcheck or the ebuilds.



Reproducible: Always

Steps to Reproduce:
1. emerge -av1 x11-libs/gdk-pixbuf #just to ensure a clean starting point, directly followed by the next command on an idle system

2. sawfish /tmp # qcheck -v x11-libs/gdk-pixbuf
Checking x11-libs/gdk-pixbuf-2.42.10-r1 ...
 MTIME: /usr/lib64/gdk-pixbuf-2.0/2.10.0/loaders.cache (recorded '1715714414' != actual '1715714415')
  * 383 out of 384 files are good

Actual Results:  
Packages affected on my system include:

Checking app-text/sgml-common-0.6.3-r7 ...
 MTIME: /etc/sgml/catalog (recorded '1712164159' != actual '1712174001')
  * 68 out of 69 files are good

Checking dev-lang/python-3.11.9 ...
 MTIME: /usr/lib/python3.11/__pycache__/types.cpython-311.pyc (recorded '1714413801' != actual '1714413810')
 MTIME: /usr/lib/python3.11/__pycache__/textwrap.cpython-311.pyc (recorded '1714413801' != actual '1714413810')
 MTIME: /usr/lib/python3.11/__pycache__/optparse.cpython-311.pyc (recorded '1714413800' != actual '1714413810')
 MTIME: /usr/lib/python3.11/__pycache__/signal.cpython-311.pyc (recorded '1714413800' != actual '1714413810')
 MTIME: /usr/lib/python3.11/__pycache__/reprlib.cpython-311.pyc (recorded '1714413800' != actual '1714413810')
 MTIME: /usr/lib/python3.11/__pycache__/pprint.cpython-311.pyc (recorded '1714413800' != actual '1714413810')
 MTIME: /usr/lib/python3.11/__pycache__/inspect.cpython-311.pyc (recorded '1714413800' != actual '1714413810')
 MTIME: /usr/lib/python3.11/__pycache__/operator.cpython-311.pyc (recorded '1714413800' != actual '1714413810')
 MTIME: /usr/lib/python3.11/__pycache__/gettext.cpython-311.pyc (recorded '1714413800' != actual '1714413810')
 MTIME: /usr/lib/python3.11/__pycache__/dataclasses.cpython-311.pyc (recorded '1714413800' != actual '1714413810')
 MTIME: /usr/lib/python3.11/__pycache__/dis.cpython-311.pyc (recorded '1714413800' != actual '1714413810')
 MTIME: /usr/lib/python3.11/__pycache__/contextlib.cpython-311.pyc (recorded '1714413800' != actual '1714413810')
 MTIME: /usr/lib/python3.11/__pycache__/copy.cpython-311.pyc (recorded '1714413800' != actual '1714413810')
 MTIME: /usr/lib/python3.11/__pycache__/ast.cpython-311.pyc (recorded '1714413800' != actual '1714413810')
 MTIME: /usr/lib/python3.11/__pycache__/_weakrefset.cpython-311.pyc (recorded '1714413800' != actual '1714413810')
  * 7723 out of 7738 files are good

Checking dev-libs/glib-2.78.6 ...
 MTIME: /usr/share/glib-2.0/schemas/gschemas.compiled (recorded '1715349689' != actual '1715349691')
 MTIME: /usr/lib64/gio/modules/giomodule.cache (recorded '1715349689' != actual '1715349691')
  * 685 out of 687 files are good

Checking x11-libs/gtk+-2.24.33-r3 ...
 MTIME: /usr/lib64/gtk-2.0/2.10.0/immodules.cache (recorded '1712179932' != actual '1712179939')
  * 962 out of 963 files are good



sawfish /tmp # emerge --info
Portage 3.0.63 (python 3.11.9-final-0, default/linux/amd64/23.0/split-usr/desktop/plasma, gcc-13, glibc-2.38-r13, 6.8.9-gentoo-dist x86_64)
=================================================================
System uname: Linux-6.8.9-gentoo-dist-x86_64-AMD_Ryzen_9_5900X_12-Core_Processor-with-glibc2.38
KiB Mem:    16275420 total,   2362884 free
KiB Swap:   41943032 total,  41264376 free
Timestamp of repository gentoo: Tue, 14 May 2024 18:00:00 +0000
Head commit of repository gentoo: 079547bf7aa5290ff79ade21cc3470a237e9214e
Timestamp of repository stefantalpalaru: Tue, 14 May 2024 18:03:49 +0000
Head commit of repository stefantalpalaru: e6d679f25740fda0b1b9489cd4ac4460fa25c107

sh bash 5.1_p16-r6
ld GNU ld (Gentoo 2.42 p3) 2.42.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.1_p16-r6::gentoo
dev-build/autoconf:        2.13-r8::gentoo, 2.71-r7::gentoo
dev-build/automake:        1.16.5-r2::gentoo
dev-build/cmake:           3.28.5::gentoo
dev-build/libtool:         2.4.7-r4::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.4.0-r1::gentoo
dev-java/java-config:      2.3.3-r1::gentoo
dev-lang/perl:             5.38.2-r3::gentoo
dev-lang/python:           3.11.9::gentoo, 3.12.3::gentoo
dev-lang/rust:             1.77.1::gentoo
sys-apps/baselayout:       2.15::gentoo
sys-apps/openrc:           0.54::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/binutils:        2.42-r1::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           17.0.6::gentoo
sys-devel/gcc:             13.2.1_p20240210::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/lld:             17.0.6::gentoo
sys-devel/llvm:            17.0.6::gentoo
sys-kernel/linux-headers:  6.6-r1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.38-r13::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: True
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 3
    sync-rsync-extra-opts: 
    sync-rsync-verify-jobs: 12

stefantalpalaru
    location: /var/db/repos/stefantalpalaru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/stefantalpalaru.git
    masters: gentoo
    volatile: False

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=znver3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
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 -march=znver3"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="-j 25 -l 25"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live buildsyspkg config-protect-if-modified distlocks fixlafiles ipc-sandbox merge-wait multilib-strict network-sandbox news parallel-fetch parallel-install pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
LINGUAS="de"
MAKEOPTS="-j 25 -l 25"
PKGDIR="/usr/portage/packages"
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"
SHELL="/bin/bash"
USE="X a52 aac acl acpi activities alsa amd64 bluetooth branding bzip2 cairo cdda cdr cet crypt cups dbus declarative dri dts dvd dvdr elogind encode exif flac gdbm gif gpm gtk gui heif iconv icu ipv6 jpeg kde kwallet lcms libnotify libtirpc lm-sensors lto lvm mad mng mp3 mp4 mpeg multilib ncurses networkmanager nls ogg opencl opencv opengl openmp pam pango pcre pdf pgo pipewire plasma png policykit ppds pulseaudio qml qt5 raw readline samba scanner screencast seccomp sftp sound spell split-usr ssh ssl startup-notification svg system-png test-rust tiff truetype udev udisks unicode upower usb v4l vaapi vdpau verify-sig vorbis vulkan wayland widgets wxwidgets x264 x265 xattr xcb xft xml xv xvid zeroconf zlib" ABI_X86="64" ADA_TARGET="gcc_12" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio 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 rdrand sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" INPUT_DEVICES="libinput" KERNEL="linux" L10N="de en" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LLVM_TARGETS="X86 AMDGPU BPF" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" VIDEO_CARDS="amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS

sawfish /tmp #
Comment 1 genBTC 2024-05-14 23:43:56 UTC
The MTIME errors for python shouldn't be like that, and indicates something has tampered with them.

The other packages are indeed cache files that have dynamic changing MTIMES, and I would agree something might need to be done about those.

but the python part means something is changing .pyc files = valid discrepancy
Comment 2 Mike Gilbert gentoo-dev 2024-05-15 15:42:46 UTC
I am unable to reproduce the issue you are experiencing with python.

% sudo qcheck -v dev-lang/python
Checking dev-lang/python-3.12.3 ...
  * 8236 out of 8236 files are good
Checking dev-lang/python-3.11.9 ...
  * 8421 out of 8421 files are good
Checking dev-lang/python-2.7.18_p16-r2 ...
  * 4565 out of 4565 files are good

It seems likely that the file timestamps on your system have been messed with somehow.
Comment 3 Fabian Groffen gentoo-dev 2024-05-16 06:25:43 UTC
what filesystem do you use?
Comment 4 Johannes Niess 2024-05-21 17:50:04 UTC
I can't reproduce the python issues, so "works for me" is OK. Maybe I had an python emerge running at that time. My ext4 fs mounted with noatime,discard,commit=600

P. S.: What's the correct approach for patches regarding the cache file cases like libs/gdk-pixbuf? It is not obvious from typical ebuilds, and mocking with /var/db/pkg/x/y/CONTENTS does not feel correct.