Wednesday, October 31, 2012

Inconsistency detected by ld.so: dl-open.c

Cleaned my Ubuntu laptop with Ubuntu Tweak and was left with a weird error when using Chrome and Firefox.  Chrome stopped loading pages while Firefox crashed completely.  Found out the problem only after starting Firefox from the console.  Error string reported by FFX:

Inconsistency detected by ld.so: dl-open.c: 667: _dl_open: Assertion `_dl_debug_initialize (0, args.nsid)->r_state == RT_CONSISTENT' failed!

Used strace on Firefox and obtained the following output:


open("/lib/x86_64-linux-gnu/tls/x86_64/libGL.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu/tls/x86_64", 0x7fffdd0b6c00) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/tls/libGL.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu/tls", 0x7fffdd0b6c00) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/x86_64/libGL.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu/x86_64", 0x7fffdd0b6c00) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libGL.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
open("/usr/lib/x86_64-linux-gnu/tls/x86_64/libGL.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu/tls/x86_64", 0x7fffdd0b6c00) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/tls/libGL.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu/tls", 0x7fffdd0b6c00) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/x86_64/libGL.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu/x86_64", 0x7fffdd0b6c00) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libGL.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu", {st_mode=S_IFDIR|0755, st_size=49152, ...}) = 0
open("/lib/tls/x86_64/libGL.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/tls/x86_64", 0x7fffdd0b6c00) = -1 ENOENT (No such file or directory)
open("/lib/tls/libGL.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/tls", 0x7fffdd0b6c00)        = -1 ENOENT (No such file or directory)
open("/lib/x86_64/libGL.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64", 0x7fffdd0b6c00)     = -1 ENOENT (No such file or directory)
open("/lib/libGL.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib/tls/x86_64/libGL.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/tls/x86_64", 0x7fffdd0b6c00) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/libGL.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/tls", 0x7fffdd0b6c00)    = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64/libGL.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64", 0x7fffdd0b6c00) = -1 ENOENT (No such file or directory)
open("/usr/lib/libGL.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib", {st_mode=S_IFDIR|0755, st_size=73728, ...}) = 0
munmap(0x7fde2d69b000, 121572)          = 0
writev(2, [{"Inconsistency detected by ld.so:"..., 33}, {"dl-open.c", 9}, {": ", 2}, {"667", 3}, {": ", 2}, {"_dl_open", 8}, {": ", 2}, {"Assertion `", 11}, {"_dl_debug_initialize (0, args.ns"..., 61}, {"' failed!\n", 10}], 10Inconsistency detected by ld.so: dl-open.c: 667: _dl_open: Assertion `_dl_debug_initialize (0, args.nsid)->r_state == RT_CONSISTENT' failed!) = 141

libGL.so.1 is there but it just doesn't get recognized by ld.  After digging the web for a few hours, finally found the solution.  Re-install some packages:

sudo apt-get install --reinstall libgl1-mesa-glx:amd64 libgl1-mesa-glx:i386 libgl1-mesa-dri:amd64 libgl1-mesa-dri:i386

Haven't had such crazy stuff in Ubuntu for a while :)



1 comment:

Unknown said...

Thanks, saved me a couple hours