[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#454166: x11-common: /usr/bin/X fails to start X server.



Package: x11-common
Version: 1.3-16

On a pristinely installed Debian system, if I skip the "tasksel" step to
select the "Desktop" configuration, but add X11 later using dselect, I
end up with a system where X does not properly start.

This happened to me on both an AMD64 and an i386 system; on the former, this
was solved by re-installing from scratch and selecting "Desktop" in the
"tasksel" step of the installer; after this, X worked fine.

Upon trying to pinpoint the problem, I ended up executing /usr/bin/X from
the command-line. It returns to the command line immediately (with exit code
0) without providing any indication on what it is doing, or why it fails
to start the X server proper. This is a bug in itself, I think.

Below I have added an strace log of running "/usr/bin/X" on a broken system.
I have compared this to an strace on a system where X is starting properly,
and the important difference is that on the broken system, we end up
executing

    execve("/bin/true", ["X"], [/* 14 vars */]) = 0

(around line 44 of the strace below), whereas on a system that
has a properly working X11, I get

    execve("/usr/bin/Xorg", ["X"], [/* 14 vars */]) = 0

.... after some further research, it appears that /usr/bin/X is trying to
execute /etc/X11/X, which on a properly installed system is a symlink to
/usr/bin/Xorg, but on my broken systems is a symlink to /bin/true.

Apparantly, "some" (?) install script has seen it necessary to 	make
/etc/X11/X a symlink to /bin/true. This is a serious problem, as
it leads to a hard-to-diagnose problem.

Anyway, a simple "ln -sf /usr/bin/Xorg /etc/X11/X" fixes the problem.
	
========== strace log

execve("/usr/bin/X", ["X"], [/* 14 vars */]) = 0
brk(0)                                  = 0x804b000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or
directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7f75000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=60222, ...}) = 0
mmap2(NULL, 60222, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f66000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or
directory)
open("/lib/i686/cmov/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260a\1"..., 512) =
512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1335720, ...}) = 0
mmap2(NULL, 1340944, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0xb7e1e000
mmap2(0xb7f60000, 12288, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x142) = 0xb7f60000
mmap2(0xb7f63000, 9744, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7f63000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7e1d000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7e1d6b0, limit:1048575,
seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1,
seg_not_present:0, useable:1}) = 0
mprotect(0xb7f60000, 4096, PROT_READ)   = 0
munmap(0xb7f66000, 60222)               = 0
brk(0)                                  = 0x804b000
brk(0x806c000)                          = 0x806c000
open("/etc/X11/Xwrapper.config", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0600, st_size=614, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7f74000
read(3, "# Xwrapper.config (Debian X Wind"..., 4096) = 614
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0xb7f74000, 4096)                = 0
lstat64("/etc/X11/X", {st_mode=S_IFLNK|0777, st_size=9, ...}) = 0
readlink("/etc/X11/X", "/bin/true", 1024) = 9
access("/etc/X11/X", X_OK)              = 0
umask(0)                                = 022
mkdir("/tmp/.X11-unix", 01777)          = -1 EEXIST (File exists)
umask(022)                              = 0
lstat64("/tmp/.X11-unix", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...})
= 0
stat64("/dev/dri", 0xbfecb194)          = -1 ENOENT (No such file or
directory)
setresuid32(-1, 0, -1)                  = 0
getpriority(PRIO_PROCESS, 0)            = 20
setpriority(PRIO_PROCESS, 0, 0)         = 0
getpriority(PRIO_PROCESS, 0)            = 20
chdir("/etc/X11")                       = 0
execve("/bin/true", ["X"], [/* 14 vars */]) = 0
brk(0)                                  = 0x804c000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or
directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7f80000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=60222, ...}) = 0
mmap2(NULL, 60222, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f71000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or
directory)
open("/lib/i686/cmov/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260a\1"..., 512) =
512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1335720, ...}) = 0
mmap2(NULL, 1340944, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0xb7e29000
mmap2(0xb7f6b000, 12288, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x142) = 0xb7f6b000
mmap2(0xb7f6e000, 9744, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7f6e000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7e28000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7e286b0, limit:1048575,
seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1,
seg_not_present:0, useable:1}) = 0
mprotect(0xb7f6b000, 4096, PROT_READ)   = 0
munmap(0xb7f71000, 60222)               = 0
brk(0)                                  = 0x804c000
brk(0x806d000)                          = 0x806d000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=75980576, ...}) = 0
mmap2(NULL, 2097152, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7c28000
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0x12f1) = 0xb7f7f000
close(3)                                = 0
close(1)                                = 0
exit_group(0)                           = ?





Reply to: