Bug 198811

Summary: prelink fails with a segmentation fault (return value 139)
Product: [Fedora] Fedora Reporter: David Nielsen <gnomeuser>
Component: prelinkAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: rawhideCC: selinux
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-08-07 10:40:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
prelink log none

Description David Nielsen 2006-07-13 19:08:35 UTC
Description of problem:
[root@price david]#/etc/cron.daily/prelink 
/etc/cron.daily/prelink: line 47:  3212 Segmentation fault     
/usr/sbin/prelink -av $PRELINK_OPTS >>/var/log/prelink/prelink.log 2>&1

Version-Release number of selected component (if applicable):
prelink-0.3.8-1

How reproducible:
100%

Steps to Reproduce:
1. run /etc/cron.daily/prelink
  
Actual results:
the above failure

Expected results:
succesful prelink

Additional info:
AMD64 X2 system running Development as of 20060712

Comment 1 David Nielsen 2006-07-13 19:08:35 UTC
Created attachment 132398 [details]
prelink log

Comment 2 Jakub Jelinek 2006-07-15 18:54:03 UTC
Please try with prelink-0.3.9-1, older prelink versions don't understand
the DT_GNU_HASH stuff.

Comment 3 David Nielsen 2006-07-15 19:04:25 UTC
The same thing happens with 0.3.9-1

Comment 4 Jakub Jelinek 2006-07-15 19:13:46 UTC
In that case, please install prelink-debuginfo-0.3.9-1 and run
gdb --args /usr/sbin/prelink -av -mR -f
to see where it segfaulted (backtrace, info regs).
Thanks.

Comment 5 David Nielsen 2006-07-15 20:18:24 UTC
It doesn't give me a traceback all I get in terms of output is:

Starting program: /usr/sbin/prelink -av -mR -f
warning: shared library handler failed to enable breakpoint
ptrace: Function not implemented.



Comment 6 Tom London 2006-07-24 03:59:39 UTC
I get this on i386 with 0.3.9-1.

I downloaded prelink-debuginfo as described in #4.

(gdb) run -av -mR -q
Starting program: /usr/sbin/prelink -av -mR -q
warning: shared library handler failed to enable breakpoint

Program received signal SIGSEGV, Segmentation fault.
deps_cmp (A=0xbfed73bc, B=0xbfed73d8) at cache.c:344
344       if (a->type == ET_NONE && b->type != ET_NONE)
(gdb) where
#0  deps_cmp (A=0xbfed73bc, B=0xbfed73d8) at cache.c:344
#1  0x08095e60 in msort_with_tmp ()
#2  0x08095d5e in msort_with_tmp ()
#3  0x08095d72 in msort_with_tmp ()
#4  0x08095d5e in msort_with_tmp ()
#5  0x08095d5e in msort_with_tmp ()
#6  0x08095d5e in msort_with_tmp ()
#7  0x08095d5e in msort_with_tmp ()
#8  0x08095d5e in msort_with_tmp ()
#9  0x08095d5e in msort_with_tmp ()
#10 0x08095f08 in qsort ()
#11 0x080490d9 in prelink_load_cache () at cache.c:465
#12 0x0805995a in main (argc=4, argv=0xbfedb1e4) at main.c:390
#13 0x0808fa25 in __libc_start_main ()
#14 0x08048131 in _start ()
(gdb) 
(gdb) info registers
eax            0x0      0
ecx            0x0      0
edx            0x0      0
ebx            0xbfed73d8       -1074957352
esp            0xbfed7098       0xbfed7098
ebp            0xbfed7098       0xbfed7098
esi            0x8c6ab70        147237744
edi            0x1      1
eip            0x80482e5        0x80482e5 <deps_cmp+21>
eflags         0x210246 [ PF ZF IF RF ID ]
cs             0x73     115
ss             0x7b     123
ds             0x7b     123
es             0x7b     123
fs             0x0      0
gs             0x33     51
(gdb) 



Comment 7 Tom London 2006-07-29 17:23:08 UTC
Seems to work with prelink-0.3.9-2 (no seg fault).

Comment 8 David Nielsen 2006-07-29 21:03:45 UTC
Indeed, this doesn't seem to segfault here anymore.