Subject: COMPAT_LINUX and LINUX_NPTL for i386?
To: None <port-i386@netbsd.org>
From: =?ISO-8859-15?Q?Joachim_K=F6nig?= <him@online.de>
List: port-i386
Date: 06/05/2007 16:53:48
I have installed Debian Etch on my "NetBSD" notebook which uses glibc-2.3.6
and a 2.6 kernel.

I'm trying to bootstrap pkgsrc under Linux emulation on NetBSD in a chroot
sandbox of Debian Etch (e.g. /emul/linux does not matter)
but I'm getting a strange reproducable SIGSEGV
during the build of bmake which leads me to believe that it is somehow
related to NPTL.

I've seen that NPTL support is enabled only for amd64. Is there a specific
reason that is is not available for i386?

here is the relevant ktrace output from the bootstrap run, gcc-4.1 calls
exit_group() and make's wait4 gets a strange result:

>   4320      1 gcc-4.1  CALL  unlink(0x8079cb8)
>   4320      1 gcc-4.1  NAMI  "/tmp/ccE0Iroo.s"
>   4320      1 gcc-4.1  RET   unlink 0
>   4320      1 gcc-4.1  CALL  exit_group(0)
>  14628      1 make     RET   wait4 -1 errno -3 No such process
>  14628      1 make     PSIG  SIGCHLD caught handler=0xbba71790 mask=())
>  14628      1 make     PSIG  SIGSEGV SIG_DFL
>  14628      1 make     NAMI  "make.core"
>  11645      1 bash     RET   waitpid 14628/0x3924
>  11645      1 bash     CALL  write(2,0x80f6008,0x48)
>  11645      1 bash     GIO   fd 2 wrote 72 bytes
>        "./bootstrap: line 220: 14628 Segmentation fault      (core 
> dumped) mak\
>         e
>        "
>  11645      1 bash     RET   write 72/0x48
>  11645      1 bash     CALL  rt_sigprocmask(2,0xbfbfd34c,0,8)

BTW, running bootstrap in a Debian-Sarge chroot under Linux Emulation
runs without problems.

Joachim