Bug 118522 - prelink segfault (runs from cron)
prelink segfault (runs from cron)
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: prelink (Show other bugs)
rawhide
athlon Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks: FC2Target
  Show dependency treegraph
 
Reported: 2004-03-17 07:59 EST by Neal Becker
Modified: 2007-11-30 17:10 EST (History)
2 users (show)

See Also:
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 06:08:10 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
complete log of screen session when running prelink in gdb with args -aR -vvvv (223.62 KB, application/x-tar)
2004-05-02 08:43 EDT, Eirik Thorsnes
no flags Details
screenlog of gdb session (snipped of some error msg) args: -aR -v (20.48 KB, application/x-tar)
2004-05-02 11:47 EDT, Eirik Thorsnes
no flags Details
screenlog of gdb session reproducing fault at kdcop file (21.11 KB, application/x-tar)
2004-05-02 17:11 EDT, Eirik Thorsnes
no flags Details

  None (edit)
Description Neal Becker 2004-03-17 07:59:03 EST
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 05:23:00 EST
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 07:37:18 EST
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 15:28:40 EST
If it segfaulted, root will get mail that the cron job failed.
Comment 4 Pedro Fernandes Macedo 2004-04-28 23:23:44 EDT
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 07:00:56 EDT
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 07:58:07 EDT
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 08:43:29 EDT
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 08:49:25 EDT
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 11:04:01 EDT
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 11:47:32 EDT
Created attachment 99885 [details]
screenlog of gdb session  (snipped of some error msg) args: -aR -v
Comment 11 Jakub Jelinek 2004-05-02 13:57:01 EDT
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 17:11:22 EDT
Created attachment 99891 [details]
screenlog of gdb session reproducing fault at kdcop file
Comment 13 Eirik Thorsnes 2004-05-02 17:13:57 EDT
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 12:57:10 EDT
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 14:08:02 EDT
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 01:19:44 EDT
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

Note You need to log in before you can comment on or make changes to this bug.