View previous topic :: View next topic |
Author |
Message |
guero61 l33t
Joined: 14 Oct 2002 Posts: 811 Location: Behind you
|
Posted: Mon Mar 20, 2006 1:54 pm Post subject: glibc-2.3.6-r3 segfaulting w/nptl + hardened |
|
|
Messing around, trying to get the hardened & nptl patches working, and running into a nice consistent segfault. The following is the result of 'emerge -pv glibc':
Code: |
[ebuild R ] sys-libs/glibc-2.3.6-r3 USE="hardened* linuxthreads-tls* nls nptl* nptlonly* userlocales -build -erandom -glibc-compat20 -glibc-omitfp -profile" 0 kB
|
The ebuild fails consistently at the same point - the RAM is fresh, registered ECC, high-grade stuff & I've done a few USE swaps (like taking out linuxthreads-tls & nptlonly), but to no avail.
Code: |
CPP='sparc-unknown-linux-gnu-gcc -E -x c-header' /var/tmp/portage/glibc-2.3.6-r3/work/build-sparc32-sparc-unknown-linux-gnu-nptl/elf/ld-linux.so.2 --library-path /var/tmp/portage/glibc-2.3.6-r3/work/build-sparc32-sparc-unknown-linux-gnu-nptl:/var/tmp/portage/glibc-2.3.6-r3/work/build-sparc32-sparc-unknown-linux-gnu-nptl/math:/var/tmp/portage/glibc-2.3.6-r3/work/build-sparc32-sparc-unknown-linux-gnu-nptl/elf:/var/tmp/portage/glibc-2.3.6-r3/work/build-sparc32-sparc-unknown-linux-gnu-nptl/dlfcn:/var/tmp/portage/glibc-2.3.6-r3/work/build-sparc32-sparc-unknown-linux-gnu-nptl/nss:/var/tmp/portage/glibc-2.3.6-r3/work/build-sparc32-sparc-unknown-linux-gnu-nptl/nis:/var/tmp/portage/glibc-2.3.6-r3/work/build-sparc32-sparc-unknown-linux-gnu-nptl/rt:/var/tmp/portage/glibc-2.3.6-r3/work/build-sparc32-sparc-unknown-linux-gnu-nptl/resolv:/var/tmp/portage/glibc-2.3.6-r3/work/build-sparc32-sparc-unknown-linux-gnu-nptl/crypt:/var/tmp/portage/glibc-2.3.6-r3/work/build-sparc32-sparc-unknown-linux-gnu-nptl/nptl /var/tmp/portage/glibc-2.3.6-r3/work/build-sparc32-sparc-unknown-linux-gnu-nptl/sunrpc/rpcgen -Y ../scripts -c rpcsvc/bootparam_prot.x -o /var/tmp/portage/glibc-2.3.6-r3/work/build-sparc32-sparc-unknown-linux-gnu-nptl/sunrpc/xbootparam_prot.T
make[2]: *** [/var/tmp/portage/glibc-2.3.6-r3/work/build-sparc32-sparc-unknown-linux-gnu-nptl/sunrpc/xbootparam_prot.stmp] Segmentation fault
|
Any ideas? |
|
Back to top |
|
|
gust4voz Retired Dev
Joined: 09 Sep 2003 Posts: 373 Location: Buenos Aires, Argentina
|
Posted: Mon Mar 20, 2006 3:25 pm Post subject: |
|
|
Did you build gcc with boundschecking? It's REQUIRED for hardened on sparc.
Second point, nptl+hardened is totally untested.
Also notice that currently hardened on sparc is experimental, there's no official support for that. _________________ Gustavo Zacarias
Gentoo/SPARC monkey |
|
Back to top |
|
|
guero61 l33t
Joined: 14 Oct 2002 Posts: 811 Location: Behind you
|
Posted: Mon Mar 20, 2006 3:44 pm Post subject: |
|
|
Didn't do boundschecking - will add that in.
This SPARC install is more of a hobbyist one than one I'm actually concerned about - hence the 'messing around' terminology. If it doesn't work or just gets really screwed up, I'll strip it to bare metal and start over. Glad to be a guinea pig.
Any other USE flags you'd suggest before I start back up on an 'emerge -evD world'?
Code: |
USE="ipv6 hardened nptl nptlonly unicode ithreads perl python php linuxthreads-tls"
USE="$USE X509 chroot hpn bzip2 socks5 boundschecking"
USE="$USE -fortran -gtk"
CFLAGS="-O2 -mcpu=ultrasparc -pipe -fomit-frame-pointer"
CHOST="sparc-unknown-linux-gnu"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j2"
ACCEPT_KEYWORDS="~sparc"
FEATURES="sandbox buildpkg userpriv usersandbox"
[root@sparky ~] ls -lF /etc/make.profile
lrwxrwxrwx 1 root root 56 Mar 13 16:59 /etc/make.profile -> /usr/portage/profiles/default-linux/sparc/sparc64/2006.0/
[root@sparky ~] uname -a
Linux sparky 2.6.15-gentoo-r7 #2 PREEMPT Wed Mar 15 16:28:34 CST 2006 sparc64 sun4u GNU/Linux
|
|
|
Back to top |
|
|
gust4voz Retired Dev
Joined: 09 Sep 2003 Posts: 373 Location: Buenos Aires, Argentina
|
Posted: Mon Mar 20, 2006 5:59 pm Post subject: |
|
|
Remember to USE="boundschecking hardened pic".
Emerge binutils, gcc, then glibc. Then emerge -e world. _________________ Gustavo Zacarias
Gentoo/SPARC monkey |
|
Back to top |
|
|
guero61 l33t
Joined: 14 Oct 2002 Posts: 811 Location: Behind you
|
Posted: Tue Mar 21, 2006 1:21 pm Post subject: |
|
|
And it failed... Same bad place, same bad way. Make's croak:
Code: |
make[2]: *** [/var/tmp/portage/glibc-2.3.6-r3/work/build-sparc32-sparc-unknown-linux-gnu-nptl/sunrpc/xbootparam_prot.stmp] Segmentation fault
|
Here's an odd question - why is it trying to build 32-bit? Would it help at all if I specified a 64-bit userland? How would I go about doing that anyway? |
|
Back to top |
|
|
gust4voz Retired Dev
Joined: 09 Sep 2003 Posts: 373 Location: Buenos Aires, Argentina
|
Posted: Tue Mar 21, 2006 3:45 pm Post subject: |
|
|
It wouldn't help, Gentoo Linux/SPARC64 userland is 32-bit.
It would require a specially-crafted profile to use 64 bits, 64-bit seed stages and probably patches. _________________ Gustavo Zacarias
Gentoo/SPARC monkey |
|
Back to top |
|
|
guero61 l33t
Joined: 14 Oct 2002 Posts: 811 Location: Behind you
|
Posted: Wed Mar 22, 2006 1:32 pm Post subject: |
|
|
It was definitely the 'hardened' USE flag.
Code: |
[ebuild R ] sys-devel/binutils-2.16.1-r2 USE="nls -multislot -multitarget -test" 0 kB
[ebuild R ] sys-devel/gcc-3.4.5 USE="nls -bootstrap -boundschecking -build -fortran -gcj -gtk -hardened -ip28 -multislot -nocxx -nopie -nossp -objc -vanilla" 0 kB
[ebuild R ] sys-libs/glibc-2.3.6-r3 USE="glibc-omitfp linuxthreads-tls nls nptl nptlonly userlocales -build -erandom -glibc-compat20 -hardened -profile" 0 kB
|
Running an 'emerge -evD glibc' completed successfully without said flag. Should I submit a bug report, or leave it as-is? I'm not attached to getting it working, but it's a very precisely replicable bug... I'm certainly willing to help here - what debugging should I turn on (like getting rid of glibc-omitfp) to get a better error message than the oh-so-generic "segmentation fault"? Or, if I'm making too much work, I can just leave things be. |
|
Back to top |
|
|
gust4voz Retired Dev
Joined: 09 Sep 2003 Posts: 373 Location: Buenos Aires, Argentina
|
Posted: Wed Mar 22, 2006 3:09 pm Post subject: |
|
|
hardened on sparc isn't supported, so a bug about it will get closed as WONTFIX.
Did you try -nptl with hardened? _________________ Gustavo Zacarias
Gentoo/SPARC monkey |
|
Back to top |
|
|
guero61 l33t
Joined: 14 Oct 2002 Posts: 811 Location: Behind you
|
Posted: Wed Mar 22, 2006 3:30 pm Post subject: |
|
|
Quote: |
Did you try -nptl with hardened?
|
Nope. Will do.
[edit]
That failed as well (same way - segfault while compiling xbootparam_prot.stmp). Cést la vie.
Code: |
[ebuild R ] sys-devel/binutils-2.16.1-r2 USE="nls -multislot -multitarget -test" 0 kB
[ebuild R ] sys-devel/gcc-3.4.5 USE="hardened nls -bootstrap -boundschecking -build -fortran -gcj -gtk -ip28 -multislot -nocxx -nopie -nossp -objc -vanilla" 0 kB
[ebuild R ] sys-libs/glibc-2.3.6-r3 USE="glibc-omitfp hardened* linuxthreads-tls nls userlocales -build -erandom -glibc-compat20 -nptl* -nptlonly* -profile" 0 kB
|
[/edit] |
|
Back to top |
|
|
|