Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
UML Kernek fails built with assertion fail
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
R2-D2
n00b
n00b


Joined: 05 May 2003
Posts: 28
Location: Wesel, Germany

PostPosted: Sat Jun 11, 2005 12:38 am    Post subject: UML Kernek fails built with assertion fail Reply with quote

Hi guys...
i am having serious trouble compiling an UML Kernel due to errors:

Code:

/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/../../../../i686-pc-linux-gnu/bin/ld: BFD 2.16 assertion fail /var/tmp/portage/binutils-2.16-r1/work/binutils-2.16/bfd/elf.c:3675


Path and File exist ... i even tried a unpatched version of elf.c from an original binutils archive...

My system is console only Server with 2005.0 profile and ~x86
Running Host Kernel is 2.6.11-gentoo-r9 with recent world update.

I am absolutely sure that my glibc and depending packages are built with -nptl ...

# /lib/libc.so.6

Code:

GNU C Library stable release version 2.3.5, by Roland McGrath et al.
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6).
Compiled on a Linux 2.6.11 system on 2005-04-23.
Available extensions:
        GNU libio by Per Bothner
        crypt add-on version 2.1 by Michael Glad and others
        linuxthreads-0.10 by Xavier Leroy
        The C stubs add-on version 2.1.2.
        GNU Libidn by Simon Josefsson
        BIND-8.2.3-T5B
        libthread_db work sponsored by Alpha Processor Inc
        NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
Thread-local storage support included.
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.


Hope you can help me out with that damn problem...
By the way... I have 2 mainly the same base systems with both -nptl and both run the same error
I tried various binutils versions from stable to ~x86 and of course several kernel versions from 2.6.8 to 2.6.11 with and without UMLs own patches.

regards Tobias
_________________
Gentoo SoHo Server
19" P4 3.0 GHz // 2GB Ram // still only a single 160GB OS Drive, // 4x 160GB RAID5 ATA with 3Ware Controller
Back to top
View user's profile Send private message
xalan
Apprentice
Apprentice


Joined: 01 Feb 2005
Posts: 190

PostPosted: Wed Aug 10, 2005 4:01 pm    Post subject: Reply with quote

I am getting a similar linker error. Inspecting elf.c file it fails at this code snippet
Code:

/* If there are any SHF_TLS output sections, add PT_TLS segment.  */
  if (tls_count > 0)
    {
      int i;

      amt = sizeof (struct elf_segment_map);
      amt += (tls_count - 1) * sizeof (asection *);
      m = bfd_zalloc (abfd, amt);
      if (m == NULL)
    goto error_return;
      m->next = NULL;
      m->p_type = PT_TLS;
      m->count = tls_count;
      /* Mandated PF_R.  */
      m->p_flags = PF_R;
      m->p_flags_valid = 1;
      for (i = 0; i < tls_count; ++i)
    {
      BFD_ASSERT (first_tls->flags & SEC_THREAD_LOCAL);   <<<<<<< FAILS on this ASSERTION
      m->sections[i] = first_tls;
      first_tls = first_tls->next;
    }

      *pm = m;
      pm = &m->next;
    }


Why is it entering the code segment I dont know. I am also positve that i am not using nptl in any of my tool-chain (gcc glibc binutils) as nptl pulls in tls support. Then why the heck it is checking for tls? Can tls be pulled in implicitly at indirectly?

More about the versions of the toolchain used on the machine:
Code:

sys-libs/glibc-2.3.5  -build -debug -erandom -hardened (-multilib) +nls -nptl -nptlonly -pic (-selinux) +userlocales 0 kB
sys-devel/gcc-3.3.5.20050130-r1  (-altivec) -bootstrap -boundschecking -build +fortran -gcj +gtk -hardened -ip28 (-multilib) -multislot (-n32) (-n64) +nls -nocxx -nopie -nossp -objc -static 0 kB
sys-devel/binutils-2.15.92.0.2-r10  -multislot -multitarget +nls -test 0 kB


I have another box with approximately same config but using glibc version 2.3.4.20041102-r1 where there is no loader problem. I will try to downgrade my glibc and report the updated status. Note that if you do a search for "BFD assertion fail" on the forum threads, it reports similar problems with dual opeteron or ld/sed/make seg-faulting. Here the loader does not segfault/crash but spits failed assertions. The generated uml executable segfaults though.
Back to top
View user's profile Send private message
xalan
Apprentice
Apprentice


Joined: 01 Feb 2005
Posts: 190

PostPosted: Wed Aug 10, 2005 4:22 pm    Post subject: Reply with quote

Here is another "similar" problem. But i am not getting all those warnings, just the last linker assertion fails

https://bugs.gentoo.org/show_bug.cgi?id=49277
http://www.mail-archive.com/user-mode-linux-devel@lists.sourceforge.net/msg01393.html

I will try balisorblade's solution, and update status.
Back to top
View user's profile Send private message
xalan
Apprentice
Apprentice


Joined: 01 Feb 2005
Posts: 190

PostPosted: Thu Aug 11, 2005 3:51 am    Post subject: Reply with quote

Ok update. As i said earlier, the version of glibc on the broken box is 2.3.5 and on the stable box is 2.3.4.20041102-r1. so i downgraded glibc and now i am not getting any assertion fails. Also remember since glibc is a core component of toolchain, you need to emerge is twice to get a stable toolchain and then emerge your whole system twice. See more info about mutliple emerges here:

https://forums.gentoo.org/viewtopic.php?t=282474&start=0&postdays=0&postorder=asc&highlight=

For completeness here is the emerge info after is downgraded and removed the assertion fail messages.

Code:

Gentoo Base System version 1.6.13
Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-2.3.4.20041102-r1, 2.6.10-gentoo-r6 i686)
=================================================================
System uname: 2.6.10-gentoo-r6 i686 Intel(R) Pentium(R) 4 CPU 3.20GHz
ccache version 2.3 [enabled]
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.11
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks fixpackages sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.ccccom.com/ http://gentoo.mirrors.tds.net/gentoo http://gentoo.mirrors.pair.com"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="x86 X aalib alsa apm arts avi bash-completion berkdb bitmap-fonts cdr crypt cscope cups curl directfb eds emboss encode esd fam flac foomaticdb fortran gd gdbm gif gnome gphoto2 gpm gstreamer gtk gtk2 imagemagick imlib ipv6 java jpeg junit kde ldap libg++ libwww mad mikmod motif mp3 mpeg mysql nas ncurses nls odbc ogg oggvorbis opengl oss pam pdflib perl plotutils png postgres python qt quicktime readline sdl slang spell ssl svga tcltk tcpd tetex tiff truetype true
type-fonts type1-fonts vorbis xml2 xmms xv zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY


I have filed a bug report regaring this at https://bugs.gentoo.org/show_bug.cgi?id=102074
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
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