qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] How to capture guest %rip from a qemu process without monitor?
@ 2011-09-30  7:42 Richard W.M. Jones
  2011-09-30  8:49 ` Jan Kiszka
  0 siblings, 1 reply; 3+ messages in thread
From: Richard W.M. Jones @ 2011-09-30  7:42 UTC (permalink / raw)
  To: qemu-devel


I've finally managed to reproduce a very infrequent kernel boot hang
by forcing TCG (so it runs slower, bug seems to be timing sensitive)
and running a boot test in a loop thousands of times.

I'd like to find out where in the guest kernel this is looping.

Unfortunately I don't have access to the monitor so "info registers"
won't work, but I can attach to the qemu process with gdb.

Which TCG struct contains %rip, other registers?  What other useful
information can be captured using only gdb?

Rich.

https://bugzilla.redhat.com/show_bug.cgi?id=723822

Command line:

qemu-kvm -machine pc,accel=tcg -drive file=/dev/null,if=virtio
-nodefconfig -nodefaults -nographic -m 500 -no-reboot -no-hpet -device
virtio-serial -serial stdio -chardev
socket,path=/home/rjones/d/libguestfs/libguestfsoFRvo0/guestfsd.sock,id=channel0
-device virtserialport,chardev=channel0,name=org.libguestfs.channel.0
-kernel /home/rjones/d/libguestfs/.guestfs-500/kernel.27140 -initrd
/home/rjones/d/libguestfs/.guestfs-500/initrd.27140 -append 'panic=1
console=ttyS0 udevtimeout=300 no_timer_check acpi=off printk.time=1
cgroup_disable=memory selinux=0 guestfs_verbose=1 TERM=xterm' -drive
file=/home/rjones/d/libguestfs/.guestfs-500/root.27140,snapshot=on,if=virtio,cache=unsafe

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
New in Fedora 11: Fedora Windows cross-compiler. Compile Windows
programs, test, and build Windows installers. Over 70 libraries supprt'd
http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] How to capture guest %rip from a qemu process without monitor?
  2011-09-30  7:42 [Qemu-devel] How to capture guest %rip from a qemu process without monitor? Richard W.M. Jones
@ 2011-09-30  8:49 ` Jan Kiszka
  2011-09-30  9:03   ` Richard W.M. Jones
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Kiszka @ 2011-09-30  8:49 UTC (permalink / raw)
  To: Richard W.M. Jones; +Cc: qemu-devel

On 2011-09-30 09:42, Richard W.M. Jones wrote:
> 
> I've finally managed to reproduce a very infrequent kernel boot hang
> by forcing TCG (so it runs slower, bug seems to be timing sensitive)
> and running a boot test in a loop thousands of times.
> 
> I'd like to find out where in the guest kernel this is looping.
> 
> Unfortunately I don't have access to the monitor so "info registers"
> won't work, but I can attach to the qemu process with gdb.
> 
> Which TCG struct contains %rip, other registers?  What other useful
> information can be captured using only gdb?

Print first_cpu->eip, maybe also first_cpu->segs[1] to dump the CS
segment cache (relevant while in real mode).

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] How to capture guest %rip from a qemu process without monitor?
  2011-09-30  8:49 ` Jan Kiszka
@ 2011-09-30  9:03   ` Richard W.M. Jones
  0 siblings, 0 replies; 3+ messages in thread
From: Richard W.M. Jones @ 2011-09-30  9:03 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: qemu-devel

On Fri, Sep 30, 2011 at 10:49:20AM +0200, Jan Kiszka wrote:
> On 2011-09-30 09:42, Richard W.M. Jones wrote:
> > 
> > I've finally managed to reproduce a very infrequent kernel boot hang
> > by forcing TCG (so it runs slower, bug seems to be timing sensitive)
> > and running a boot test in a loop thousands of times.
> > 
> > I'd like to find out where in the guest kernel this is looping.
> > 
> > Unfortunately I don't have access to the monitor so "info registers"
> > won't work, but I can attach to the qemu process with gdb.
> > 
> > Which TCG struct contains %rip, other registers?  What other useful
> > information can be captured using only gdb?
> 
> Print first_cpu->eip, maybe also first_cpu->segs[1] to dump the CS
> segment cache (relevant while in real mode).

Perfect thanks!

*first_cpu contains a wealth of info.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
New in Fedora 11: Fedora Windows cross-compiler. Compile Windows
programs, test, and build Windows installers. Over 70 libraries supprt'd
http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-09-30  9:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-30  7:42 [Qemu-devel] How to capture guest %rip from a qemu process without monitor? Richard W.M. Jones
2011-09-30  8:49 ` Jan Kiszka
2011-09-30  9:03   ` Richard W.M. Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).