apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gavin Sherry <...@alcove.com.au>
Subject Re: Segfault in testlockperf test on AIX
Date Thu, 18 Jun 2009 01:12:46 GMT
2009/6/18 Bojan Smojver <bojan@rexursive.com>

> On Thu, 2009-06-18 at 02:45 +0200, Gavin Sherry wrote:
> > No, it comes to 24 bytes. short = 2 + 2, off_t = 4 + 4, + 4 + 4 + 4 =
> > 24. off_t = 4 for this build because I've forced it to 32 bit (gcc
> > -m32) based on some other requirements.
> OK. Hmm, interesting. So, it segfaults on assigning l_pid.
> Can you try this. Break at that assignment and then try assigning to one
> of the fields in the structure yourself. Do any of them work?

This being something of a heisenbug the minute I tried to do this the
location of the segv changed. So I stepped through everything under
apr_proc_mutex_unix_setup_lock() and assigned to it before the code:

(gdb) set proc_mutex_op_try.sem_flg = 0
(gdb) n

Program received signal SIGSEGV, Segmentation fault.
apr_proc_mutex_unix_setup_lock () at locks/unix/proc_mutex.c:176
176         proc_mutex_op_try.sem_flg = SEM_UNDO | IPC_NOWAIT;

Sigh. That's annoying.

Here's the disassemled function for those interested:

0x100074d8 <apr_proc_mutex_unix_setup_lock+0>:  stwu    r1,-24(r1)
0x100074dc <apr_proc_mutex_unix_setup_lock+4>:  lwz     r5,1092(r2)
0x100074e0 <apr_proc_mutex_unix_setup_lock+8>:  li      r0,6144
0x100074e4 <apr_proc_mutex_unix_setup_lock+12>: lwz     r4,1096(r2)
0x100074e8 <apr_proc_mutex_unix_setup_lock+16>: lwz     r8,1100(r2)
0x100074ec <apr_proc_mutex_unix_setup_lock+20>: li      r9,0
0x100074f0 <apr_proc_mutex_unix_setup_lock+24>: lwz     r7,1104(r2)
0x100074f4 <apr_proc_mutex_unix_setup_lock+28>: li      r10,0
0x100074f8 <apr_proc_mutex_unix_setup_lock+32>: lwz     r6,1088(r2)
0x100074fc <apr_proc_mutex_unix_setup_lock+36>: li      r3,-1
0x10007500 <apr_proc_mutex_unix_setup_lock+40>: li      r11,4096
0x10007504 <apr_proc_mutex_unix_setup_lock+44>: sth     r0,4(r5)
0x10007508 <apr_proc_mutex_unix_setup_lock+48>: li      r0,1
0x1000750c <apr_proc_mutex_unix_setup_lock+52>: sth     r3,2(r5)
0x10007510 <apr_proc_mutex_unix_setup_lock+56>: sth     r11,4(r4)
0x10007514 <apr_proc_mutex_unix_setup_lock+60>: sth     r10,2(r8)
0x10007518 <apr_proc_mutex_unix_setup_lock+64>: sth     r0,2(r4)
0x1000751c <apr_proc_mutex_unix_setup_lock+68>: stw     r9,16(r7)
0x10007520 <apr_proc_mutex_unix_setup_lock+72>: sth     r11,4(r6)
0x10007524 <apr_proc_mutex_unix_setup_lock+76>: stw     r9,16(r8)
0x10007528 <apr_proc_mutex_unix_setup_lock+80>: sth     r10,0(r6)
0x1000752c <apr_proc_mutex_unix_setup_lock+84>: sth     r3,2(r6)
0x10007530 <apr_proc_mutex_unix_setup_lock+88>: sth     r10,0(r5)
0x10007534 <apr_proc_mutex_unix_setup_lock+92>: sth     r10,0(r4)
0x10007538 <apr_proc_mutex_unix_setup_lock+96>: stw     r9,4(r8)
0x1000753c <apr_proc_mutex_unix_setup_lock+100>:        stw     r9,8(r8)
0x10007540 <apr_proc_mutex_unix_setup_lock+104>:        sth     r9,2(r7)
0x10007544 <apr_proc_mutex_unix_setup_lock+108>:        stw     r9,4(r7)
0x10007548 <apr_proc_mutex_unix_setup_lock+112>:        stw     r9,8(r7)
0x1000754c <apr_proc_mutex_unix_setup_lock+116>:        li      r0,2
0x10007550 <apr_proc_mutex_unix_setup_lock+120>:        addi    r1,r1,24
0x10007554 <apr_proc_mutex_unix_setup_lock+124>:        sth     r0,0(r8)
0x10007558 <apr_proc_mutex_unix_setup_lock+128>:        li      r0,3
0x1000755c <apr_proc_mutex_unix_setup_lock+132>:        sth     r0,0(r7)
0x10007560 <apr_proc_mutex_unix_setup_lock+136>:        blr
0x10007564 <apr_proc_mutex_unix_setup_lock+140>:        .long 0x0
0x10007568 <apr_proc_mutex_unix_setup_lock+144>:        .long 0x2040
0x1000756c <apr_proc_mutex_unix_setup_lock+148>:        lwz     r0,0(r0)
0x10007570 <apr_proc_mutex_unix_setup_lock+152>:        .long 0x8c
0x10007574 <apr_proc_mutex_unix_setup_lock+156>:        .long 0x1e6170
0x10007578 <apr_proc_mutex_unix_setup_lock+160>:        andi.
0x1000757c <apr_proc_mutex_unix_setup_lock+164>:        xoris   r3,r27,24429
0x10007580 <apr_proc_mutex_unix_setup_lock+168>:        andis.
0x10007584 <apr_proc_mutex_unix_setup_lock+172>:        rlwnm.
0x10007588 <apr_proc_mutex_unix_setup_lock+176>:        rldicr. r31,r2,14,45
0x1000758c <apr_proc_mutex_unix_setup_lock+180>:        andis.  r21,r3,28767
0x10007590 <apr_proc_mutex_unix_setup_lock+184>:        xoris   r15,r3,25451

It's a little late my time to decipher this.


View raw message