Segmentation fault with ld-2.6.so


#1

Suddenly, all my ruby apps, even the most basic, are seg faulting.

from /var/log/messages…

Nov 6 23:42:54 localhost ruby[5439] general protection ip:7fed0d030608
sp:a7c7ad30fcdba2eb error:0 in ld-2.6.so[7fed0d01d000+1a000]
Nov 6 23:50:20 localhost ruby[15073] general protection ip:7f6611393608
sp:50ee2e45d0297dfa error:0 in ld-2.6.so[7f6611380000+1a000]
Nov 6 23:50:58 localhost ruby[15092] general protection ip:7fd1858db608
sp:d862e5d28bcad5e error:0 in ld-2.6.so[7fd1858c8000+1a000]
Nov 6 23:54:56 localhost ruby[15216] general protection ip:7fe974fbb608
sp:1b1e2ef107529041 error:0 in ld-2.6.so[7fe974fa8000+1a000]
Nov 7 00:01:27 localhost ruby[15403] general protection ip:7fb017c7c608
sp:d7e2fe3cdb07529 error:0 in ld-2.6.so[7fb017c69000+1a000]
Nov 7 00:02:59 localhost ruby[15457] general protection ip:7f27f437e608
sp:12f6301ccf939f61 error:0 in ld-2.6.so[7f27f436b000+1a000]

I run gentoo.

I reinstalled glibc, ruby–1.8.6_p287, and did revdep-rebuild, which
showed
only on a couple of problems with libswt. but still the seg faults
persist.

I did a strace of which the tail end looks like:

open("/usr/lib/libXext.so.6", O_RDONLY) = 3
read(3,
“\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0005\0\0\0\0\0\0@”…,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=65824, …}) = 0
mmap(NULL, 1113216, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x7fbc0e2cd000
mprotect(0x7fbc0e2dc000, 1048576, PROT_NONE) = 0
mmap(0x7fbc0e3dc000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf000) = 0x7fbc0e3dc000
close(3) = 0
open("/usr/lib/libXi.so.6", O_RDONLY) = 3
read(3,
“\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\30\0\0\0\0\0\0@”…,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=33728, …}) = 0
mmap(NULL, 1080768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x7fbc0e1c5000
mprotect(0x7fbc0e1cd000, 1044480, PROT_NONE) = 0
mmap(0x7fbc0e2cc000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x7fbc0e2cc000
close(3) = 0
open("/usr/lib/libXrandr.so.2", O_RDONLY) = 3
read(3,
“\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000\27\0\0\0\0\0\0@”…,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=25544, …}) = 0
mmap(NULL, 1072520, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x7fbc0e0bf000
mprotect(0x7fbc0e0c5000, 1044480, PROT_NONE) = 0
mmap(0x7fbc0e1c4000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x5000) = 0x7fbc0e1c4000
close(3) = 0
open("/usr/lib/libXcursor.so.1", O_RDONLY) = 3
read(3,
“\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360*\0\0\0\0\0\0@”…,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=37024, …}) = 0
mmap(NULL, 1083912, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x7fbc0dfb6000
mprotect(0x7fbc0dfbf000, 1044480, PROT_NONE) = 0
mmap(0x7fbc0e0be000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8000) = 0x7fbc0e0be000
close(3) = 0
munmap(0x7fbc126f2000, 159875) = 0
brk(0x74f000) = 0x74f000
brk(0x770000) = 0x770000
brk(0x791000) = 0x791000
brk(0x7b2000) = 0x7b2000
brk(0x7d3000) = 0x7d3000
brk(0x7f4000) = 0x7f4000
brk(0x815000) = 0x815000
brk(0x812000) = 0x812000
brk(0x833000) = 0x833000
brk(0x854000) = 0x854000
brk(0x875000) = 0x875000
brk(0x896000) = 0x896000
brk(0x893000) = 0x893000
brk(0x8b4000) = 0x8b4000
— SIGSEGV (Segmentation fault) @ 0 (0) —
— SIGSEGV (Segmentation fault) @ 0 (0) —
+++ killed by SIGSEGV +++

Any ideas?

Thanks.


#2

I reinstalled glibc, ruby–1.8.6_p287, and did revdep-rebuild, which
showed
only on a couple of problems with libswt. but still the seg faults
persist…

Any ideas?

Thanks.

did you build from source? have you tried 1.8.6?
-=R


#3

On Sat, 8 Nov 2008 06:26:56 +0900
Roger P. removed_email_address@domain.invalid wrote:

did you build from source? have you tried 1.8.6?
-=R

Posted via http://www.ruby-forum.com/.

Thank you for your response.

Yes, by default gentoo always builds from source, and rolling back
past last good ruby did not help.

By using a very simple program that had lots of the “includes” from
the original program I had problems with, I traced it to a “bad”
“include gtk2” line. Upgrading ‘ruby-gtk2’ solved the segmentation
fault problem I was having.


#4

By using a very simple program that had lots of the “includes” from
the original program I had problems with, I traced it to a “bad”
“include gtk2” line. Upgrading ‘ruby-gtk2’ solved the segmentation
fault problem I was having.

glad you figured it out.
-=R