How do I recover from upgrading while using bad version of gcc/binutils?

I upgraded from 9.04 to 10.10 a couple of days ago, and things are really messed up - X is crashing constantly.

Since then, I had an application segfault for no reason, when I was debugging, I found that it was strlen() that was causing the segfault (pointing to libc being the problem)! Upon investigation, I found that it was because I had a bad version of gcc and binutils installed in /usr/bin/local; I removed it, recompiled the application, and it no longer crashes.

Now, looking at my logs, I see that X is also crashing due to libc.

Backtrace: 0: /usr/bin/X11/X (xorg_backtrace+0x3b) [0x80ef31b] 1: /usr/bin/X11/X (0x8048000+0x5d00d) [0x80a500d] 2: (vdso) (__kernel_rt_sigreturn+0x0) [0xb77e240c] 3: /usr/bin/X11/X (0x8048000+0xbb0b6) [0x81030b6] 4: /usr/bin/X11/X (0x8048000+0xbc3ef) [0x81043ef] 5: /usr/bin/X11/X (0x8048000+0x26ee7) [0x806eee7] 6: /usr/bin/X11/X (0x8048000+0x1a5da) [0x80625da] 7: /lib/libc.so.6 (__libc_start_main+0xe7) [0xb750ace7] 8: /usr/bin/X11/X (0x8048000+0x1a1b1) [0x80621b1] Segmentation fault at address 0x32156654  Caught signal 11 (Segmentation fault). Server aborting 

So, how can I recover from this?

Replay

At this point, I'd be looking to rescue as many files as possible (like /home, /etc and parts of /var) and doing a clean install from a verified CD (ie check the md5 checksum of the downloaded ISO).

You might also want a dumped list of the packages that are already installed using something like this:

aptitude search -F "%p" "?installed ?not(?automatic)" > ~/package-list

Once you're on a clean system you can jimmy back in your old things, settings and applications.

If the same thing happens, run a memtest (should be an option at boot if you hold left-shift) and a fsck from the LiveCD.

Remove the bad libc from /usr/local as well. In fact, you might want to just get rid of everything in /usr/local.

Category: upgrade Time: 2011-03-11 Views: 1

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.240 (s). 12 q(s)