I have Ubuntu 11.10. server which suffered from power failure today. Ever since the power went back on the unit works only partially. Some services work OK, some does not start, e.g.

apache2ctl restart
Inconsistency detected by ld.so: ../sysdeps/i386/dl-machine.h: 640: elf_machine_rel_relative: Assertion `((reloc->r_info) & 0xff) == 8' failed!
Action 'restart' failed.
The Apache error log may have more information.

Segmentation fault

apt-get update
(no output)

Upon examining dmesg, apt-get segfaults as well.

[  552.996106] apt-get[1674]: segfault at 6f5104d2 ip b7655c03 sp bfd50ff0 error 6 in libapt-pkg.so.4.11.0[b7618000+117000]

So I tried to force fsck by using

sudo touch /forcefsck

and then later by

shutdown -rF now

however after both I still get

cat /var/log/fsck/check*
(Nothing has been logged yet.)
(Nothing has been logged yet.)

I am a bit lost at what to try next. I though I would just reinstall some package which might be broken, but first of all I dont know which and then I am not sure how (dpkg works though). I really want to avoid having to reinstall the whole thing. Any advice is appreciated.

  • Hmm...sounds like it is time for an OS upgrade as your version is definitely out of support. If you want something that is supported for some time use the Unbuntu LTS releases! – mdpc Mar 21 '15 at 21:13
  • I would recommend switching to server 12.04! It is a LTS release and I have found it very reliable, better than 11.10 ever was. – Dylan Mar 21 '15 at 21:38
  • Before anything else, after a power failure, I'd check the ram thoroughly. – guido Mar 21 '15 at 22:53

These different segfaults are more likely an indication of something wrong with memory or with your disc connection than with corruption of the filesystem.

You should first check the memory by rebooting and selecting the memory checker from the grub menu and let it run at least for one pass. Re-seat the memory (after switching of the power) and retry if you see errors.

If that doesn't show errors, I would boot from a CD and run full filesystem checks on each of the umounted partitions from there. During that time keep a close watch on your logs to see if there are timeouts for the discs: the data might be OK, but the transfer might somehow have errors. If you do disconnect and reconnect the cables (after power off).

  • Is that true even when the errors are always at the same place? I would expect the errors to be randomly happening here and there if the reason was as you describe. – NeverStopLearning Mar 25 '15 at 19:04

My final solution was to

1] Fix the apt-get by replacing the actual file which it said was in error (libapt-pkg.so.4.11.0) by a copy downloaded from the internet. This fixed apt-get to my great surprise. I was expecting followup errors.

2] Now that the apt-get was working, I was able to do do-dist-upgrade and replace pretty much all the packages in the system.

Still I do not understand how it could have damaged the file on disk (without fsc reporting errors).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.