NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Porting Corosync/Pacemaker - Help needed with gdb



Some deeper insight:

-----8<--------
Core was generated by `corosync'.
Program terminated with signal 11, Segmentation fault.
#0  0x00007f7ff68078e9 in pthread_mutex_lock () from /usr/lib/libpthread.so.1
(gdb) bt
#0  0x00007f7ff68078e9 in pthread_mutex_lock () from /usr/lib/libpthread.so.1
#1  0x00007f7ff7002e14 in ipc_thread_active (conn=0x7f7ff7391000) at coroipcs.c:465
#2  pthread_ipc_consumer (conn=0x7f7ff7391000) at coroipcs.c:674
#3  0x00007f7ff6809d75 in ?? () from /usr/lib/libpthread.so.1
#4  0x00007f7ff60759f0 in ___lwp_park50 () from /usr/lib/libc.so.12
Cannot access memory at address 0x7f7ff0000000
(gdb) x/10i 0x00007f7ff68078e0
   0x7f7ff68078e0 <pthread_mutex_lock>: mov    %fs:0x0,%rax
=> 0x7f7ff68078e9 <pthread_mutex_lock+9>:       mov    0x10(%rax),%rdx
   0x7f7ff68078ed <pthread_mutex_lock+13>:      xor    %eax,%eax
   0x7f7ff68078ef <pthread_mutex_lock+15>:      lock cmpxchg %rdx,0x10(%rdi)
   0x7f7ff68078f5 <pthread_mutex_lock+21>:      test   %rax,%rax
   0x7f7ff68078f8 <pthread_mutex_lock+24>:      jne    0x7f7ff68078fd <pthread_mutex_lock+29>
   0x7f7ff68078fa <pthread_mutex_lock+26>:      xor    %eax,%eax
   0x7f7ff68078fc <pthread_mutex_lock+28>:      retq
   0x7f7ff68078fd <pthread_mutex_lock+29>:      jmpq   0x7f7ff6807640
   0x7f7ff6807902:      data32 data32 data32 data32 data32 nopw %cs:0x0(%rax,%rax,1)
(gdb) info reg rax rdx
rax            0x7f7ffffffffe   140187732541438
rdx            0x0      0
(gdb) x/p 0x7f7ffffffffe
0x7f7ffffffffe: Cannot access memory at address 0x7f7ffffffffe
------------------------


If I understand correctly, the crash happens when the content of rdx is copied to the adress rax points to. And rax points to 0x7f7ffffffffe, which is indeed not present. Also I wonder why gdb says "Cannot access memory at address 0x7f7ff0000000" when doing a backtrace.

Ideas?




Home | Main Index | Thread Index | Old Index