Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 478074 - x11-misc/rss-glx with x11-misc/xscreensaver - orphaned processes
Summary: x11-misc/rss-glx with x11-misc/xscreensaver - orphaned processes
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Desktop Misc. Team
URL: http://sourceforge.net/p/rss-glx/bugs...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-25 06:05 UTC by Massimo Burcheri
Modified: 2018-12-28 18:57 UTC (History)
3 users (show)

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


Attachments
patch to avoid orphaned processes (rss-glx-0.9.1-exit.patch,330 bytes, patch)
2015-09-04 08:34 UTC, Fabio Coatti
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Massimo Burcheri 2013-07-25 06:05:41 UTC
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
Comment 1 Jeroen Roovers gentoo-dev 2013-07-25 13:07:37 UTC
Please post your `emerge -vp x11-misc/rss-glx x11-misc/xscreensaver' output in a comment.
Comment 2 Massimo Burcheri 2013-07-25 13:33:00 UTC
$ 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
Comment 3 Jeroen Roovers gentoo-dev 2013-07-25 13:40:56 UTC
Does it help to downgrade xscreensaver to 5.21 or 5.20?
Comment 4 Massimo Burcheri 2013-07-26 08:36:48 UTC
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.
Comment 5 Massimo Burcheri 2013-07-29 05:34:39 UTC
(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.
Comment 6 Jeroen Roovers gentoo-dev 2013-07-29 09:43:07 UTC
Is the `helios' process idling? What files does it still have open?
Comment 7 Massimo Burcheri 2013-07-29 11:08:30 UTC
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
Comment 8 Massimo Burcheri 2014-02-11 06:38:09 UTC
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
Comment 9 Fabio Coatti 2015-09-04 08:32:48 UTC
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.
Comment 10 Fabio Coatti 2015-09-04 08:34:39 UTC
Created attachment 410976 [details, diff]
patch to avoid orphaned processes

A try to avoid orphaned process in xscreensaver.
Comment 11 Jeroen Roovers gentoo-dev 2015-12-16 11:37:30 UTC
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.
Comment 12 Fabio Coatti 2015-12-16 12:03:00 UTC
Thanks for the suggestion, I'll dig a bit more into this and report back
Comment 13 Massimo Burcheri 2016-12-02 07:00:48 UTC
Any news? This issue is still around.
Comment 14 Massimo Burcheri 2017-06-09 07:31:30 UTC
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.
Comment 15 Fabio Coatti 2017-06-11 11:19:39 UTC
(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 ;)