Re: bind fails with sig11 on start / pthread failure on ARM?

From: Bernd Walter <ticso_at_cicely7.cicely.de>
Date: Fri, 19 Feb 2010 04:47:25 +0100
On Fri, Feb 19, 2010 at 04:30:00AM +0100, Bernd Walter wrote:
> On Fri, Feb 19, 2010 at 04:12:00AM +0100, Bernd Walter wrote:
> > On Thu, Feb 18, 2010 at 03:10:10PM +0200, Kostik Belousov wrote:
> > > On Thu, Feb 18, 2010 at 01:49:07PM +0100, Bernd Walter wrote:
> > > > On Tue, Feb 16, 2010 at 07:39:51PM +0100, Bernd Walter wrote:
> > > > > On Mon, Feb 15, 2010 at 10:39:07PM +0100, Bernd Walter wrote:
> > [Switching to thread 4 (Thread 20804140 (LWP 100053))]#0  0x0015755c in isc_atomic_cmpxchg ()
> > (gdb) bt
> > #0  0x0015755c in isc_atomic_cmpxchg ()
> > #1  0x00157dac in isc_rwlock_lock ()
> > #2  0x000f9790 in dns_db_register ()
> > #3  0x0004d590 in dns_sdb_register ()
> > #4  0x0000c974 in ns_builtin_init ()
> > #5  0x0001aa90 in $a ()
> > #6  0x0001aa90 in $a ()
> > 
> > isc_atomic_cmpxchg really sounds quite interesting though.
> > It is not only the crashing function it is also a type of function which
> > sounds error prune.
> 
> For me it looks like a bug in bind itself.
> It is in contrib/bind9/lib/isc/arm/include/isc/atomic.h.
> My assumption is that either the assembly is broken or it gets an
> invalid pointer.
> I'm not very expirienced with ARM assembly.
> Warner - it names you in the copyright, so very likely you know this code.
> I will build a debug version of bind, but as usual it will take some
> time...

Maybe it helps in the meanwhile:
(gdb) disassemble 0x0015755c
Dump of assembler code for function isc_atomic_cmpxchg:
0x00157550 <isc_atomic_cmpxchg+0>:      mov     r3, r0
0x00157554 <isc_atomic_cmpxchg+4>:      sub     r0, pc, #8      ; 0x8
0x00157558 <isc_atomic_cmpxchg+8>:      mov     r12, #-536870908        ; 0xe0000004
0x0015755c <isc_atomic_cmpxchg+12>:     str     r0, [r12]
0x00157560 <isc_atomic_cmpxchg+16>:     mov     r12, #-536870904        ; 0xe0000008
0x00157564 <isc_atomic_cmpxchg+20>:     add     r0, pc, #12     ; 0xc
0x00157568 <isc_atomic_cmpxchg+24>:     str     r0, [r12]
0x0015756c <isc_atomic_cmpxchg+28>:     ldr     r0, [r3]
0x00157570 <isc_atomic_cmpxchg+32>:     cmp     r0, r1
0x00157574 <isc_atomic_cmpxchg+36>:     streq   r2, [r3]
0x00157578 <isc_atomic_cmpxchg+40>:     mov     r1, #0  ; 0x0
0x0015757c <isc_atomic_cmpxchg+44>:     mov     r12, #-536870908        ; 0xe0000004
0x00157580 <isc_atomic_cmpxchg+48>:     str     r1, [r12]
0x00157584 <isc_atomic_cmpxchg+52>:     mvn     r1, #0  ; 0x0
0x00157588 <isc_atomic_cmpxchg+56>:     mov     r12, #-536870904        ; 0xe0000008
0x0015758c <isc_atomic_cmpxchg+60>:     str     r1, [r12]
0x00157590 <isc_atomic_cmpxchg+64>:     mov     pc, lr
End of assembler dump.

Seems to be the str in line 57, which is crashing.

-- 
B.Walter <bernd_at_bwct.de> http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.
Received on Fri Feb 19 2010 - 02:47:37 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:01 UTC