Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 71024 - prelink no longer prelinks
Summary: prelink no longer prelinks
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-12 17:08 UTC by Surakshan Mendis
Modified: 2005-02-14 22:53 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Surakshan Mendis 2004-11-12 17:08:06 UTC
I'm almost certain my prelink is not actually prelinking.
I've follwed the prelink guide and it work, I got the obvious nvidia errors etc..At the time I confirmed prelinked by running

prelink -y /usr/bin/xchat-2

which if I understand correctly should cleanly return to the console if it is prelinked. If not then it will spam stuff to the console. It returned cleanly.

More recently when I ram prelink -afmR (as root) I see disk activity, then it returns to the console in about 5 to 10 seconds. I don't think it can happen this quick. 

Things I've done to confirm:
root@synapse sura # prelink -fmR /usr/bin/xchat-2
root@synapse sura # prelink -u /usr/bin/xchat-2
prelink: /usr/bin/xchat-2 does not have .gnu.prelink_undo section

Looking at the above, the first command didn't prelink the xchat binary. Now I believe the same thing is happening when I try do the entire system

I've remerged prelink, as well, same result. I thought perhaps it was doing it quick because of /etc/prelink.cache. In my stupitidy I deleted this file. The problem persists and it is no longer created either.

I'll post the /etc/prelink.conf file 

Reproducible: Always
Steps to Reproduce:
1. prelink -afmR

Actual Results:  
returns to console as if it worked, but doesn't seem to have prelinked anything

Expected Results:  
a prelinked binary of given file or system

emerge info
Portage 2.0.51-r3 (default-linux/x86/2004.0, gcc-3.3.4, glibc-2.3.4.20040808-r1,
 2.6.9 i686)
=================================================================
System uname: 2.6.9 i686 Intel(R) Pentium(R) 4 CPU 2.66GHz
Gentoo Base System version 1.4.16
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.14.90.0.8-r1
Headers:  sys-kernel/linux26-headers-2.6.8.1
Libtools: sys-devel/libtool-1.5.2-r5
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=pentium4 -funroll-loops -fprefetch-loop-arrays -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2
/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /
usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -funroll-loops -fprefetch-loop-arrays -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="ftp://mirror.pacific.net.au/linux/Gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X alsa apm arts avi berkdb bitmap-fonts cdr crypt cups divx4linux eds encod
e esd f77 fam flac foomaticdb fortran gdbm gif gnome gpm gstreamer gtk gtk2 hal
imagemagick imlib java jpeg junit libg++ libwww lirc mad mikmod motif mpeg mysql
 ncurses nls nptl oggvorbis opengl oss pam pdflib perl png ppds python quicktime
 readline samba sdl slang spell sqlite ssl svga tcltk tcpd tiff truetype x86 xml
 xml2 xv xvid zlib"
Comment 1 Surakshan Mendis 2004-11-12 17:08:50 UTC
Here is my prelink.conf

cat /etc/prelink.conf
# prelink.conf autogenerated by env-update; make all changes to
# contents of /etc/env.d directory
-l /bin
-l /sbin
-l /usr/bin
-l /usr/sbin
-l /lib
-l /usr/lib
-h /usr/local/lib
-h /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4
-h /usr/lib/gcc/i686-pc-linux-gnu/3.4.3
-h /usr/lib/gcc/i686-pc-linux-gnu/3.4.3
-h /usr/lib/gcc/i686-pc-linux-gnu/3.4.3
-h /usr/lib/opengl/nvidia/lib
-h /usr/lib/MozillaFirefox
-h /usr/X11R6/lib64
-h /usr/X11R6/lib
-h /opt/sun-jdk-1.4.2.06/jre/lib
-h /usr/qt/3/lib
-h /usr/kde/3.3/lib
-h /usr/kde/3.2/lib
-h /usr/lib/speech-tools/lib
-h /usr/games/lib
-h /usr/lib/libstdc++-v3/
-h /usr/local/bin
-h /opt/bin
-h /usr/i686-pc-linux-gnu/gcc-bin/3.3
-h /usr/X11R6/bin
-h /opt/sun-jdk-1.4.2.06/bin
-h /opt/sun-jdk-1.4.2.06/jre/bin
-h /opt/sun-jdk-1.4.2.06/jre/javaws
-h /usr/qt/3/bin
-h /usr/kde/3.3/bin
-h /usr/kde/3.2/bin
-h /usr/games/bin
-h /opt/vmware/bin
-b /usr/lib/wine
-b /usr/lib/valgrind
Comment 2 Surakshan Mendis 2004-11-13 22:46:52 UTC
Okay I've solved the problem, Might be worth while looking into the cause.
Some of the speculated "checks" in the original bug may be wrong but the bug "result" was correct, ie, system/file doesn't prelink but prelink exits without error (in seconds).

--solution--
I ended up running an strace on the prelink command, I redirected stdout and stderr to a text file. After analysing several mb of data I found this link... 

stat64("/usr/lib/MozillaFirefox/plugins/clearjavaplugin_oji.so", 0xbfffec50) = -1 ELOOP (Too many levels of symbolic links)

I visted the location:

root@synapse sura # ls /usr/lib/MozillaFirefox/plugins/clearjavaplugin_oji.so
ls: /usr/lib/MozillaFirefox/plugins/clearjavaplugin_oji.so: Too many levels of symbolic links


a directory listing showed something disasterous (well strange)
I've just shown the important part.


root@synapse sura # ls -al /usr/lib/MozillaFirefox/plugins/
lrwxrwxrwx  1 root root    22 Oct 21 20:31 clearjavaplugin_oji.so -> clearjavaplugin_oji.so


I deleted this, its a circular link (a link linking to it self).

Ran prelink again and I'm pleased to say it worked.

This clearly happened after I compiled firefix 1.0.
Comment 3 Botykai Zsolt 2005-02-10 23:33:56 UTC
Got almost the same problem but not with that file. So I traced too, and it was /usr/lib/lib (symlink to itself). Checked what had done this, but qpkg couldn't found.
What the heck?
Comment 4 Surakshan Mendis 2005-02-11 00:22:22 UTC
I'm don't have a /usr/lib/lib so thats interesting. I guess you already have deleted the link. That will probably fix it, as to what caused it, I'm, not sure
Comment 5 Botykai Zsolt 2005-02-14 21:32:18 UTC
Of course I deleted the pointless /usr/lib/lib symlink.
But IMHO this isn't a coorect behaviour of 'prelink'. It should have "tell" to Joe (beginner) user, that it had had some probelem, cause most of the time Joe doesn't know (and care) about exit codes. Should I fill an another bug-report?
Comment 6 Surakshan Mendis 2005-02-14 22:53:30 UTC
you're right, and one wastes considerable time trying to find the file that that is breaking it. It's not a bug, its a feature request at best, perhaps aimed at upstream devs but don't submit a bug as upstream from here.