Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 368305 - x11-misc/slim-1.3.2-r3 hangs on start-up, leaving X running with blank screen
Summary: x11-misc/slim-1.3.2-r3 hangs on start-up, leaving X running with blank screen
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Jeremy Olexa (darkside) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-22 06:56 UTC by Christopher Head
Modified: 2015-02-19 07:49 UTC (History)
4 users (show)

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


Attachments
emerge.info (emerge.info,4.93 KB, text/plain)
2011-06-04 13:22 UTC, Johannes Krude
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Head 2011-05-22 06:56:26 UTC
The initscript /etc/init.d/xdm launches slim, and slim forks and executes X (the server). Slim then immediately afterwards tries to connect to the just-launched server. Recently (I'm not actually sure what changed or when the problem appeared), this failed, leaving only a black screen. I discovered that xdm hangs inside XOpenDisplay in App::WaitForServer as called from App::StartServer on line 918 (after patches). By changing the timeout parameter passed to ServerTimeout a few lines earlier from 0 to 1, slim seems to work properly (though this is obviously not a proper solution, since there's still a race in there somewhere that I'm just avoiding by timing).

Reproducible: Always




# emerge --info x11-misc/slim
Portage 2.1.9.42 (default/linux/amd64/10.0, gcc-4.4.5, libc-0-r0, 2.6.37-gentoo-r4 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.37-gentoo-r4-x86_64-Intel-R-_Core-TM-_i7_CPU_Q_720_@_1.60GHz-with-gentoo-2.0.2
Timestamp of tree: Sun, 22 May 2011 03:45:01 +0000
app-shells/bash:     4.1_p9
dev-java/java-config: 2.1.11-r3
dev-lang/python:     2.7.1-r1, 3.2
dev-util/cmake:      2.8.4-r1
sys-apps/baselayout: 2.0.2
sys-apps/openrc:     0.8.2-r1
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.9.6-r3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.5
sys-devel/gcc-config: 1.4.1-r1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
sys-kernel/linux-headers: 2.6.36.1
sys-libs/glibc:      2.11.3
virtual/os-headers:  0
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 sun-bcla-java-vm AdobeFlash-10.1"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -msse4 -mcx16 -mpopcnt -msahf -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /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="-march=native -msse4 -mcx16 -mpopcnt -msahf -O2 -pipe"
DISTDIR="/var/cache/distfiles"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms sign splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://gentoo.chem.wisc.edu/gentoo ftp://gentoo.arcticnetwork.ca/pub/gentoo ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo"
LANG="en_CA.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_CA"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/sunrise /var/lib/layman/bitcoin /home/chead/portage"
SYNC="rsync://rsync.ca.gentoo.org/gentoo-portage"
USE="X a52 aac acpi aio alsa amd64 archive bluetooth bzip2 cairo caps cdda cddb cdinstall cdio cli css cups custom-optimization cvs cxx dbus dillo double-precision dri dvd faac faad fat ffmpeg fftw flac fontconfig fortran gcrypt gif gimp glade glibc-omitfp gmp gnutls gtk hou hpn idn imap iphone java java6 jce joystick jpeg laptop libnotify libsamplerate mercurial mikmod mmx modules mp3 mpeg multilib multiuser ncurses nls nntp nowin nptl nptlonly ntfs ntp offensive ogg opengl openmp pam pdf plotutils png pppd readline scanner sdl session sou sparse spell sse sse2 ssse3 startup-notification stream subversion svg symlink sysfs taglib theora thunar timidity truetype unicode usb v4l2 vdpau videos vim-syntax vorbis xattr xinerama xorg xscreensaver xulrunner xv xvid xvmc zlib" 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" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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="braindump flow karbon kexi kpresenter krita tables words" 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 synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_CA" PHP_TARGETS="php5-3" QEMU_SOFTMMU_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18" SANE_BACKENDS="plustek" USERLAND="GNU" VIDEO_CARDS="nvidia" XFCE_PLUGINS="logout menu" 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

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

x11-misc/slim-1.3.2-r3 was built with the following:
USE="(multilib) pam -branding"

# emerge --info x11-base/xorg-server
…
x11-base/xorg-server-1.9.5 was built with the following:
USE="(multilib) nptl udev xorg -dmx -doc -ipv6 -kdrive -minimal -static-libs -tslib"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,lazy"

# emerge --info x11-drivers/nvidia-drivers
…
x11-drivers/nvidia-drivers-260.19.36 was built with the following:
USE="acpi gtk (multilib) -custom-cflags"
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2011-05-22 20:05:44 UTC
I don't think this has to do with the version of xorg-server - that combination of versions runs fine here on several systems.
Comment 2 Christopher Head 2011-05-23 00:46:40 UTC
Entirely possible. I have other machines where it works fine; it's only on a machine running nvidia-drivers that I have problems (and maybe only on one of two such machines; I'm not physically sitting in front of the other right now so I can't check).

Oh, the machine in question also has $ emerge --info x11-drivers/xf86-input-synaptics
…
x11-drivers/xf86-input-synaptics-1.4.0 was built with the following:
USE="(multilib)"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,lazy"

but that version hasn't changed for ages and the slim problem only appeared recently.
Comment 3 Johannes Krude 2011-06-04 13:21:11 UTC
I have the same problem. I use CoreI3 2310 built in graphics. Sometimes but not very often slim succesfully starts. It seemed to me rather random if it will start or not. gdm works fine for me, but I'd prefer to use slim.
Comment 4 Johannes Krude 2011-06-04 13:22:08 UTC
Created attachment 275797 [details]
emerge.info
Comment 5 Ian Stakenvicius (RETIRED) gentoo-dev 2011-09-08 15:34:58 UTC
I can't reproduce this issue on my available hardware (dual-core x86, intel 945GM;  dual-core amd64, geforce 6150 via nvidia-drivers)...

I'm also not seeing anything in the X11 docs that would say a call to XOpenDisplay could cause a race condition; it should either succeed or fail, it doesn't seem to block.

Now; there are actually two calls to XOpenDisplay; the one inside App::WaitForServer , and the one inside the App::Run(), that's called right after App::StartServer finishes.  

From what I can tell, it's possible that App::StartServer could complete with a ServerPID of -1 (which I assume would be invalid) when that ServerTimeout() call above takes parameter 0 and ends up returning false, in which case the App::WaitForServer function call is actually skipped, but pretty well everything else goes on as normal.  App::StartServer returns the ServerPID, but for some reason, this return value is not checked.  It could be that this is, for whatever reason, what's happening on your systems?

If possible could either of you try with the latest revision (-r6)?  I don't know if it'll be any different or not.  When you do, though, please post your /var/log/slim.log file so that I can trace what's going on.  (I may need to provide you with a patch as well, to add more debug messages to the slim log)
Comment 6 Christopher Head 2011-10-09 16:49:25 UTC
Since rebuilding everything including slim (for GCC4.5) and I think upgrading xorg-server in the mix, I can't seem to reproduce this any more after lots of boots, so I'm going to say it's probably gone.
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2015-02-19 07:42:55 UTC
Please don't do that.
Comment 8 Christopher Head 2015-02-19 07:49:25 UTC
Could you please point to where in the Bugzilla help pages it says I am not supposed to mark things I have verified as fixed as verified? I have found the documentation for exactly what different resolutions mean in the Gentoo context somewhat lacking, so I may be looking in the wrong place.