Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 922923 - app-portage/emerge-delta-webrsync-3.7.8 does not finish/hangs forever
Summary: app-portage/emerge-delta-webrsync-3.7.8 does not finish/hangs forever
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2024-01-25 19:02 UTC by Jens
Modified: 2024-02-01 03:52 UTC (History)
2 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 Jens 2024-01-25 19:02:59 UTC
emerge-delta-webrsync stopped working, it downloads the diffs, then it outputs
> Syncing local tree ...
and does not continue. In the background there is a rsync process running 100% at one core. I waited 25 minutes, then cancelled.

If cancelled, it leaves the system in an invalid state, which can luckily be recovered by emerge-webrsync or emerge --sync , which both still work (emerge-webrsync takes about 10 seconds for the sync-tree part).

Last update of my system was about a week ago, after the update yesterday this happened the first time.

Reproducible: Always

Steps to Reproduce:
run emerge-delta-webrsync

Seems to be happening every time, even after a clean emerge --sync
Actual Results:  
hangs with active rsync process in the background, never finishes

Expected Results:  
works :-)

# emerge --info
Portage 3.0.61 (python 3.11.7-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-13, glibc-2.38-r9, 6.1.67-gentoo x86_64)
=================================================================
System uname: Linux-6.1.67-gentoo-x86_64-Intel-R-_Core-TM-_i7-8700_CPU_@_3.20GHz-with-glibc2.38
KiB Mem:    32822348 total,  10832344 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Thu, 25 Jan 2024 00:45:01 +0000
Head commit of repository gentoo: b415e46192a1764a12c5947cd31f384293160a9e
Timestamp of repository dotnet: Thu, 15 Dec 2022 03:31:53 +0000
Head commit of repository dotnet: 9f42213f972ff757c12ee1d5c96aef7780317262

Timestamp of repository steam-overlay: Wed, 17 Jan 2024 23:18:13 +0000
Head commit of repository steam-overlay: 1b2ecf815a1503215214a4a8fd21c09610c46991

sh bash 5.1_p16-r6
ld GNU ld (Gentoo 2.41 p4) 2.41.0
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r6::gentoo
dev-build/autoconf:        2.13-r7::gentoo, 2.71-r6::gentoo
dev-build/automake:        1.16.5-r1::gentoo
dev-build/cmake:           3.27.9::gentoo
dev-build/libtool:         2.4.7-r1::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.3.0-r2::gentoo
dev-java/java-config:      2.3.3-r1::gentoo
dev-lang/perl:             5.38.2-r1::gentoo
dev-lang/python:           3.10.13::gentoo, 3.11.7::gentoo, 3.12.1_p1::gentoo
dev-lang/rust:             1.74.1::gentoo
sys-apps/baselayout:       2.14-r1::gentoo
sys-apps/openrc:           0.53::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/binutils:        2.41-r3::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           16.0.6::gentoo, 17.0.6::gentoo
sys-devel/gcc:             13.2.1_p20230826::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/lld:             17.0.6::gentoo
sys-devel/llvm:            16.0.6::gentoo, 17.0.6::gentoo
sys-kernel/linux-headers:  6.1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.38-r9::gentoo
Repositories:

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

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

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

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE @BINARY-REDISTRIBUTABLE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -fomit-frame-pointer -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /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"
CXXFLAGS="-O2 -march=native -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
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 -march=native -fomit-frame-pointer -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch 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 xattr"
FFLAGS="-O2 -march=native -fomit-frame-pointer -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
LINGUAS="en en_GB en_US de de_DE eo"
MAKEOPTS="-j12"
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="7z 7za 7zip X a52 aac accessibility ace acl acpi activities alsa alsa-plugin amd64 bash bash-completion bluetooth boost branding bzip2 cairo cdaudio cdda cdparanoia cdr cdrom chromecast chromium cli contrib corefonts cron crypt cuda cups dbus declarative dri dts dvd dvdr egl elogind encode exif ffmpeg flac fortran gdbm gif glew gpm gssapi gstaudio gstreamer gtk gui hardened hwaccel iconv icu ipv6 java jpeg jumbo-build kde kwallet l7z lcms libnotify libtirpc lzma lzo mad minizip mng mp3 mp4 mpeg multilib ncurses netifrc networkmanager nls nsplugin ntp nvenc ogg opencl opengl openmp openssl pam pango pcre pdf pdfimport perl pie pipewire plasma png policykit postproc ppds print printsupport pulseaudio python qml qt5 rar readline samba scanner screencast sdl seccomp secure-delete semantic-desktop sensord smbclient sound spell split-usr sqlite ssl ssp startup-notification svg system-boost system-cairo system-ffmpeg system-harfbuzz system-icu system-jpeg system-libevent system-libs system-libvpx system-lua system-lz4 system-sqlite system-ssl system-zlib test-rust theora threaded threads threadsafe tiff toolame tools touchpad truetype udev udisks unicode upower usb uvm v4l v4lutils vdpau video videos vlc vorbis vpx vulkan wayland webm widgets wifi winbind wineappdb wxwidgets x264 xattr xcb xft xml xorg xv xvid yuv4mpeg zeroconf zip zlib" ABI_X86="64 32" ADA_TARGET="gnat_2021" 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" CAMERAS="canon" 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 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" INPUT_DEVICES="synaptics evdev libinput" KERNEL="linux" L10N="en en-GB en-US de eo" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" 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" SANE_BACKENDS="xerox_mfp" VIDEO_CARDS="nvidia" 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, EMERGE_DEFAULT_OPTS, 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
Comment 1 Zac Medico gentoo-dev 2024-01-27 07:59:46 UTC
I feel like there's a missing `cd "${TMPDIR}"` where I removed `cd "${TMPDIR}/portage"` before the rsync call here, but I don't understand why we didn't notice earlier:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=fa0f8720e168c95bcd6a8bd57d5abf09c488fd32

commit fa0f8720e168c95bcd6a8bd57d5abf09c488fd32
Author: Zac Medico <zmedico@gentoo.org>
Date:   2019-12-09 01:26:55 -0800

    emerge-delta-webrsync: handle gentoo-YYYYMMDD directory name
    
    Bug: https://bugs.gentoo.org/693454
    Signed-off-by: Zac Medico <zmedico@gentoo.org>
Comment 2 Jens 2024-01-27 10:06:19 UTC
I forgot to mention a nonstandard thing in my system:

My /var/tmp/portage is a tmpfs mounted in the fstab:
tmpfs   /var/tmp/portage   tmpfs   defaults,size=20G   0 0

Likewise, my /tmp:
tmpfs   /tmp               tmpfs   defaults            0 0

The /var/tmp (PORTAGE_TMPDIR) is not in tmpfs though.

Maybe this plays a role in the whole situation?
Comment 3 Zac Medico gentoo-dev 2024-01-29 00:41:00 UTC
I was able to reproduce the problem. The working directory of the rsync process is $DISTDIR, and it's syncing all of the $DISTDIR content instead of the intended repo content. The "missing" `cd "${TMPDIR}"` mentioned in comment #1 is truly missing and simply needs to be added back. It seems like this problem was not discovered earlier because rsync is only called when tarsync is not installed, and many users might have tarsync installed since there's a postinstall suggestion added in this emerge-delta-webrsync-3.7.3 ebuild commit:


https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2c594fce7f93b9a2f67ef26e722566f787fd4bde
Comment 4 Larry the Git Cow gentoo-dev 2024-01-29 01:22:32 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=86a3bfce1e399b3274143df00e68c762d3666724

commit 86a3bfce1e399b3274143df00e68c762d3666724
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2024-01-29 00:48:53 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2024-01-29 00:52:05 +0000

    emerge-delta-webrsync: cd to TMPDIR before rsync
    
    The cd to TMPDIR before rsync was erroneously removed in
    commit fa0f8720e168c95bcd6a8bd57d5abf09c488fd32. Apparently
    this problem was not reported earlier because this code
    path only executes when tarsync is not installed, and the
    emerge-delta-webrsync postinstall suggests to install
    tarsync since version 3.7.3 released near the end of 2015.
    
    Bug: https://bugs.gentoo.org/922923
    Fixes: fa0f8720e168 ("emerge-delta-webrsync: handle gentoo-YYYYMMDD directory name")
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 misc/emerge-delta-webrsync | 1 +
 1 file changed, 1 insertion(+)
Comment 5 Zac Medico gentoo-dev 2024-01-29 01:30:08 UTC
Part of the reason this problem arose is divergence between emerge-webrsync and emerge-delta-webrsync. In emerge-webrsync there's an earlier `cd "${TMPDIR}"` added in this commit that never got merged to emerge-delta-webrsync because it actually had a -k option before emerge-webrsync:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=644c0dd5daad47b6392d99c706afaea56e17ee31

commit 644c0dd5daad47b6392d99c706afaea56e17ee31
Author: Zac Medico <zmedico@gentoo.org>
Date:   2012-08-14 18:03:22 -0700

    emerge-webrsync: add -k/--keep option
Comment 6 Zac Medico gentoo-dev 2024-01-29 01:37:17 UTC
We can actually decouple this bug from bug 921380 since the problem is only in emerge-delta-webrsync, and that's installed by its own ebuild that we'll need to bump the version of.
Comment 7 Larry the Git Cow gentoo-dev 2024-02-01 03:52:17 UTC
The bug has been closed via the following commit(s):

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

commit f40bdffa6d120e8d699d95ed9f91706afb5a4373
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2024-02-01 03:50:02 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2024-02-01 03:50:08 +0000

    app-portage/emerge-delta-webrsync: add 3.7.9
    
    Closes: https://bugs.gentoo.org/922923
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 app-portage/emerge-delta-webrsync/Manifest         |  1 +
 .../emerge-delta-webrsync-3.7.9.ebuild             | 45 ++++++++++++++++++++++
 2 files changed, 46 insertions(+)