Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 953748 - =net-misc/tigervnc-1.15.0 =sys-apps/openrc-0.61 service start freezes
Summary: =net-misc/tigervnc-1.15.0 =sys-apps/openrc-0.61 service start freezes
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Anna
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2025-04-12 22:42 UTC by Robin Bankhead
Modified: 2025-04-24 16:50 UTC (History)
6 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 Robin Bankhead 2025-04-12 22:42:04 UTC
Having upgraded to the above package versions, /etc/init.d/tigervnc.1 start results in a hang.

I removed the service from init and attempted to start it manually after a reboot, and saw the following output:

hazel ~ # /etc/init.d/tigervnc.1 start
 * Executing: /usr/libexec/rc/sh/openrc-run.sh /usr/libexec/rc/sh/openrc-run.sh /etc/init.d/tigervnc start
 * Executing: /usr/libexec/rc/sh/openrc-run.sh /usr/libexec/rc/sh/openrc-run.sh /etc/init.d/user start
 * Starting user.robin ...
 * supervise-daemon: fopen `/var/run/supervise-user.robin.pid': No such file or directory
 * Detaching to start `/usr/libexec/rc/bin/openrc-user'                                                                                                                               [ ok ]
 * Executing: /usr/libexec/rc/sh/openrc-run.sh /usr/libexec/rc/sh/openrc-run.sh /etc/init.d/user stop
 * Stopping user.robin ...

[The command does not return; it hangs interminably, or for >3-4 minutes at least.]

This is a headless server. If I first login via SSH as the user the service runs as on another terminal, then the initscript starts successfully (I assume because this "supervisor-daemon" service, which is new to me, has been started for the user).

hazel ~ # /etc/init.d/tigervnc.1 start
 * Executing: /usr/libexec/rc/sh/openrc-run.sh /usr/libexec/rc/sh/openrc-run.sh /etc/init.d/tigervnc start
 * There are no passwords defined for user robin. The server may not start.
 * Starting TigerVNC server :1 ...
 * start-stop-daemon: fopen `/run/vncsession-:1.pid': No such file or directory
 * Detaching to start `/usr/libexec/vncsession-start' ...                                                                                                                             
[ ok ]


emerge --info net-misc/tigervnc
Portage 3.0.67 (python 3.12.10-final-0, default/linux/amd64/23.0/split-usr, gcc-14, glibc-2.41-r1, 6.14.2-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.14.2-gentoo-x86_64-Intel-R-_Xeon-R-_E-2224_CPU_@_3.40GHz-with-glibc2.41
KiB Mem:    16241220 total,  10884312 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Fri, 11 Apr 2025 11:45:00 +0000
Head commit of repository gentoo: ef8d2693b1de0f2c4a0ceb388c1c082bb5477888
sh bash 5.2_p37
ld GNU ld (Gentoo 2.44 p1) 2.44.0
ccache version 4.11.2 [enabled]
app-misc/pax-utils:        1.3.8::gentoo
app-shells/bash:           5.2_p37::gentoo
dev-build/autoconf:        2.72-r1::gentoo
dev-build/automake:        1.17-r2::gentoo
dev-build/cmake:           3.31.7::gentoo
dev-build/libtool:         2.5.4::gentoo
dev-build/make:            4.4.1-r100::gentoo
dev-build/meson:           1.7.2::gentoo
dev-java/java-config:      2.3.4::gentoo
dev-lang/perl:             5.40.1::gentoo
dev-lang/python:           3.12.10::gentoo, 3.13.3::gentoo
dev-lang/rust-bin:         1.85.1::gentoo
dev-util/ccache:           4.11.2::gentoo
llvm-core/llvm:            19.1.7::gentoo, 20.1.2::gentoo
sys-apps/baselayout:       2.17::gentoo
sys-apps/openrc:           0.61::gentoo
sys-apps/sandbox:          2.46::gentoo
sys-devel/binutils:        2.44::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/gcc:             14.2.0::gentoo
sys-devel/gcc-config:      2.12.1::gentoo
sys-kernel/linux-headers:  6.14::gentoo (virtual/os-headers)
sys-libs/glibc:            2.41-r1::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: 3
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: no

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 0
    volatile: True

Installed sets: @kde, @mailsrv, @mplayer, @nodejs
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/portage/make.conf /usr/bin/pear /usr/bin/vncserver /usr/lib/X11/xdm/Xsetup_0 /usr/share/config /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/hp/hplip.conf /etc/php/apache2-php8.2/ext-active/ /etc/php/apache2-php8.3/ext-active/ /etc/php/apache2-php8.4/ext-active/ /etc/php/cgi-php8.2/ext-active/ /etc/php/cgi-php8.3/ext-active/ /etc/php/cgi-php8.4/ext-active/ /etc/php/cli-php8.2/ext-active/ /etc/php/cli-php8.3/ext-active/ /etc/php/cli-php8.4/ext-active/ /etc/php/fpm-php8.2/ext-active/ /etc/php/fpm-php8.3/ext-active/ /etc/php/fpm-php8.4/ext-active/ /etc/php/phpdbg-php8.2/ext-active/ /etc/php/phpdbg-php8.3/ext-active/ /etc/php/phpdbg-php8.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/home/cache/distfiles"
EMERGE_DEFAULT_OPTS="--nospinner --quiet-build=n --verbose-conflicts"
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 binpkg-multi-instance buildpkg-live ccache distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://www.mirrorservice.org/sites/distfiles.gentoo.org/ http://mirrors.gethosted.online/gentoo http://mirrors.soeasyto.com/distfiles.gentoo.org/"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
LINGUAS="en_GB"
MAKEOPTS="-j5"
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="/tmp"
SHELL="/bin/bash"
USE="X aac acl acpi amd64 apache2 bash-completion bzip2 cet crypt curl dbm dbus dv dvd elogind encode exif fam fat ffmpeg flac ftp gd gdbm hardened iconv imagemagick imap imlib innodb ipv6 java javascript jpeg lcms libkms libtirpc libwww lto lzo mad matroska mdadm minimal mp3 multilib mysql ncurses network nls nsplugin ntfs offensive ogg openmp pam pcre pcre16 pdf php png policykit posix raw readline rtmp samba scanner seccomp session sharedmem soap split-usr ssl startup-notification test-rust theora threads tidy tiff tokenizer tordns truetype udev unicode usb vhosts webp x264 xattr xmlrpc xvid xz zip zlib" ABI_X86="64" ADA_TARGET="gcc_14" APACHE2_MODULES="access_compat actions alias auth_basic auth_digest authn_core authn_anon authn_dbd authn_dbm authn_default authn_file authz_core authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cache_disk cgid dav dav_fs dav_lock dbd deflate dir env expires ext_filter file_cache filter headers ident imagemap include info libass log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_fcgi proxy_http proxy_wstunnel rewrite setenvif slotmem_shm so socache_shmcb speling status unique_id unixd userdir usertrack vhost_alias" APACHE2_MPMS="worker" 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 sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en-GB" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LLVM_TARGETS="X86" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PERL_FEATURES="ithreads" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres17" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" RUBY_TARGETS="ruby32" SANE_BACKENDS="hp net" VIDEO_CARDS="vesa mga" 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

=================================================================
                        Package Settings
=================================================================

net-misc/tigervnc-1.15.0::gentoo was built with the following:
USE="drm java nls opengl server viewer -dri3 -gnutls -xinerama" ABI_X86="(64)"
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-04-12 22:46:25 UTC
navi, can you take a look?
Comment 2 Paul Marks 2025-04-15 03:01:44 UTC
On my system, I "fixed" tigervnc by adding =sys-apps/openrc-0.61 to package.mask (downgraded to 0.56).

Downgrading tigervnc had no effect.
Comment 3 Anna 2025-04-16 00:54:55 UTC
okay two things were happening here:

the tigervnc script calls `runuser`, which starts a pam session, and thus starts the user services for said user (expected behaviour, desired? i dunno), but then:
* a bug in openrc-run.c:svc_exec prevented the 60 timeout to stop
* and more importantly, runuser sets a signal mask for SIGCHLD, and openrc-run wasn't re-setting the sigprocmask at the start

so, it would never get the SIGCHLD, and never reap the shell process running the stop function.

fix: https://github.com/OpenRC/openrc/pull/841

i'll test and probably merge it by tomorrow
Comment 4 Anna 2025-04-16 23:50:56 UTC
to the reporter, or anyone else who can reproduce, please try https://github.com/OpenRC/openrc/pull/841. you can put it in /etc/portage/patches/sys-apps/openrc/signals.patch after downloading from https://github.com/OpenRC/openrc/pull/841.patch, then rebuild openrc-0.61 or -9999
Comment 5 Robin Bankhead 2025-04-17 14:37:47 UTC
Patch working here, manual and rc starts working fine.
Comment 6 Francois Chenier 2025-04-22 00:39:41 UTC
Patch works for me too. This remember me why I downgraded to openrc-0.56. Tested with tigervnc-0.14 who got the issue as well. I will update tigervnc to the latest tonight and test it tomorrow.
Comment 7 Anna 2025-04-24 14:30:04 UTC
openrc-0.62 includes the patch, should be fixed there