After some days X session I usually have lot of orphaned screensavers around $ pgrep -alf helios 5236 helios -r -i 300 -s 8 -e 1 -a 1 -S 1 -c 0 -b 7 -w 5299 helios -r -i 300 -s 8 -e 1 -a 1 -S 1 -c 0 -b 7 -w 9871 helios -r -i 300 -s 8 -e 1 -a 1 -S 1 -c 0 -b 7 -w 9881 helios -r -i 300 -s 8 -e 1 -a 1 -S 1 -c 0 -b 7 -w 9932 helios -r -i 300 -s 8 -e 1 -a 1 -S 1 -c 0 -b 7 -w 9954 helios -r -i 300 -s 8 -e 1 -a 1 -S 1 -c 0 -b 7 -w ... using helios screensaver from x11-misc/rss-glx. Only killall -9 helios is able to terminate the processes. Reproducible: Always $ emerge --info Portage 2.1.12.2 (default/linux/amd64/13.0/desktop, gcc-4.6.3, glibc-2.15-r3, 3.9.2-ck x86_64) ================================================================= System uname: Linux-3.9.2-ck-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E6550_@_2.33GHz-with-gentoo-2.2 KiB Mem: 3968104 total, 543184 free KiB Swap: 8401952 total, 7733180 free Timestamp of tree: Mon, 22 Jul 2013 00:45:01 +0000 ld GNU ld (GNU Binutils) 2.23.1 distcc 3.1 x86_64-pc-linux-gnu [enabled] app-shells/bash: 4.2_p45 dev-java/java-config: 2.1.12-r1 dev-lang/python: 2.7.5, 3.2.5-r1 dev-util/cmake: 2.8.10.2-r2 dev-util/pkgconfig: 0.28 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.11.8 sys-apps/sandbox: 2.6-r1 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.11.6, 1.12.6 sys-devel/binutils: 2.23.1 sys-devel/gcc: 4.6.3 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.7 (virtual/os-headers) sys-libs/glibc: 2.15-r3 Repositories: gentoo portage_padmburcheri1-linux kde-sunset xfce-dev vmware mv science mozilla ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=core2 -O2 -pipe -fomit-frame-pointer" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/polkit-1/actions /usr/share/themes/oxygen-gtk/gtk-2.0" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/iproute2 /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=core2 -O2 -pipe -fomit-frame-pointer -fvisibility-inlines-hidden" DISTDIR="/mnt/data/portage/distfiles/" EMERGE_DEFAULT_OPTS="--autounmask-write" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distcc distcc-pump distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://ftp.halifax.rwth-aachen.de/gentoo http://de-mirror.org/gentoo http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror " LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j26" PKGDIR="/mnt/data/portage/packages/" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage /var/lib/layman/kde-sunset /var/lib/layman/xfce-dev /var/lib/layman/vmware /var/lib/layman/mv /var/lib/layman/science /var/lib/layman/mozilla" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="X a52 aac acl acpi alsa amd64 bash-completion berkdb branding bzip2 cairo cdda cddb cdio cdr cli conntrack consolekit cracklib crypt cscope cups cxx dbus dri dts dvd dvdr emboss encode exif fam fat firefox flac fortran gdbm gif git gpm gtk hddtemp iconv id3 jpeg lcms ldap libnotify lm_sensors mad mercurial mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nfs nls nptl nsplugin ogg opengl openmp optimization pam pango pcre pdf png policykit ppds qt3support rar readline sdl session spell sse sse2 sse3 ssl ssse3 startup-notification strong-optimization svg tcpd tiff truetype udev udisks unicode upower usb vim vim-pager vim-syntax vorbis wxwidgets x264 xa xcb xml xmp xv xvid zlib" ABI_X86="64" 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="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en de" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-4" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="intel" 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: CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON $ equery -q uses x11-misc/rss-glx x11-misc/xscreensaver +bzip2 -openal -quesoglc -gdm +jpeg -new-login +opengl +pam +perl -suid -xinerama
Please post your `emerge -vp x11-misc/rss-glx x11-misc/xscreensaver' output in a comment.
$ emerge -vp x11-misc/rss-glx x11-misc/xscreensaver These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ~] x11-misc/xscreensaver-5.22 USE="jpeg opengl pam perl -gdm -new-login (-selinux) -suid -xinerama" 0 kB [ebuild R ] x11-misc/rss-glx-0.9.1 USE="bzip2 -openal -quesoglc" 0 kB Total: 2 packages (2 reinstalls), Size of downloads: 0 kB
Does it help to downgrade xscreensaver to 5.21 or 5.20?
Sorry for misleading. The bug was against x11-misc/xscreensaver-5.20. Meanwhile upgrading to 5.22 as seen in comment 2 solves it. Please make x11-misc/xscreensaver-5.22 stable for amd64.
(In reply to Massimo Burcheri from comment #4) > Sorry for misleading. The bug was against x11-misc/xscreensaver-5.20. > Meanwhile upgrading to 5.22 as seen in comment 2 solves it. Correction. Bug is not resolved. This morning: $ pgrep -alf helios |wc -l 7 However it seems that manually activating lock with screensaver by Ctrl+Alt+Del or whatever the window manager supports does not lead to orphaned processes, but the automatically started after inactivity timeout.
Is the `helios' process idling? What files does it still have open?
Yes, all these processes are idle. $ pgrep -alf helios 1239 helios -r -i 300 -s 8 -e 1 -a 1 -S 1 -c 0 -b 7 -w 1258 helios -r -i 300 -s 8 -e 1 -a 1 -S 1 -c 0 -b 7 -w 1262 helios -r -i 300 -s 8 -e 1 -a 1 -S 1 -c 0 -b 7 -w 13687 helios -r -i 300 -s 8 -e 1 -a 1 -S 1 -c 0 -b 7 -w 13698 helios -r -i 300 -s 8 -e 1 -a 1 -S 1 -c 0 -b 7 -w 13721 helios -r -i 300 -s 8 -e 1 -a 1 -S 1 -c 0 -b 7 -w 13728 helios -r -i 300 -s 8 -e 1 -a 1 -S 1 -c 0 -b 7 -w $ lsof -p 1239 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME helios 1239 mo cwd DIR 254,2 4096 2 /home/mo helios 1239 mo rtd DIR 8,18 4096 2 / helios 1239 mo txt REG 8,18 148408 915072 /usr/lib64/misc/xscreensaver/helios helios 1239 mo mem REG 8,18 49744 655874 /usr/lib64/libdrm.so.2.4.0 helios 1239 mo mem REG 8,18 136152 656015 /usr/lib64/libxcb.so.1.1.0 helios 1239 mo mem REG 8,18 1296112 656041 /usr/lib64/libX11.so.6.3.0 helios 1239 mo mem REG 8,18 76040 656043 /usr/lib64/libXext.so.6.4.0 helios 1239 mo mem REG 8,18 28896 656055 /usr/lib64/libXfixes.so.3.1.0 helios 1239 mo mem REG 8,18 25088 656245 /usr/lib64/libXxf86vm.so.1.0.0 helios 1239 mo mem REG 8,18 8232 656156 /usr/lib64/libX11-xcb.so.1.0.0 helios 1239 mo mem REG 8,18 12560 656209 /usr/lib64/libXdamage.so.1.1.0 helios 1239 mo mem REG 8,18 102712 656233 /usr/lib64/libxcb-glx.so.0.0.0 helios 1239 mo mem REG 8,18 20808 656163 /usr/lib64/libxcb-dri2.so.0.0.0 helios 1239 mo mem REG 8,18 90880 914761 /lib64/libz.so.1.2.7 helios 1239 mo mem REG 8,18 37504 658487 /usr/lib64/libpciaccess.so.0.11.1 helios 1239 mo mem REG 8,18 152296 655878 /usr/lib64/libglapi.so.0.0.0 helios 1239 mo mem REG 8,18 400072 657087 /usr/lib64/opengl/xorg-x11/lib/libGL.so.1.2.0 helios 1239 mo mem REG 8,18 525928 656401 /usr/lib64/libGLU.so.1.3.1 helios 1239 mo mem REG 8,18 455432 657712 /usr/lib64/libGLEW.so.1.9.0 helios 1239 mo mem REG 8,18 58736 659191 /usr/lib64/libImplicit.so.0.0.0 helios 1239 mo mem REG 8,18 90632 654639 /usr/lib64/gcc/x86_64-pc-linux-gnu/4.6.3/libgcc_s.so.1 helios 1239 mo mem REG 8,18 981664 654859 /usr/lib64/gcc/x86_64-pc-linux-gnu/4.6.3/libstdc++.so.6.0.16 helios 1239 mo mem REG 8,18 29208 657669 /usr/lib64/librsMath.so.0.0.0 helios 1239 mo mem REG 8,18 146640 914096 /lib64/ld-2.15.so helios 1239 mo mem REG 8,18 1723560 914112 /lib64/libc-2.15.so helios 1239 mo mem REG 8,18 1004328 914122 /lib64/libm-2.15.so helios 1239 mo mem REG 8,18 17384 914385 /lib64/libdl-2.15.so helios 1239 mo mem REG 8,18 138200 914381 /lib64/libpthread-2.15.so helios 1239 mo mem REG 8,18 38552 914394 /lib64/librt-2.15.so helios 1239 mo mem REG 8,18 24784 654546 /usr/lib64/libXdmcp.so.6.0.0 helios 1239 mo mem REG 8,18 16624 654498 /usr/lib64/libXau.so.6.0.0 helios 1239 mo mem REG 8,18 69104 914663 /lib64/libbz2.so.1.0.6 helios 1239 mo mem REG 8,18 176456 655491 /usr/lib64/libexpat.so.1.6.0 helios 1239 mo mem CHR 226,0 57 /dev/dri/card0 helios 1239 mo mem REG 8,18 18200 392675 /usr/lib64/libtxc_dxtn.so helios 1239 mo mem REG 8,18 134976 548866 /usr/lib64/libdrm_intel.so.1.0.0 helios 1239 mo mem REG 8,18 18538040 261189 /usr/lib64/mesa/i915g_dri.so helios 1239 mo 0r CHR 1,3 0t0 5 /dev/null helios 1239 mo 1w FIFO 0,7 0t0 5069 pipe helios 1239 mo 2w FIFO 0,7 0t0 5069 pipe helios 1239 mo 3u unix 0xffff880095ea5500 0t0 694140 socket helios 1239 mo 4r FIFO 0,7 0t0 5069 pipe helios 1239 mo 5u CHR 226,0 0t0 57 /dev/dri/card0 helios 1239 mo 6u CHR 1,3 0t0 5 /dev/null helios 1239 mo 7u CHR 1,3 0t0 5 /dev/null
Today I migrated Gentoo to a new machine. amd64, Core(TM) i5-3470, still Intel based graphics: 00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller (rev 09) The issue is always the same, recently emerged x11-misc/xscreensaver-5.26 x11-misc/rss-glx-0.9.1
I made some digging in this issue; I may be mistaken, but I think that the problem is in drivers.c, signalHandler() I see no exit(1) inside signal handler, so maybe when xscreensaver sends TERM to the process, it does not exit and the process is orphaned. I tried this small patch: diff -urN rss-glx_0.9.1_orig/src/driver.c rss-glx_0.9.1/src/driver.c --- rss-glx_0.9.1_orig/src/driver.c 2015-08-31 13:15:09.032716142 +0200 +++ rss-glx_0.9.1/src/driver.c 2015-08-31 13:16:12.312679997 +0200 @@ -397,6 +397,7 @@ void signalHandler (int sig) { signalled = 1; + exit (1); } int main (int argc, char *argv[]) and I no longer get orphans. I'm not sure this is the correct fix, but it seems to work. I tried to contact upstream: no feedback.
Created attachment 410976 [details, diff] patch to avoid orphaned processes A try to avoid orphaned process in xscreensaver.
Comment on attachment 410976 [details, diff] patch to avoid orphaned processes After mainLoop() is done, main() does some clean-ups. I guess it's hanging there and not in the signal handler, so I'm not sure if the exit() you introduce would give us a *clean* exit. I.e. you might be causing memory leaks this way. Instead, debugging what happens after mainLoop() finishes might prove informative.
Thanks for the suggestion, I'll dig a bit more into this and report back
Any news? This issue is still around.
I was not able to reproduce that issue with geodesic and switched to that one temporarilly. I just don't like it as much as really slick helios. If http://sourceforge.net/p/rss-glx/bugs/14/ is really the same upstream issue like this I'm going to continue there.
(In reply to Massimo Burcheri from comment #14) > I was not able to reproduce that issue with geodesic and switched to that > one temporarilly. I just don't like it as much as really slick helios. > > If http://sourceforge.net/p/rss-glx/bugs/14/ is really the same upstream > issue like this I'm going to continue there. It seems that geodesic is not one of rss-glx savers. I forget about this issue; I'm still using that dirty patch that I posted some time ago and found no time to debug more closely the issue. Maybe in a short while I'll try again, if only for the sake to learn a bit better about signal management :) If anyone has a better solution, please advise ;)
Is anybody still able to reproduce the issue? I haven't tested the problematic use case in a long time and now all processes seem to exit cleanly. IIRC the processes used to hang somewhere in libxcb.so, but I don't remember the details. I guess it was caused by some issue in the X11 libs that has been fixed. I think this bug can be closed unless someone confirms it's still reproducible.
Meanwhile I switched to more stable and simple "geodesic" screensaver. But switching back to helios I got some new orphaned processes again: 22197 helios -r -i 10 -s 10 -e 1 -a 1 -S 1 -c 1 -b 6 -w -window-id 0x9E02448 22261 helios -r -i 0 -s 30 -e 1 -a 1 -S 1 -c 1 -b 6 -w -window-id 0x9E000E1 22292 helios -r -i 0 -s 1 -e 1 -a 1 -S 1 -c 1 -b 6 -w -window-id 0x9E000E0 22438 helios -r -i 300 -s 1 -e 1 -a 1 -S 1 -c 0 -b 0 -U -w -window-id 0x9E000E1 22544 helios -r -i 300 -s 1 -e 1 -a 1 -S 1 -c 0 -b 0 -w -window-id 0x9E002D9 22602 helios -r -i 300 -s 1 -e 1 -a 1 -S 1 -c 0 -b 0 -window-id 0x9E00268 22684 helios -r -i 0 -s 1 -e 1 -a 6 -S 1 -c 0 -b 0 -w -window-id 0x9E000E1 22724 helios -r -i 0 -s 1 -e 8 -a 1 -S 1 -c 0 -b 0 -w -window-id 0x9E000E1 22826 helios -r -i 0 -s 1 -e 1 -a 1 -S 1 -c 0 -b 0 -w -window-id 0x9E005DF 22997 helios -r -i 0 -s 1 -e 0 -a 1 -S 1 -c 0 -b 0 -w -window-id 0x9E000E1 23217 helios -r -i 0 -s 1 -e 1 -a 1 -S 1 -c 0 -b 0 -U -w -window-id 0x9E00240 This was caused when testing some configurations in the xscreensaver-demo. Every configuration change leads to a frozen dialog, killing the dialog leaves orphaned processes. The xscreensaver-demo process is orphaned as well and cannot be killed -9.
Created attachment 687921 [details, diff] rss-glx-hang.patch Thanks for reporting back, Massimo. I'm sure these programs used to hang after receiving SIGTERM when running with --root. That issue seems to be fixed. But indeed, if running in the small preview window of xscreensaver-demo, they still hang sometimes on my system, too. I would need to rebuild the libraries with debug info to get a more meaningful backtracke, but I can still see that helios is calling glPopMatrix() when the program hangs. The mesa GL stack ultimately calls xcb_wait_for_special_event() and that hangs in a poll() that never returns. That means that the process hasn't exited mainLoop() yet when the graphics stack hangs. The reason is that xscreensaver-demo destroys the preview window (and creates a new one) while the hack is still running and trying to draw in that window. That's obviously a stupid idea, but on the other hand, the graphics stack shouldn't hang in such a situation but simply return an error. There's not much we can do about it from within rss-glx. Maybe we should remove the signal handler and simply die when a signal arrives (Fabio's patch has a similar effect, but it keeps the handler). Let's try another variation first: the attached patch attempts a clean exit, but if that doesn't happen within 3 seconds the process gets killed by an alarm signal. Could you test the patch? It works for me, but since the hangs happen in the GL stack the behaviour depends on the graphics driver.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad43009390d80e169286a6ec696b700318bdb6a2 commit ad43009390d80e169286a6ec696b700318bdb6a2 Author: Alexander Miller <alex.miller@gmx.de> AuthorDate: 2021-02-21 14:50:47 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2021-03-26 06:44:21 +0000 x11-misc/rss-glx: Workaround hanging processes Add a patch that ensures a signalled process doesn't hang indefinitely if the GL driver got stuck. Closes: https://bugs.gentoo.org/478074 Signed-off-by: Alexander Miller <alex.miller@gmx.de> Signed-off-by: Joonas Niilola <juippis@gentoo.org> x11-misc/rss-glx/files/rss-glx-0.9.1-hang.patch | 14 ++++++++++++++ .../{rss-glx-0.9.1-r2.ebuild => rss-glx-0.9.1-r3.ebuild} | 1 + 2 files changed, 15 insertions(+)