Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bugzilla DB migration completed. Please report issues to Infra team via email via infra@gentoo.org or IRC

Bug 13878

Summary: prelink assertion failure
Product: Gentoo Linux Reporter: delta407 <delta407>
Component: [OLD] UnspecifiedAssignee: Stefan Jones (RETIRED) <cretin>
Status: RESOLVED FIXED    
Severity: critical    
Priority: High    
Version: 1.4_rc1   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---

Description delta407 2003-01-13 17:53:37 UTC
This bug is also being tracked in the forums at:
  http://forums.gentoo.org/viewtopic.php?t=29816

prelink-20021002-r1, (`prelink --version` reads 1.0) and the lastest packages in
the Portage tree as of today, January 13 reports the following when attempting
to prelink any file:

# prelink -a
prelink: dso.c:306: fdopen_dso: Assertion `j == k' failed.
Aborted

This happens on my laptop which was purchased two weeks ago, my desktop which
has been fully upgraded over time from Gentoo 1.0_rc6 back in the day, and a
server which is about three weeks old.
Comment 1 delta407 2003-02-21 15:08:58 UTC
This problem is due to a UPX-compressed executable in a directory that is being 
prelinked. jakub@redhat.com, the prelink author, has been informed of this 
matter. 
 
Consider adding such a notice to the Gentoo prelink guide. 
Comment 2 Stefan Jones (RETIRED) gentoo-dev 2003-02-21 15:53:01 UTC
OOh, many thanks I would have never found this one out.
Will add it to the howto asap.
Many thanks for the info.

Stefan
Comment 3 Rusty Phillips 2003-03-02 01:29:18 UTC
I'm not sure about that...
I'm getting that bug and I don't have UPX installed at all.
Here's an example which fails with that error:
  prelink -vmR /usr/bin/ls

Something tells me it might be more fundamental than that.  Do you think 'ls' could possibly linked to a UPX compressed executable?
Comment 4 delta407 2003-03-02 17:02:54 UTC
It's probably just a matter that prelink doesn't recognize the executable format and handles it less than gracefully. I would suggest running `emerge strace`, running `strace -o prelink.log prelink -vmR /usr/bin/ls`, and attaching the resultant prelink.log. This should help find the exact failure condition(s).
Comment 5 Rusty Phillips 2003-03-03 01:21:52 UTC
Okay, the trace gave away the problem.  It failed to understand the binary from my antivirus client, which is distributed in binary only format.  When I masked it (by masking /usr/local/bin), prelink started to work!

Perhaps something should be written about using strace to identify exactly what file is causing a problem?
Comment 6 Stefan Jones (RETIRED) gentoo-dev 2003-04-13 06:13:49 UTC
It's in the howto (about the UPX exe)
Closing