| View previous topic :: View next topic |
| Author |
Message |
yaneurabeya Veteran


Joined: 13 May 2004 Posts: 1754 Location: Silicon Valley
|
Posted: Sun Nov 13, 2005 7:42 am Post subject: System borked after glibc-2.3.6 upgrade |
|
|
So, I upgraded my system with the newest gmp, timezone-info, and something else, then upgraded glibc (was going to do a toolchain compile), and I received the following error:
| Code: | --- !empty dir /usr
--- !empty dir /sbin
--- !empty dir /lib
--- !empty dir /etc
--- !targe sym /usr/lib/libthread_db.so
--- !targe sym /usr/lib/libbsd.a
--- !targe sym /lib/libthread_db.so.1
Traceback (most recent call last):
File "/usr/bin/emerge", line 3200, in ?
mydepgraph.merge(mydepgraph.altlist())
File "/usr/bin/emerge", line 1966, in merge
retval=unmerge("clean", [xsplit[0]])
File "/usr/bin/emerge", line 2251, in unmerge
retval=portage.unmerge(mysplit[0],mysplit[1],portage.root,mysettings,unmerge_action not in ["clean","prune"])
File "/usr/lib/portage/pym/portage.py", line 2901, in unmerge
mylink.unmerge(trimworld=mytrimworld,cleanup=1)
File "/usr/lib/portage/pym/portage.py", line 6336, in unmerge
a=doebuild(myebuildpath,"postrm",self.myroot,self.settings,use_cache=0,tree="vartree")
File "/usr/lib/portage/pym/portage.py", line 2611, in doebuild
return spawn(EBUILD_SH_BINARY+" "+mydo,mysettings,debug=debug,free=1,logfile=logfile)
File "/usr/lib/portage/pym/portage.py", line 1603, in spawn
return portage_exec.spawn_bash(mystring,env=env,**keywords)
File "/usr/lib/portage/pym/portage_exec.py", line 48, in spawn_bash
return spawn(args,env=env,opt_name=opt_name,**keywords)
File "/usr/lib/portage/pym/portage_exec.py", line 164, in spawn
raise str(e)+":\n "+myc+" "+string.join(myargs)
[Errno 2] No such file or directory:
/bin/bash [glibc-2.3.5.20050722] bash -c /usr/lib/portage/bin/ebuild.sh postrm
close failed: [Errno 9] Bad file descriptor
!!! FAILED postrm: 1
sprsd gman # emerge clean
bash: /usr/bin/emerge: /usr/bin/python: bad interpreter: No such file or directory |
So, basically all commands terminate prematurely in a similar fashion to the way shown above with python (ie "No such file or directory"), and I cannot login with secondary accounts or access my system at all besides what is currently open in memory-unless it forks off and calls another process, which is an issue as I think that the thread library may be toast now.
So, what I'm wondering is if someone has any ideas for what is going on and how I can possibly fix this, DEVOID reinstalling from scratch and restarting (I really don't want to restart since I can't login from another tty).
All that I can remember information wise about my system is that I am running gentoo-sources on a i686 architecture, I have gcc-4.0.2-r1 set as my primary compiler (and it was compiling glibc at the time), with 3.3.6 and 3.4.4 as backups. I am running the latest python and portage, and was running the latest stable glibc-2.3.5 branch before this occurred. I would give my CCFLAGs if I could access cat or vim, but I can't right now; all that I can remember is that I had them set to -O3 with -march=pentium4 with "-funrolloops, -msse, -msse2, -fpfmath=sse,387", etc.
Thank you very much for your help. I REALLY do appreciate anything that can be done for my issue.
Note: This applies to all paths that one would expect to work (/usr/, /usr/sbin/, /bin, /sbin, etc).
edit:
Sounds like someone else had the same issue as I did, but I really don't want to resort to what he did if possible: http://forums.gentoo.org/viewtopic-t-396868-highlight-bash+directory.html _________________ Got FreeBSD? |
|
| Back to top |
|
 |
Tiger683 Veteran


Joined: 08 Jan 2005 Posts: 1347 Location: Heffner's House
|
Posted: Sun Nov 13, 2005 8:23 am Post subject: |
|
|
Ok, let's just omit the fact that you:
edited the ebuild that was setup to fail on current portage versions disregarding the message coming up (and you stumbled uponexactly the mentioned bug) AND you use a compiler that isn't supported by gentoo...
Did you do a backup of your previous glibc (which should be done anyways at such an upgrade ...) ?
The other things i could think about are, you should grab yourself a box with glibc-2.3.5, quickpkg it in there and get it somehow onto this box, but then you still would have to be able to chroot or something, or at least use basic system commands to unpack the glibc onto the b0rked machine bruteforce-style...
EDIT: ok , forget it what i said..
get yourself a livecd,
boot from it, and try doing it like LFS does:
mount your filesystem under /mnt/gentoo (and all other partitions that your system mounts on boot), make a directory called tools in there, and unpack a stage3 tarball in there. Then, edit the PATH variable on your system adding /tools/bin:/tools/usr/bin to the END of root's path. then try chrooting into your system with /tools/bin/bash instead of /bin/bash.
maybe now you will be able to rebuild a sane glibc (2.3.5)....
after that, emerge -e system && emerge -e world ofcourse.... _________________ Retired gentoo user
Last edited by Tiger683 on Sun Nov 13, 2005 8:34 am; edited 2 times in total |
|
| Back to top |
|
 |
yaneurabeya Veteran


Joined: 13 May 2004 Posts: 1754 Location: Silicon Valley
|
Posted: Sun Nov 13, 2005 8:27 am Post subject: |
|
|
Well, things were going great with gcc-4.0.2, so I didn't think that sticking with it mattered, but for some odd reason the upgrade prompted for me to install glibc-2.3.6, which I thought had made it into a more beta stage from the alpha stage it was previously in when I last was paying attention to Gentoo maintainence information on a more routine basis.
In essence it seems as if I have no choice I suppose but just reboot, go into the livecd and try emerge'ing glibc 2.3.5. *sigh*. Powering down is not going to be nice...
Note: I didn't edit any ebuilds, unless the previous version was phased out between when I first sync'ed it and now. _________________ Got FreeBSD? |
|
| Back to top |
|
 |
Tiger683 Veteran


Joined: 08 Jan 2005 Posts: 1347 Location: Heffner's House
|
Posted: Sun Nov 13, 2005 8:32 am Post subject: |
|
|
i just edited my previous post, read it..... _________________ Retired gentoo user |
|
| Back to top |
|
 |
Halcy0n Developer


Joined: 17 Sep 2003 Posts: 1682 Location: Freehold, NJ
|
Posted: Sun Nov 13, 2005 8:33 am Post subject: |
|
|
Just do:
| Code: | ldconfig
emerge glibc |
Should be fine. _________________ Mark Loeser
http://www.halcy0n.com |
|
| Back to top |
|
 |
fredor Tux's lil' helper


Joined: 13 Oct 2003 Posts: 84 Location: UK
|
Posted: Sun Nov 13, 2005 1:50 pm Post subject: |
|
|
| Had the same problem and 'ldconfig' put me back on track. |
|
| Back to top |
|
 |
ferg Guru


Joined: 15 Nov 2002 Posts: 409 Location: Cambridge, UK
|
Posted: Sun Nov 13, 2005 2:16 pm Post subject: |
|
|
hi,
by "ldconfig" I assume that you mean booting from a rescue CD and running it?
I don't suppose there's a way to run this from a booted borked system?
Cheers
Ferg
I see that ldconfig will run, but I cannot su or sudo to run it!! _________________ Climb up it, kayak down it + make sure it runs on GNU/Linux
"cease to exist, giving my goodbye, drive my car into the ocean,
you think I'm dead, but i sail away, on a wave of mutilation!" |
|
| Back to top |
|
 |
Braveman n00b

Joined: 07 Apr 2005 Posts: 1
|
Posted: Sun Nov 13, 2005 2:24 pm Post subject: |
|
|
i had a similar system working (gcc 4.0.2*, glibc 2.3.5). the usual 'emerge -avuDt world' wanted to upgrade to glibc 2.3.6 (it's the third digit that changed so i didn't bother). did so and got the same results: even init didn't work anymore and chroot can't work because of broken /bin/bash.
my solution (also thanks to your posts) was:
| Code: | emerge -av sash (on an working system)
cp .../sash /path/to/broken/system
chroot /path/to/broken/system/sash
ldconfig
|
and everything was fine again... puuhh ;-) |
|
| Back to top |
|
 |
fredor Tux's lil' helper


Joined: 13 Oct 2003 Posts: 84 Location: UK
|
Posted: Sun Nov 13, 2005 2:54 pm Post subject: |
|
|
| I was running as root and had no difficulty running 'ldconfig' immediately after the error. I then just completed the emerge. |
|
| Back to top |
|
 |
ferg Guru


Joined: 15 Nov 2002 Posts: 409 Location: Cambridge, UK
|
Posted: Sun Nov 13, 2005 4:25 pm Post subject: |
|
|
| fredor wrote: | | I was running as root and had no difficulty running 'ldconfig' immediately after the error. I then just completed the emerge. |
hehe. That's my problem. I am logged on as a normal; user, and cannot get to root!!!
I was running emerge using sudo.
Oh well. Looks like a reboot is needed!
Cheers
Ferg _________________ Climb up it, kayak down it + make sure it runs on GNU/Linux
"cease to exist, giving my goodbye, drive my car into the ocean,
you think I'm dead, but i sail away, on a wave of mutilation!" |
|
| Back to top |
|
 |
Genone Retired Dev


Joined: 14 Mar 2003 Posts: 8656 Location: beyond the rim
|
Posted: Sun Nov 13, 2005 4:40 pm Post subject: |
|
|
| In case anyone wants to know the gory details (no bugspam please), this is bug 112082 |
|
| Back to top |
|
 |
ferg Guru


Joined: 15 Nov 2002 Posts: 409 Location: Cambridge, UK
|
Posted: Sun Nov 13, 2005 6:31 pm Post subject: |
|
|
| Braveman wrote: |
| Code: | emerge -av sash (on an working system)
cp .../sash /path/to/broken/system
chroot /path/to/broken/system/sash
ldconfig
|
and everything was fine again... puuhh  |
Great work everybody!!! and imagine, I never even know about SASH before. I'll remember it now!!
I booted using sash as my initial process
| Code: | | test init=/bin/sash |
I remounted the root filesystem
| Code: | | -mount -m /dev/sda2 / |
then ran ldconfig
worked a charm!!!
Thanks!! _________________ Climb up it, kayak down it + make sure it runs on GNU/Linux
"cease to exist, giving my goodbye, drive my car into the ocean,
you think I'm dead, but i sail away, on a wave of mutilation!" |
|
| Back to top |
|
 |
yaneurabeya Veteran


Joined: 13 May 2004 Posts: 1754 Location: Silicon Valley
|
Posted: Sun Nov 13, 2005 9:44 pm Post subject: |
|
|
Unfortunately it's moot now since I already started doing a stage 1 again (have my world file and a few other conf files to run off of as well as my /home dir and others, so I will be able to solve this issue.
Turns out that gcc-4.0.2 does not require glibc to be unmasked -*, and the latest -* package was glibc-2.3.6, so that is why this whole thing occurred *sigh*. I was going to redo my kernel anyhow, so bleh...
Should have known that I could have just run the linker config and everything would have been fine =\... _________________ Got FreeBSD? |
|
| Back to top |
|
 |
CAVE-MAN n00b

Joined: 09 Jun 2004 Posts: 4
|
Posted: Tue Dec 05, 2006 7:17 pm Post subject: |
|
|
| Just bumping this, as I'm seeing it on an amd64 box. emerge'd a single package to help a world merge along and autoclean hosed the system. I'm doing this remotely so I can't fix the machine until later this evening(GMT-6). |
|
| Back to top |
|
 |
|
|
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
|
|