WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Segmentation fault of gdbserver-xen

Hi, Kip

Thanks.
I can see the core.
xc_waitdomain_core() don't supported x86_64.
I'll send a patch to fix the issue.


#gdb tools/debugger/gdb/gdb-6.2.1-linux-i386-xen/gdb/gdbserver/gdbserver-xen 
./core.7633

(gdb) bt
#0  0x00002ab2a8478f7b in xc_waitdomain_core () from 
/usr/lib64/libxenctrl.so.3.0
#1  0x00002ab2a8478afb in xc_waitdomain () from /usr/lib64/libxenctrl.so.3.0
#2  0x0000000000404e10 in linux_wait (status=0x7fffff7fe6c7 "") at 
../../../gdb-6.2.1/gdb/gdbserver/linux-xen-low.c:229
#3  0x0000000000404391 in mywait (statusp=Variable "statusp" is not available.
) at ../../../gdb-6.2.1/gdb/gdbserver/target.c:99
#4  0x0000000000403cd4 in main (argc=4, argv=0x7fffff7fef18) at 
../../../gdb-6.2.1/gdb/gdbserver/server.c:84
(gdb) x/16i 0x00002ab2a8478f60
0x2ab2a8478f60 <xc_waitdomain_core+352>:        mov    %ebx,%es
0x2ab2a8478f62 <xc_waitdomain_core+354>:        (bad)  
0x2ab2a8478f63 <xc_waitdomain_core+355>:        (bad)  
0x2ab2a8478f64 <xc_waitdomain_core+356>:        pushq  (%rcx)
0x2ab2a8478f66 <xc_waitdomain_core+358>:        leaveq 
0x2ab2a8478f67 <xc_waitdomain_core+359>:        mov    1225914(%rip),%rax       
 # 0x2ab2a85a4428 <p2m_array>
0x2ab2a8478f6e <xc_waitdomain_core+366>:        inc    %esi
0x2ab2a8478f70 <xc_waitdomain_core+368>:        mov    (%rax,%rcx,8),%rdx
0x2ab2a8478f74 <xc_waitdomain_core+372>:        mov    1225893(%rip),%rax       
 # 0x2ab2a85a4420 <m2p_array>
0x2ab2a8478f7b <xc_waitdomain_core+379>:        mov    %rcx,(%rax,%rdx,8)
0x2ab2a8478f7f <xc_waitdomain_core+383>:        movslq %esi,%rcx
0x2ab2a8478f82 <xc_waitdomain_core+386>:        cmp    1225895(%rip),%rcx       
 # 0x2ab2a85a4430 <nr_pages>
0x2ab2a8478f89 <xc_waitdomain_core+393>:        jl     0x2ab2a8478f67 
<xc_waitdomain_core+359>
0x2ab2a8478f8b <xc_waitdomain_core+395>:        jmpq   0x2ab2a8478e28 
<xc_waitdomain_core+40>
0x2ab2a8478f90 <xc_waitdomain_core+400>:        lea    4785(%rip),%rdi        # 
0x2ab2a847a248
0x2ab2a8478f97 <xc_waitdomain_core+407>:        mov    $0xf00febed,%edx

Best Regards,

Akio Takebe

>You will need to re-compile and re-install libxenctl with symbols (add
>-g to the Makefile). With that done you'll be able to see where the
>segmentation fault is occurring. There are frequently problems in the
>domain VA mapping function.
>
>                          -Kip
>
>On Thu, 24 Aug 2006, Akio Takebe wrote:
>
>> Hi,
>>
>> I tried to run gdbserver-xen with --file on xen-x86_64.
>> But I have the following fault.
>> Do anyone have the same error?
>> Or do I have mistakes?
>>
>> # gdbserver-xen 127.0.0.1:9999 --file /var/xen/dump/vm1.1.core
>> Attached; pid = 3
>> Segmentation fault
>>
>> A part of the strace is below.
>>
>> mmap(NULL, 1264480, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
>> 0) = 0x2b01270d9000
>> mprotect(0x2b01270e5000, 1215328, PROT_NONE) = 0
>> mmap(0x2b01271e4000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
>> MAP_DENYWRITE, 3, 0xb000) = 0x2b01271e4000
>> mmap(0x2b01271e5000, 166752, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED
>> |MAP_ANONYMOUS, -1, 0) = 0x2b01271e5000
>> close(3)                                = 0
>> open("/lib64/tls/libc.so.6", O_RDONLY)  = -1 ENOENT (No such file or
>> directory)
>> open("/lib64/libc.so.6", O_RDONLY)      = 3
>> read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\313"...,
>> 640) = 640
>> fstat(3, {st_mode=S_IFREG|0755, st_size=1485035, ...}) = 0
>> mmap(0x386c200000, 2303368, PROT_READ|PROT_EXEC, MAP_PRIVATE|
>> MAP_DENYWRITE, 3, 0) = 0x386c200000
>> mprotect(0x386c329000, 1086856, PROT_NONE) = 0
>> mmap(0x386c428000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
>> MAP_DENYWRITE, 3, 0x128000) = 0x386c428000
>> mmap(0x386c42e000, 17800, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
>> MAP_ANONYMOUS, -1, 0) = 0x386c42e000
>> close(3)                                = 0
>> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
>> = 0x2b012720e000
>> mprotect(0x386c428000, 12288, PROT_READ) = 0
>> munmap(0x2b01270b3000, 154694)          = 0
>> open("2006-0823-1442.14-vm1.1.core", O_RDONLY) = 3
>> open("/proc/xen/privcmd", O_RDWR)       = 4
>> fcntl(4, F_GETFD)                       = 0
>> fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
>> brk(0)                                  = 0x50d000
>> brk(0x52e000)                           = 0x52e000
>> rt_sigaction(SIGRT_1, {SIG_IGN}, {SIG_DFL}, 8) = 0
>> write(2, "Attached; pid = 3\n", 18)     = 18
>> read(3, "\355\353\17\360\1\0\0\0\355\371\0\0\30\0\0\0H\24\0\0\0"..., 24)
>> = 24
>> read(3, "\177\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\200"...,
>> 5168) = 5168
>> mmap(NULL, 512000, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
>> 0) = 0x2b012720f000
>> read(3, "\2520\20\0\0\0\0\0:9\20\0\0\0\0\0\2764\20\0\0\0\0\0\333"...,
>> 511848) = 511848
>> mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
>> 0) = 0x2b012728c000
>> --- SIGSEGV (Segmentation fault) @ 0 (0) ---
>> +++ killed by SIGSEGV +++
>>
>> Best Regards,
>>
>> Akio Takebe
>>
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@xxxxxxxxxxxxxxxxxxx
>> http://lists.xensource.com/xen-devel
>>


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>