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] pdb missing files?

Hi Kip,

I am passing -p to `xm create`. I updated to today's xen-unstable.hg, and it seems to have fixed the problem with `xm list`... the domU does show up paused. However, its creation still crashes xend (an unmodified domU w/ debug enabled does not crash xend). But with xend restarted, my modified domU kernel will show up as paused, so I kept going...

The next obstacle is that gdbserver-xen is segfaulting upon connection from gdb in dom0. Again, this works great with an unmodified domU. You asked me to give the output from the two different runs of gdbserver-xen.

Crash output:

root:04:20 PM:root $ ./gdbserver-xen 127.0.0.1:9999 --attach 2
domain currently paused
Attached; pid = 2
Listening on port 9999
Remote debugging from host 127.0.0.1
Segmentation fault (core dumped)


Normal output:

root:04:23 PM:root $ ./gdbserver-xen 127.0.0.1:9999 --attach 3
domain currently paused
Attached; pid = 3
Listening on port 9999
Remote debugging from host 127.0.0.1


Here's the backtrace from the core file (which I have attached):

Thanks yet again, :-)
-Jon


root:04:25 PM:root $ gdb gdbserver-xen

(gdb) core core
Core was generated by `./gdbserver-xen 127.0.0.1:9999 --attach 2'.
Program terminated with signal 11, Segmentation fault.
warning: current_sos: Can't read pathname for load map: Input/output error

Reading symbols from /usr/lib/libxenctrl.so.3.0...done.
Loaded symbols for /usr/lib/libxenctrl.so.3.0
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
#0  0x40021fb4 in map_domain_va () from /usr/lib/libxenctrl.so.3.0
(gdb) bt
#0  0x40021fb4 in map_domain_va () from /usr/lib/libxenctrl.so.3.0
#1  0x4002268a in xc_ptrace () from /usr/lib/libxenctrl.so.3.0
#2  0x0804cb27 in linux_read_memory (memaddr=0, myaddr=0xbff5ab50 "", len=8)
   at ../../../gdb-6.2.1/gdb/gdbserver/linux-xen-low.c:394
#3 0x0804bd41 in read_inferior_memory (memaddr=The value of variable 'memaddr' is distributed across several
locations, and GDB cannot access its value.

)
   at ../../../gdb-6.2.1/gdb/gdbserver/target.c:64
#4  0x0804b41b in main (argc=4, argv=0xbff5b3a4)
   at ../../../gdb-6.2.1/gdb/gdbserver/server.c:483



Kip Macy wrote:

Jonathan -

gdbserver-xen is behaving as I expect, now that I've turned off
crash_debug in Rules.mk <http://Rules.mk>. Thanks again for your helpful
suggestions.
Indeed, I am interested in debugging domU. However, the domU kernel
I've built is crashing and / or xend is crashing before the domain can
even be started "paused".


Are you passing -p to "xm create"? If so, it is a xend problem, because that
will pause the OS before the *first instruction*. However, it shouldn't be
causing xend to crash until it gets to the xenbus init code.

If I try to use gdbserver-xen to connect to one of my
invisible-to-xm-list domains, gdbserver-xen segfaults once gdb connects
to it. I believe this is interesting because gdbserver-xen will
complain about nonexistant domains if I pass it a domain id which has
never been used this boot cycle. If I pass it a domain which ran
successfully, but has shutdown, it says "getdomaininfo failed". Hence,
I believe the segfault of gdbserver-xen is directly related to the
changes I've made to the kernel I want to debug.


Could you send me the output from the two different runs? Odds are the
segfault is easily fixable.

Attachment: core
Description: Binary data

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>