From: Akio Takebe Subject: Re: Segmentation fault of gdbserver-xen Date: Fri, 25 Aug 2006 12:13:04 +0900 Message-ID: <51C6C7F4615B5Ftakebe_akio@jp.fujitsu.com> References: <3CC6C6F9D6799Etakebe_akio@jp.fujitsu.com> <20060823150029.T23497@demos.bsdclusters.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20060823150029.T23497@demos.bsdclusters.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Kip Macy Cc: xen-devel@lists.xensource.com, Akio Takebe List-Id: xen-devel@lists.xenproject.org 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 : mov %ebx,%es 0x2ab2a8478f62 : (bad) 0x2ab2a8478f63 : (bad) 0x2ab2a8478f64 : pushq (%rcx) 0x2ab2a8478f66 : leaveq 0x2ab2a8478f67 : mov 1225914(%rip),%rax # 0x2ab2a85a4428 0x2ab2a8478f6e : inc %esi 0x2ab2a8478f70 : mov (%rax,%rcx,8),%rdx 0x2ab2a8478f74 : mov 1225893(%rip),%rax # 0x2ab2a85a4420 0x2ab2a8478f7b : mov %rcx,(%rax,%rdx,8) 0x2ab2a8478f7f : movslq %esi,%rcx 0x2ab2a8478f82 : cmp 1225895(%rip),%rcx # 0x2ab2a85a4430 0x2ab2a8478f89 : jl 0x2ab2a8478f67 0x2ab2a8478f8b : jmpq 0x2ab2a8478e28 0x2ab2a8478f90 : lea 4785(%rip),%rdi # 0x2ab2a847a248 0x2ab2a8478f97 : 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@lists.xensource.com >> http://lists.xensource.com/xen-devel >>