Date: Wed, 2 Aug 2006 20:55:44 -0700 From: Marcel Moolenaar <marcel@xcllnt.net> To: Maxim Sobolev <sobomax@freebsd.org> Cc: "current@freebsd.org" <current@freebsd.org>, Steve Kargl <sgk@troutmask.apl.washington.edu>, freebsd-ppc@freebsd.org Subject: Re: Looks like threading is b0rken on FreeBSD/powerpc Message-ID: <D6E11FF4-478E-4146-8ADE-E16B9496D01C@xcllnt.net> In-Reply-To: <44D13BC7.8010309@FreeBSD.org> References: <44D12AC0.90009@sippysoft.com> <20060802230803.GA32778@troutmask.apl.washington.edu> <44D13BC7.8010309@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Aug 2, 2006, at 4:56 PM, Maxim Sobolev wrote:
> Steve Kargl wrote:
>> On Wed, Aug 02, 2006 at 03:44:16PM -0700, Maxim Sobolev wrote:
>>> Apparently threading is b0rken on the FreeBSD/powerpc - csup(8)
>>> dumps core with seg 11. The same csup(8) version compiled on 6.0
>>> works just fine on the same 7-CURRENT kernel.
>>>
>> What does ldd show?
>
> Here is the backtrace:
>
> Loaded symbols for /libexec/ld-elf.so.1
> #0 0x2183f7b4 in tls_get_addr_common (dtvp=0x1a31490, index=2,
> offset=4294934528) at rtld.c:2663
> 2663 if (dtv[0] != tls_dtv_generation) {
> (gdb) bt
> #0 0x2183f7b4 in tls_get_addr_common (dtvp=0x1a31490, index=2,
> offset=4294934528) at rtld.c:2663
> #1 0x218397f8 in __tls_get_addr (ti=0x21bbf0e8) at /usr/src/
> libexec/rtld-elf/powerpc/reloc.c:577
> #2 0x21ad3ef8 in choose_arena () at /usr/src/lib/libc/stdlib/
> malloc.c:1422
> #3 0x21ad8f40 in imalloc (size=480) at /usr/src/lib/libc/stdlib/
> malloc.c:2662
> #4 0x21ada810 in malloc (size=480) at /usr/src/lib/libc/stdlib/
> malloc.c:3422
> #5 0x21a1ba90 in _thr_alloc (curthread=0x1a502e0) at /usr/src/lib/
> libpthread/thread/thr_kern.c:2369
> #6 0x21a021b0 in _pthread_create (thread=0x1ab05a0, attr=0x0,
> start_routine=0x18109dc <sender_loop>,
> arg=0x1ab0580) at /usr/src/lib/libpthread/thread/thr_create.c:110
> #7 0x01810640 in mux_init (m=0x1ab0580) at /usr/src/usr.bin/
> csup/../../contrib/csup/mux.c:661
> #8 0x0180f8b0 in mux_open (sock=3, chan=0x7fffdad8) at /usr/src/
> usr.bin/csup/../../contrib/csup/mux.c:328
> #9 0x018146a4 in proto_mux (config=0x1a118c0) at /usr/src/usr.bin/
> csup/../../contrib/csup/proto.c:555
> #10 0x018148f4 in proto_run (config=0x1a118c0) at /usr/src/usr.bin/
> csup/../../contrib/csup/proto.c:617
> #11 0x0180dddc in main (argc=1, argv=0x7fffdcac) at /usr/src/
> usr.bin/csup/../../contrib/csup/main.c:314
> (gdb) print dtv
> $1 = (Elf_Addr *) 0x0
> (gdb)
This is probably the same bug that affects ia64. See PR ia64/91846.
I think the following should work-around it:
Index: malloc.c
===================================================================
RCS file: /home/ncvs/src/lib/libc/stdlib/malloc.c,v
retrieving revision 1.132
diff -u -r1.132 malloc.c
--- malloc.c 27 Jul 2006 19:09:32 -0000 1.132
+++ malloc.c 3 Aug 2006 03:55:03 -0000
@@ -279,6 +279,7 @@
# define QUANTUM_2POW_MIN 4
# define SIZEOF_PTR 4
# define USE_BRK
+# define NO_TLS
#endif
/* sizeof(int) == (1 << SIZEOF_INT_2POW). */
FYI,
--
Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D6E11FF4-478E-4146-8ADE-E16B9496D01C>
