Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
prelink broke my system [again!]
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1776
Location: PB, Germany

PostPosted: Sun Oct 29, 2006 12:46 pm    Post subject: prelink broke my system [again!] Reply with quote

The last thing I did was prelink -Ramvq as usual. There were a lot of messages like "could not prelink because of ..dependency" which was curious enough. After that no command was possible anymore, no ls or ps, I just got "Semgentation fault".
After restart I get a kernel panic right at the beginning, something like "init 11, no handler specified".
A chroot from the universal-cd also gives "segmantation fault". init seems to be broken.

Now the only way is to copy a stage3 over and emerge -e world.

The gentoo.de prelink guide sais if few disk space is available binaries can be broken. Then one has to check the program files with "file" or "readelf". But how should that help me now?

Is there an easier way to repair the system? Should I continue using prelink afterwards?
_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770


Last edited by Massimo B. on Sat Dec 16, 2006 10:30 am; edited 3 times in total
Back to top
View user's profile Send private message
timeBandit
Bodhisattva
Bodhisattva


Joined: 31 Dec 2004
Posts: 2719
Location: here, there or in transit

PostPosted: Sun Oct 29, 2006 1:22 pm    Post subject: Re: prelink broke my system Reply with quote

paoleela wrote:
Is there an easier way to repair the system? Should I continue using prelink afterwards?

There may be easier ways but I doubt there is a safer one. In this state, you've really no way to determine which binaries are broken, so best rebuild it all.

After an experience like that, I'd certainly be reluctant to try again unless I could determine exactly what went wrong and be certain I'd fixed it. I know a lot of people swear by prelinking, but personally I've always thought it was a not terribly good idea--at least when applied to the entire system or the major portion of it. YMMV, but I didn't like it and stopped using it.
_________________
Plants are pithy, brooks tend to babble--I'm content to lie between them.
Super-short f.g.o checklist: Search first, strip comments, mark solved, help others.
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1776
Location: PB, Germany

PostPosted: Sun Oct 29, 2006 1:32 pm    Post subject: Reply with quote

Ok. But which binary could break chroot? I compared the output of file on bash and init binaries of my broken and a stage3 system.

if I could get chroot working I could do an emptyworld emerge from there without copying a stage3 over. Which branches are at least needed for chroot? Then I only copy these over:

/sbin /bin /lib ?
_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1776
Location: PB, Germany

PostPosted: Mon Oct 30, 2006 9:10 am    Post subject: Reply with quote

Actually I don't want to renounce prelinking now. Distributions like Mandriva have prelink as cronjob. They wouldn't do if that runs a risk to break the system. As for gentoo my crash must be connected with the explicit rebuild of the 4 ebuild toolchain linux-headers glibc gcc binutils and the following prelink.
_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
batistuta
Veteran
Veteran


Joined: 29 Jul 2005
Posts: 1384
Location: Aachen

PostPosted: Mon Oct 30, 2006 9:33 am    Post subject: Reply with quote

don't mean to stop the party or discourage you. But I've found that prelink didn't do anything at all on my system. And even if KDE took 5 more seconds to load, would that be worth the trouble of prelinking the whole time?

People's experience with prelink has been quite fluctuating. My advice is try it when you have time, but don't kill yourself if it doesn't work or don't have the time to set it up.
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1776
Location: PB, Germany

PostPosted: Mon Oct 30, 2006 10:43 am    Post subject: Reply with quote

Hm, setting up doesn't take much time. And a new run is only required for a new kde relase for example. So far I read in the forums also FEATURES="prelink" should work with portage.

Maybe I will exclude some parts from prelink such as the toolchain. Which parts would you recommend to exclude?
Thus only broken bins have to be reemerged.

Having a quite old laptop with 4200rpm drive, KDEs start benefits from prelink.
_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
batistuta
Veteran
Veteran


Joined: 29 Jul 2005
Posts: 1384
Location: Aachen

PostPosted: Mon Oct 30, 2006 11:11 am    Post subject: Reply with quote

I'm not discouring you to try it! I've just meant, to don't panic until you get it working. And be critical when evaluating the improvements. It might pay off, it might not. Make sure to be objective and not just rice
Back to top
View user's profile Send private message
jerry arns
Tux's lil' helper
Tux's lil' helper


Joined: 13 Dec 2003
Posts: 95
Location: France

PostPosted: Sun Dec 03, 2006 6:21 pm    Post subject: Reply with quote

Hi,

I have the exatc same problem.

I just ran "prelink -amR". After that all applications gave "segmentation fault".

I rebooted (hard reset) and now at boot time I get:

Code:

init has generated signal 11 but has no handler for it
Kernel panic - not syncing: Attemped to kill init!
<0>Rebooting in 180 seconds


How can I repair that?
_________________
Left handed, right minded.
Back to top
View user's profile Send private message
richfish
Apprentice
Apprentice


Joined: 03 Mar 2006
Posts: 202
Location: Phoenix, AZ

PostPosted: Sun Dec 03, 2006 6:40 pm    Post subject: Reply with quote

At this point you'll probably have to boot from a livecd, mount your root filesystem, and reverse the prelinking. Assuming you mount on /mnt/gentoo, you should be able to do:

cd /mnt/gentoo
chroot ./ ./usr/sbin/prelink -au

This is odd, as prelink has never caused any problems on either my x86 or amd64 systems, although I don't use the -m or -R options.
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1776
Location: PB, Germany

PostPosted: Sun Dec 03, 2006 6:47 pm    Post subject: Reply with quote

In my case I wasn't able to chroot anymore, but I didn't test to chroot with reverse prelinking as first command (which I neither was aware of that reverse prelinking exists).
Sounds promising, I will remember next time. I only prelink after system backup now.
_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
jerry arns
Tux's lil' helper
Tux's lil' helper


Joined: 13 Dec 2003
Posts: 95
Location: France

PostPosted: Sun Dec 03, 2006 8:54 pm    Post subject: Reply with quote

Thanks for your answer. I tried your suggestion but:

chroot /mnt/gentoo /usr/sbin/prelink -au

doesn't do anything.

chroot /mnt/gentoo /bin/bash

gives segmentation fault.

How did you do, paoleela ?
_________________
Left handed, right minded.
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1776
Location: PB, Germany

PostPosted: Sun Dec 03, 2006 9:07 pm    Post subject: Reply with quote

I know that seg fault well.
I did one week of emptytree emerge on a stage3 using my old worldfile.
_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
jerry arns
Tux's lil' helper
Tux's lil' helper


Joined: 13 Dec 2003
Posts: 95
Location: France

PostPosted: Sun Dec 03, 2006 10:23 pm    Post subject: Reply with quote

A full re-install is a Zindoz$ solution and I didn't choose Linux to have to do that. Should I have to do that, I'd install MacOSX instead of re-emerging everything (1 hour against 1 week).

Surely only a few binaries need to be replaced, after which I can prelink -au ?

Can I just copy the stage3 tarball, prelink -au and then emerge -e system ?
does the stage 3 tarball contain only system ?
_________________
Left handed, right minded.
Back to top
View user's profile Send private message
richfish
Apprentice
Apprentice


Joined: 03 Mar 2006
Posts: 202
Location: Phoenix, AZ

PostPosted: Mon Dec 04, 2006 5:49 am    Post subject: Reply with quote

jerry arns wrote:
Thanks for your answer. I tried your suggestion but:

chroot /mnt/gentoo /usr/sbin/prelink -au

doesn't do anything.


I can only think of one other thing to try:

chroot /mnt/gentoo /usr/sbin/prelink -u /bin/* /sbin/* /usr/bin/* /usr/sbin/*

That might at least get you back to the point of being able to boot, and you can try the prelink -au again.

It's also possible that the binaries/libraries are now just corrupt, in which case there isn't much you can do but restore from a backup or reinstall.

If you happened to have buildpkg in FEATURES, you should have a good set of binary packages available to rebuild quickly from.
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1776
Location: PB, Germany

PostPosted: Sat Dec 16, 2006 10:17 am    Post subject: prelink broke my system again! Reply with quote

Now after the huge crash, I had my system ready again. I did backups now, I tried prelink again.
It broke my system again!

At the moment I'm still inside but can't start any new command. This browser here still works.

Now about your hints and ideas:
Code:
# /usr/sbin/prelink -u /bin/* /sbin/* /usr/bin/* /usr/sbin/*
....
/usr/sbin/prelink: /usr/sbin/vigr does not have .gnu.prelink_undo section
/usr/sbin/prelink: /usr/sbin/vipw does not have .gnu.prelink_undo section
/usr/sbin/prelink: /usr/sbin/visudo does not have .gnu.prelink_undo section
/usr/sbin/prelink: "/usr/sbin/webapp-cleaner" is not an ELF file
/usr/sbin/prelink: "/usr/sbin/webapp-config" is not an ELF file
/usr/sbin/prelink: /usr/sbin/winbindd does not have .gnu.prelink_undo section
/usr/sbin/prelink: /usr/sbin/wwwoffled does not have .gnu.prelink_undo section
/usr/sbin/prelink: "/usr/sbin/xconv.pl" is not an ELF file
/usr/sbin/prelink: /usr/sbin/xinetd does not have .gnu.prelink_undo section
/usr/sbin/prelink: /usr/sbin/Xorgautoconfig does not have .gnu.prelink_undo section
/usr/sbin/prelink: "/usr/sbin/yabootconfig" is not an ELF file
/usr/sbin/prelink: "/usr/sbin/ybin" is not an ELF file
/usr/sbin/prelink: /usr/sbin/zdump does not have .gnu.prelink_undo section
/usr/sbin/prelink: /usr/sbin/zic does not have .gnu.prelink_undo section

# prelink -au
....
prelink: /usr/bin/xdelta: Dependency tracing failed
prelink: /usr/bin/picttoppm: Dependency tracing failed
prelink: /usr/bin/bg5conv: Dependency tracing failed
prelink: /usr/bin/xfs_db: Dependency tracing failed
prelink: /usr/bin/xfs_io: Dependency tracing failed
prelink: /usr/bin/vcdxbuild: Dependency tracing failed
prelink: /usr/bin/xglyph: Dependency tracing failed
prelink: /usr/bin/icontopbm: Dependency tracing failed
prelink: /usr/bin/pamchannel: Dependency tracing failed
....

So please, what should I do this time?
Why does prelink fail on my fresh system (ppc), it was working here once, and it is still without problems on my x86 systems.
_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
jerry arns
Tux's lil' helper
Tux's lil' helper


Joined: 13 Dec 2003
Posts: 95
Location: France

PostPosted: Sat Dec 16, 2006 11:08 am    Post subject: Reply with quote

Interesting, my system is also a PPC (iBook).

I booted from a live CD, and copied the stage 3 tarball over my installation. I was then able to boot and issue a prelink -au.

Unfortunatly, this left the system in a state where I could emerge anything, emerge failing at postrm() stage.

After looking around a little bit, I decided to re-install from scratch, saving my /home and /etc.

Emerging the whole thing was done in less than 3 days, and my system is so much faster than before, I just can't believe it. When I upgraded from gcc3 to gcc4, it took more than a day to recompile KDE while during re-install it took less than a night!

Anyway, I didn't tried prelink again, and after what you wrote, I won't!
_________________
Left handed, right minded.
Back to top
View user's profile Send private message
Gergan Penkov
Veteran
Veteran


Joined: 17 Jul 2004
Posts: 1464
Location: das kleinste Kuhdorf Deutschlands :)

PostPosted: Sat Dec 16, 2006 11:23 am    Post subject: Reply with quote

I don't think you need to chroot to unprelink binaries, I would recommend to unprelink directly certain libs and bins - bash, glibc and after that to try to uprelink the whole system.
In fact prelink adds only a section in the binaries, it should be easy to remove it - or have some variable, that prevents the loader from using it :)
_________________
"I knew when an angel whispered into my ear,
You gotta get him away, yeah
Hey little bitch!
Be glad you finally walked away or you may have not lived another day."
Godsmack
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1776
Location: PB, Germany

PostPosted: Sat Dec 16, 2006 11:34 am    Post subject: Reply with quote

@jerry arns: As for your system speed up, that could just be a *better* fragmentation or better CFLAGS then before. Anyway. As I said a complete reinstall would take me over 1 week. Maybe your iBook is faster. I'm looking for ppc people who are running prelink fine or I will send a ppc bugreport about prelink.

For recovering I did restore /bin /sbin /usr/bin /usr/sbin from backup. # ls command still didn't work. I also had to restore /lib to get ls working. I wasn't aware that prelink also touches libraries?

Now I restore complete /usr for /usr/kde and /usr/qt. I had a static binary of my backup tool dar on the backup medium.

@Gergan Penkov: prelink was the only binary still working. So I tried prelink -au on the running system as I said. Any idea why unprelink failed?
_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
Gergan Penkov
Veteran
Veteran


Joined: 17 Jul 2004
Posts: 1464
Location: das kleinste Kuhdorf Deutschlands :)

PostPosted: Sat Dec 16, 2006 12:05 pm    Post subject: Reply with quote

Sorry I didn't look at your last post with the messages, before posting:
Quote:
/usr/sbin/prelink: /usr/sbin/vigr does not have .gnu.prelink_undo section

This does not look very good, you are missing the undo-section - so there seems to be more than one section created - at least two and it seems to be a serious bug in prelink.
As for prelink making things faster, it is quite possible, but it fragments extremely the harddisk as it must overwrite almost all the files on the harddisk after updates and on gentoo this means often. (also it is not that simple it will refresh the linking information on bins/libs when the libs on which they depend have been changed...) That's why a don't use it - as-needed, hash-style and the hidden visibillity (this is used by default on some heavyweights - firefox, openoffice and such) will provide you with enough startup speedup
_________________
"I knew when an angel whispered into my ear,
You gotta get him away, yeah
Hey little bitch!
Be glad you finally walked away or you may have not lived another day."
Godsmack
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1776
Location: PB, Germany

PostPosted: Sat Dec 16, 2006 12:29 pm    Post subject: Reply with quote

Interesting that you call that a serious bug.
Remember, this time I ran prelink it was on completely fresh binaries after the last reinstall.

To avoid fragmentation my reiserfs won't be the best solution but for portage with all the small file it gave me best performance. I'll think about XFS next time since it handles fragmentation better and also has a defrag tool.

I'm not running prelink often after every emerge, only after an kde upgrade. Stable kde doesn't switch anymore that often like it was on earlier gentoo releases. Prelink also has --quick that looks for changed binaries only.

In your last sentence did you mean this?
Code:
CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden"
USE="kdehiddenvisibility"

_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
Gergan Penkov
Veteran
Veteran


Joined: 17 Jul 2004
Posts: 1464
Location: das kleinste Kuhdorf Deutschlands :)

PostPosted: Sat Dec 16, 2006 12:44 pm    Post subject: Reply with quote

Directly sticking the hidden-flags is not the best idea, as I said most of the pgks, handle this on their own - as I said firefox, openoffice, ffmpeg and such will use it if the configure finds out that you are using recent enough gcc. KDE has the use flag, which is strange as the qt does not have such flag, but will decide on configure :)
well I called it bug as it seems that it does not generate the needed information to revert the prelink-process and prelink-process seems to be leading to unfunctional system - if this is not a serious bug :)
_________________
"I knew when an angel whispered into my ear,
You gotta get him away, yeah
Hey little bitch!
Be glad you finally walked away or you may have not lived another day."
Godsmack
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1776
Location: PB, Germany

PostPosted: Sat Dec 16, 2006 1:01 pm    Post subject: Reply with quote

First step to a bugreport.
Generally they don't like links to the forums but don't know how to tackle that better.
_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
Gergan Penkov
Veteran
Veteran


Joined: 17 Jul 2004
Posts: 1464
Location: das kleinste Kuhdorf Deutschlands :)

PostPosted: Sat Dec 16, 2006 1:17 pm    Post subject: Reply with quote

8)
just reopen the bug with emerge --info, the prelink verson and the messages you receive:)
_________________
"I knew when an angel whispered into my ear,
You gotta get him away, yeah
Hey little bitch!
Be glad you finally walked away or you may have not lived another day."
Godsmack
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1776
Location: PB, Germany

PostPosted: Sat Dec 16, 2006 4:12 pm    Post subject: Reply with quote

Good news. sys-devel/prelink-20060712-r1 seems to work.
It brings also a cron script which does fancy things on /etc/prelink.cache. So I trusted the new prelink, configured /etc/conf.d/prelink and started the script manually, I had nothing to loose with my backup.

System is functional. The new prelink should replace the old ebuild (which isn't stable in my eyes).
_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1611
Location: U.S.A.

PostPosted: Fri Mar 23, 2007 6:38 pm    Post subject: Reply with quote

paoleela,

Prelink-20060712-r1 still working ok for you on ppc?

I see it's still in ~ status and want to check before I do it. It has worked fine for me on x86, but the last time I tried it on ppc it destroyed by system.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum