Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Jun 2004 07:41:39 -0700 (PDT)
From:      David Wolfskill <david@catwhisker.org>
To:        stable@freebsd.org
Subject:   ld-elf.so.1: assert failed: /usr/src/libexec/rtld-elf/i386/reloc.c:232
Message-ID:  <200406131441.i5DEfdfg000712@bunrab.catwhisker.org>

next in thread | raw e-mail | index | archive | help
This doesn't look good....

Every couple of weeks, I upgrade my two "production" machines here
at home to a freshly-built -STABLE -- after having tracked -STABLE
daily, both on my laptop and on the "build" machine (neither of
which is one of the "production" ones).

For over 2.5 years, this has worked well.

Today, I had no problem with one of them (internal mail; externally-
visible Web server), but the firewall box behaved oddly, and on reboot,
displayed the message in the Subject when I logged in:

	ld-elf.so.1: assert failed: /usr/src/libexec/rtld-elf/i386/reloc.c:232

Looking at the code in question has not helped illuminate the situation:

     221 /* Process the PLT relocations. */
     222 int
     223 reloc_plt(Obj_Entry *obj)
     224 {
     225     const Elf_Rel *rellim;
     226     const Elf_Rel *rel;
     227 
     228     rellim = (const Elf_Rel *)((char *)obj->pltrel + obj->pltrelsize);
     229     for (rel = obj->pltrel;  rel < rellim;  rel++) {
     230         Elf_Addr *where;
     231 
     232         assert(ELF_R_TYPE(rel->r_info) == R_386_JMP_SLOT);
     233 
     234         /* Relocate the GOT slot pointing into the PLT. */
     235         where = (Elf_Addr *)(obj->relocbase + rel->r_offset);
     236         *where += (Elf_Addr)obj->relocbase;
     237     }
     238     return 0;
     239 }

(That's a cut/paste from src/libexec/rtld-elf/i386/reloc.c 1.6.2.2, dated
2002/06/16 20:02:09 dillon.)

Now, the machine runs headless -- always has, since I set it up.

The saving grace is that I flip between bootable slices; gong back
to slice 1 and logging in, I see:

|d146(4.10-S)[1] _ssh admin@janus
|Last login: Sun Jun 13 06:54:27 2004 from d146.catwhisker
|Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
|        The Regents of the University of California.  All rights reserved.
|
|FreeBSD 4.10-STABLE (JANUS) #68: Sun May 30 05:38:48 PDT 2004
|
|Welcome to FreeBSD!
|
|Before seeking technical support, please use the following resources:
|
|o  Security advisories and updated errata information for all releases are
|   at http://www.FreeBSD.org/releases/ - always consult the ERRATA section
|   for your release first as it's updated frequently.
|
|o  The Handbook and FAQ documents are at http://www.FreeBSD.org/ and,
|   along with the mailing lists, can be searched by going to
|   http://www.FreeBSD.org/search/.  If the doc distribution has
|   been installed, they're also available formatted in /usr/share/doc.
|
|If you still have a question or problem, please take the output of
|`uname -a', along with any relevant error messages, and email it
|as a question to the questions@FreeBSD.org mailing list.  If you are
|unfamiliar with FreeBSD's directory layout, please refer to the hier(7)
|man page.  If you are not familiar with man pages, type `man man'.
|
|You may also use /stand/sysinstall to re-enter the installation and
|configuration utility.  Edit /etc/motd to change this login announcement.
|
|janus(4.10-S)[1] 
|
|

If I boot from the newly-built-and-installed kernel & world, I see:

|d146(4.10-S)[1] _ssh admin@janus
|Last login: Sun Jun 13 06:51:46 2004 from d146.catwhisker
|Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
|        The Regents of the University of California.  All rights reserved.
|
|FreeBSD 4.10-STABLE (JANUS) #69: Sun Jun 13 06:04:04 PDT 2004
|ld-elf.so.1: assert failed: /usr/src/libexec/rtld-elf/i386/reloc.c:232
|janus(4.10-S)[1] 
|

I have placed a copy of the kernel config at
http://www.catwhisker.org/~david/FreeBSD/debug/JANUS, in case that
may prove of interest.  It was last updated 02 Nov 2002.

One possibly-salient bit of information is that the CPUs aren't all
the same type.  (Thus, I avoid CPU-specific optimizations -- at least,
that is my intent!)  What I have:

* Build machine: 2x876 MHz PIII (SMP)
  CPU: Intel Pentium III (876.40-MHz 686-class CPU)
    Origin = "GenuineIntel"  Id = 0x68a  Stepping = 10
    Features=0x383fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE>

* Web server:      400 MHz AMD-K6 (UP)
  CPU: AMD-K6(tm) 3D processor (400.91-MHz 586-class CPU)
    Origin = "AuthenticAMD"  Id = 0x58c  Stepping = 12
    Features=0x8021bf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8,PGE,MMX>
    AMD Features=0x80000800<SYSCALL,3DNow!>

* Firewall:        150 MHz P54C (UP)
  CPU: Pentium/P54C (149.69-MHz 586-class CPU)
    Origin = "GenuineIntel"  Id = 0x52c  Stepping = 12
    Features=0x1bf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8>

I admit that the firewall box isn't super-fast, but it's generally adequate
for a WAN link (as well as some additional duties. such as NAT).

The general approach is on the build machine:
*  do the usual build world, build/install the kernel, mergemaster -p,
   install world, mergemaster, reboot.  Reality check, "portupgrade -p".
  
Assuming that all went OK:

* On each of the 2 production machines:
  
  - mount the build machine's /usr/src and /usr/obj read-only on the
    target boxen; install kernel; mergemaster -p; install world;
    mergemaster; reboot.  Reality check.  If OK, "portupgrade -P" (using
    packages built on build machine when possible).


This morning, that last "mergemaster" run on the firewall box got
an "Illegal instruction" attempting to issue "chflags -R noschg
/var/tmp/temprooot" -- or so I infer because when I saw the "Illegal
instruction" message (followed by whines about the directory not
being empty), I tried issuing that command manually, and was
"rewarded" with a recurrence of the message (and an ineffective
command invocation).

The Web server appears to be OK:

bunrab(4.10-S)[8] uname -a
FreeBSD bunrab.catwhisker.org 4.10-STABLE FreeBSD 4.10-STABLE #69: Sun Jun 13 06:04:08 PDT 2004     root@freebeast.catwhisker.org:/common/S1/obj/usr/src/sys/BUNRAB  i386
bunrab(4.10-S)[9] 


And falling back to the previous kernel & world on the firewall seems OK:

janus(4.10-S)[2] uname -a
FreeBSD janus.catwhisker.org 4.10-STABLE FreeBSD 4.10-STABLE #68: Sun May 30 05:38:48 PDT 2004     root@freebeast.catwhisker.org:/common/S1/obj/usr/src/sys/JANUS  i386
janus(4.10-S)[3] 




Any hints, clues, thoughts, or suggestions?

Thanks,
david
-- 
David H. Wolfskill				david@catwhisker.org
I do not "unsubscribe" from email "services" to which I have not explicitly
subscribed.  Rather, I block spammers' access to SMTP servers I control,
and encourage others who are in a position to do so to do likewise.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406131441.i5DEfdfg000712>