Mailing List Archive

repair of a seg-faulting bin-utils
Help!

The last update I did built/installed bin-uitls. It is now producing
seg-faults. I forgot to make a quickpkg of the old bin-utils before
upgrading.

Added problem, dead optical drive. No cdrom/dvd or bluray.

How can I fix this without having to reinstall from scratch?
Re: repair of a seg-faulting bin-utils [ In reply to ]
On 2022-10-26, Corbin <corbinbird@charter.net> wrote:
> Help!
>
> The last update I did built/installed bin-uitls. It is now producing
> seg-faults. I forgot to make a quickpkg of the old bin-utils before
> upgrading.

The first thing I would do is run a RAM test overnight. IME,
segfaulting binutils or gcc has usually been a hardware problem.

--
Grant
Re: Re: repair of a seg-faulting bin-utils [ In reply to ]
On Wed, Oct 26, 2022 at 12:24 PM Grant Edwards
<grant.b.edwards@gmail.com> wrote:
>
> On 2022-10-26, Corbin <corbinbird@charter.net> wrote:
> > Help!
> >
> > The last update I did built/installed bin-uitls. It is now producing
> > seg-faults. I forgot to make a quickpkg of the old bin-utils before
> > upgrading.
>
> The first thing I would do is run a RAM test overnight. IME,
> segfaulting binutils or gcc has usually been a hardware problem.

Bad disk is obviously another possible issue (saw that on a pi
sdcard), but I'd definitely be testing that RAM. Really if you suspect
bad RAM it is worth your trouble to just shut down ASAP and test that,
because every minute with bad RAM is potentially corrupted files on
your hard drive, and rework even if you have a good backup.

Another possible issue is bad -march settings. That usually is an
issue if you change your CPU and boot off of an existing hard drive.
If you're going to upgrade your CPU you should rebuild all of @system
(at least) with -march set to something very minimal. Don't assume
that a newer CPU does everything an existing one does - they sometimes
do drop instructions. You can set -mcpu to whatever you want, as a
bad -mcpu will only cause minor performance issues.

--
Rich
Re: Re: repair of a seg-faulting bin-utils [ In reply to ]
On Wed, 2022-10-26 at 14:37 -0400, Rich Freeman wrote:
> Another possible issue is bad -march settings.  That usually is an
> issue if you change your CPU and boot off of an existing hard drive.
> If you're going to upgrade your CPU you should rebuild all of @system
> (at least) with -march set to something very minimal.  Don't assume
> that a newer CPU does everything an existing one does - they sometimes
> do drop instructions.  You can set -mcpu to whatever you want, as a
> bad -mcpu will only cause minor performance issues.

Further reading on this:

https://wiki.gentoo.org/wiki/Safe_CFLAGS

I've always used this as a reference for helping ensure make.conf is
not only going to be well optimized, but produce reliable binaries.