Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 193425 - xorg-server-1.4-r1 --> total system lockup when a X session is started on a displaynumber > 1.
Summary: xorg-server-1.4-r1 --> total system lockup when a X session is started on a d...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-22 15:08 UTC by daedalus144
Modified: 2008-10-30 12:56 UTC (History)
3 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 daedalus144 2007-09-22 15:08:34 UTC
X :n or startx -- :n causes the system to go into a complete lockup if n is greater than 1.  No response from the ssh daemon or the keyboard and the only way out of it is to shutdown the computer either by pulling the plug or push down on the power button. This occurred immediately after I've upgraded to xorg-server-1.4-r1 from 1.3.  I have also upgraded to the newest nvidia-drivers but the problem is still there. 

The visual symptom is

a) a black screen with the virtual terminal cursor still remaining on the upper left corner if the attempted X session was started from the VT.

b) a screen with vertical alternating black and white stripes i.e. a zebra pattern if the attempted X session was started from a terminal emulator in an extant X session.

Reproducible: Always

Steps to Reproduce:
1. start a X session on a displaynumber greater than 1 i.e. startx -- :2
Comment 1 daedalus144 2007-09-22 15:43:44 UTC
I am not sure what additional information I could provide since the Xorg logs are "normal."

Here is my emerge --info

Portage 2.1.3.9 (default-linux/amd64/2007.0, gcc-4.2.0, glibc-2.6.1-r0, 2.6.22-gentoo-r6 x86_64)
=================================================================
System uname: 2.6.22-gentoo-r6 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4400+
Timestamp of tree: Sat, 22 Sep 2007 10:20:01 +0000
ccache version 2.4 [disabled]
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r4, 2.5.1-r2
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.10-r4
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18.50.0.1
sys-devel/gcc-config: 1.4.0-r2
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=k8 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=k8 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://trumpetti.atm.tut.fi/gentoo/"
LANG="en_US"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--enable-new-dtags -Wl,--hash-style=both"
MAKEOPTS="-j4"
PKGDIR="/binary"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/office_tmp/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/overlays/xeffects /usr/local/overlays/berkano"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl alsa amd64 aotuv apache2 apm bash-completion berkdb bitmap-fonts bzip2 cairo cdparanoia cdr cli cracklib crypt cups dbus djvu dri dts dvd dvdr dvdread encode expat ffmpeg fftw flac fortran gd gdbm gif glitz gpm gtk gtkhtml hal hashstyle iconv imagemagick ipv6 isdnlog jpeg kde kdeenablefinal lame mad midi mmx mp3 mpeg mudflap mysql ncurses nls nptl nptlonly nsplugin nvidia ogg opengl openmp oss pam pcre pdf perl php png pppd python qt3 qt4 quicktime readline reflection samba screen sdl server session smp spell spl sse sse2 ssl tcpd threads tiff truetype truetype-fonts type1-fonts unicode usb vorbis xml xorg xpm xv xvid xvmc zlib" ALSA_CARDS="emu10k1 intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" CAMERAS="canon" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIRC_DEVICES="leadtek_0010" USERLAND="GNU" VIDEO_CARDS="nv radeon fglrx nvidia vesa fbdev"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 cruzki 2007-09-25 14:34:04 UTC
I confirm this on a ~amd64. 
Comment 3 Jacobo Cabaleiro 2007-09-29 22:36:26 UTC
Same here, but system does not hang. Just xserver and with it, as in original poster case, keyboard input and screen.

But, I can ssh and take xdm down (restart it) and everything backs to normal state again. Systems is, ignoring xorg problem, perfectly up.

xorg-server-1.4-r1
gcc-4.1.2
nvidia-drivers-100.14.19 (using nvidia glx)
Comment 4 Jacobo Cabaleiro 2007-09-29 22:53:04 UTC
I get some output from the failing 2nd xorg, from cmd line:

process 1214: arguments to dbus_connection_send_with_reply_and_block() were incorrect, assertion "(error) == NULL || !dbus_error_is_set ((error))" failed in file dbus-connection.c line 3171.

Seems to be some kind of dbus problem when another session is open... 

From strace seems to write something to the DBUS system-wide bus and gets an unexpected answer. I've never used DBUS, so have no idea of what's going on.

strace:

[pid  1439] writev(21, [{"l\1\0\1 \0\0\0\2\0\0\0\200\0\0\0\1\1o\0\25\0\0\0/org/f"..., 144}, {"\25\0\0\0org.x.config.display2\0\0\0\0\0\0\0", 32}], 2) = 176
[pid  1439] gettimeofday({1191106161, 280434}, NULL) = 0
[pid  1439] poll([{fd=21, events=POLLIN, revents=POLLIN}], 1, 25000) = 1
[pid  1439] read(21, "l\4\1\1\n\0\0\0\2\0\0\0\215\0\0\0\1\1o\0\25\0\0\0/org/"..., 2048) = 170
[pid  1439] read(21, 0x8501f08, 2048)   = -1 EAGAIN (Resource temporarily unavailable)
[pid  1439] gettimeofday({1191106161, 280584}, NULL) = 0
[pid  1439] poll([{fd=21, events=POLLIN, revents=POLLIN}], 1, 25000) = 1
[pid  1439] read(21, "l\3\1\1\204\0\0\0\3\0\0\0m\0\0\0\6\1s\0\5\0\0\0:1.63\0"..., 2048) = 260
[pid  1439] read(21, 0x8501f08, 2048)   = -1 EAGAIN (Resource temporarily unavailable)
[pid  1439] write(2, "process 1439: ", 14process 1439: ) = 14
[pid  1439] write(2, "arguments to dbus_connection_sen"...

I forgot to mention that my hardware is a recent Sempron (K8 based), 32 bit OS.
Comment 5 Jacobo Cabaleiro 2007-09-30 00:12:02 UTC
I got a backtrace, but as I'm not a dbus user, I don't see anything obvious.
On the other hand this code path in Xorg (dbus.c) seems to be independent of display #.

Here is the bt:
#0  0xb7fbc410 in __kernel_vsyscall ()
#1  0xb7cb84f0 in raise () from /lib/libc.so.6
#2  0xb7cb9c1e in abort () from /lib/libc.so.6
#3  0xb7e371e5 in _dbus_abort () from /usr/lib/libdbus-1.so.3
#4  0xb7e2b3c6 in _dbus_warn_check_failed () from /usr/lib/libdbus-1.so.3
#5  0xb7e0842b in dbus_connection_send_with_reply_and_block () from /usr/lib/libdbus-1.so.3
#6  0xb7dfdbfe in send_no_return_values () from /usr/lib/libdbus-1.so.3
#7  0xb7dfde9d in dbus_bus_add_match () from /usr/lib/libdbus-1.so.3
#8  0x080a0a77 in connect_hook (connection=0x84fd720, data=0xb7e4c4c4) at dbus.c:364
#9  0x080a08ba in reconnect_timer (timer=0x81fd5e8, time=29100133, arg=0x0) at dbus-core.c:168
#10 0x081a6a84 in DoTimer (timer=0x81fd5e8, now=6, prev=0x3cdb) at WaitFor.c:459
#11 0x081a71cf in WaitForSomething (pClientsReady=0xbfe1c1c0) at WaitFor.c:293
#12 0x08087062 in Dispatch () at dispatch.c:425
#13 0x0806e9f5 in main (argc=2, argv=0xbfe1c6f4, envp=Cannot access memory at address 0x3ce3
) at main.c:452

The DBusError in the hanging call to bus_add_match seems to have an error (maybe set by the dbus lib functions before dbus shouts):
(gdb) up
#8  0x080a0a77 in connect_hook (connection=0x84fd720, data=0xb7e4c4c4) at dbus.c:364
364         dbus_bus_add_match(info->connection, MATCH_RULE, &error);
(gdb) p error
$1 = {name = 0x84fd820 "org.freedesktop.DBus.Error.AccessDenied", 
  message = 0x84ff460 "Connection \":1.11\" is not allowed to own the service \"org.x.config.display2\" due to security policies in the configuration file", dummy1 = 0, dummy2 = 0, dummy3 = 0, dummy4 = 0, dummy5 = 1, padding1 = 0xb7e4056e}

I hope this is usefull for someone.
Comment 6 Jacobo Cabaleiro 2007-09-30 00:23:20 UTC
Problem lies in dbus xorg-server.conf file:

<!DOCTYPE busconfig PUBLIC
 "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
        <policy context="default">
                <allow own="org.x.config.display0"/>
                <allow send_destination="org.x.config.display0"/>
                <allow send_interface="org.x.config.display0"/>
                <allow own="org.x.config.display1"/>
                <allow send_destination="org.x.config.display1"/>
                <allow send_interface="org.x.config.display1"/>
        </policy>
</busconfig>

Add as many displays as you want to make them work :)

I don't know why dbus is hanging in the call, instead of giving the error. I don't know either why this new file is included in xorg-1.4 distribution (1.3 didn't had it).

Time for those with knowledge to come in and solve the problem
Comment 7 Rémi Cardona (RETIRED) gentoo-dev 2008-10-30 12:56:30 UTC
Current xorg-server versions don't ship the dbus file anymore and I can start as many servers as I want. Looks fixed.

Please don't hesitate to reopen this bug if anyone can reproduce.

Thanks