Bug 118522

Summary: prelink segfault (runs from cron)
Product: [Fedora] Fedora Reporter: Neal Becker <ndbecker2>
Component: prelinkAssignee: Jakub Jelinek <jakub>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: eirik.thorsnes, pmacedo
Target Milestone: ---   
Target Release: ---   
Hardware: athlon   
OS: Linux   
Whiteboard:
Fixed In Version: prelink-0.3.2-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 595557 (view as bug list) Environment:
Last Closed: 2004-05-12 10:08:10 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:
Bug Depends On:    
Bug Blocks: 114963    
Attachments:
Description Flags
complete log of screen session when running prelink in gdb with args -aR -vvvv
none
screenlog of gdb session (snipped of some error msg) args: -aR -v
none
screenlog of gdb session reproducing fault at kdcop file none

Description Neal Becker 2004-03-17 12:59:03 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.2; Linux) (KHTML, like Gecko)

Description of problem:
/etc/cron.daily/prelink:

/etc/cron.daily/prelink: line 36: 32239 Segmentation fault      /usr/sbin/prelink -av $PRELINK_OPTS >>/var/log/prelink.log 2>&1


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

How reproducible:
Didn't try

Steps to Reproduce:
1.cron runs prelink
2.
3.
    

Additional info:

Comment 1 Jakub Jelinek 2004-03-18 10:23:00 UTC
It certainly works for me, so I need your help to find out what's
going on.
Please download and install prelink-debuginfo-0.3.1-1 (or upgrade
both to 0.3.1-2), look into /var/log/prelink.log what options have
been passed to prelink (first line in the log) and run
gdb /usr/sbin/prelink
set args -av -mR -q # (or whatever options you see there)
run
and if that segfaults, I'd be interested in seeing backtrace (bt),
and later other details too.

Comment 2 Neal Becker 2004-03-18 12:37:18 UTC
I want to check if the problem disappeared after yesterday's massive 
update.  Where would I look?  /var/log/prelink.log shows nothing 
interesting.. 

Comment 3 Jakub Jelinek 2004-03-18 20:28:40 UTC
If it segfaulted, root will get mail that the cron job failed.

Comment 4 Pedro Fernandes Macedo 2004-04-29 03:23:44 UTC
Same problem here. FC2T3 all updated , with prelink and
prelink-debuginfo. Result from gdb:
parameters: /usr/sbin/prelink -av -mR -f

prelink: cxx.c:68: find_cxx_sym: Assertive `n < ndeps' failed.

Program received signal SIGABRT, Aborted.
0x080ad391 in kill ()

(gdb) bt
#0  0x080ad391 in kill ()
#1  0x080ad128 in raise ()
#2  0x00000006 in ?? ()
#3  0xfeeefa08 in ?? ()
#4  0x0808db1a in abort ()
Previous frame inner to this frame (corrupt stack?)
(gdb) 

Anything else I can provide to help?

Comment 5 Eirik Thorsnes 2004-05-02 11:00:56 UTC
Confirm same problem. FC2T3 updated, prelink and prelink-debuginfo =
0.3.1-2.
selinux=0 on boot (if it matters)
parameters: /usr/sbin/prelink -av -mR -q
but get same result without the -m and -q (although it seems to
prelink more libs before abort)

gdb:
[snip]
Prelinking /usr/bin/ksmserver
Detaching after fork from child process 17505.
prelink: cxx.c:68: find_cxx_sym: Assertion `n < ndeps' failed.

Program received signal SIGABRT, Aborted.
0x080ad391 in kill ()
(gdb) bt
#0  0x080ad391 in kill ()
#1  0x080ad128 in raise ()
#2  0x00000006 in ?? ()
#3  0xfef46428 in ?? ()
#4  0x0808db1a in abort ()
Previous frame inner to this frame (corrupt stack?)
(gdb)

Comment 6 Jakub Jelinek 2004-05-02 11:58:07 UTC
Can I ask you for tarball created by:
tar cjhf /tmp/ksmserver.tar.bz2 `LD_TRACE_PRELINKING=1 LD_WARN= /usr/bin/ksmserver | awk '{print $3}'`
(or replace /usr/bin/ksmserver by whatever program you get this on)?
Also, please add -vvvv to prelink opts and see the messages printed before
the abort ().  Thanks.

Comment 7 Eirik Thorsnes 2004-05-02 12:43:29 UTC
Created attachment 99880 [details]
complete log of screen session when running prelink in gdb with args -aR -vvvv

Attached file uncompresses to 13MB textfile.

Comment 8 Eirik Thorsnes 2004-05-02 12:49:25 UTC
The ksmserver.tar.bz2 created from command in comment #6, is too large
to attach (7MB). Uploaded here:
http://www.pki.uib.no/images/ksmserver.tar.bz2

Do you want similar ones for other programs that fails?

Comment 9 Jakub Jelinek 2004-05-02 15:04:01 UTC
Unfortunately, I cannot reproduce this.
ksmserver is prelinked just fine with:
prelink -vmR -c ./prelink.conf --ld-library-path . --dynamic-linker ././/ld-linux.so.2 ./ksmserver
(modified ksmserver, so that interpreter is ././/ld-linux.so.2).
So, can you please install prelink-debuginfo, run prelink under gdb
with the arguments you used and put a breakpoint:
b cxx.c:68 if n < ndeps
?
Then if that breakpoint gets hit, p info->dso->filename
p addr
p ndeps
p n
Then print info->dso[N] for N 0 through ndeps - 1 and info->dso->base
and info->dso->end?
Thanks.

Comment 10 Eirik Thorsnes 2004-05-02 15:47:32 UTC
Created attachment 99885 [details]
screenlog of gdb session  (snipped of some error msg) args: -aR -v

Comment 11 Jakub Jelinek 2004-05-02 17:57:01 UTC
If you try once more, does it die on info->dso->filename /usr/bin/kdcop
as well?  If yes, can you build a tarball with kdcop and its dependencies
instead of ksmserver?

Comment 12 Eirik Thorsnes 2004-05-02 21:11:22 UTC
Created attachment 99891 [details]
screenlog of gdb session reproducing fault at kdcop file

Comment 13 Eirik Thorsnes 2004-05-02 21:13:57 UTC
kdcop.tar.bz2 created from similar command as in comment #6 uploaded here:
http://www.pki.uib.no/images/kdcop.tar.bz2


Comment 14 Jakub Jelinek 2004-05-05 16:57:10 UTC
Can you please try
ftp://people.redhat.com/jakub/prelink/prelink*0.3.1-2.0.2*.rpm
?
It solves the prelink: cxx.c:68: find_cxx_sym: Assertive `n < ndeps' failed.
problem for Ingo Molnar who saw this problem on his box as well.
Thanks.

Comment 15 Eirik Thorsnes 2004-05-05 18:08:02 UTC
Confirms that prelink from comment #14 fixes problem for me.

I was just about to post that adding -q to the command and running
many times (20+) makes it able to finish the prelinking. 

Prelink from comment #14 completes run with args: -amvRf without
"ndeps" errors or aborts.

Comment 16 Jay Turner 2004-09-02 05:19:44 UTC
An errata has been issued which should help the problem 
described in this bug report. This report is therefore being 
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, 
please follow the link below. You may reopen this bug report 
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2004-386.html