[Libguestfs] Fwd: [Qemu-devel] debugging qemu-nbd.c

Richard W.M. Jones rjones at redhat.com
Wed Apr 10 09:11:01 UTC 2013


On Tue, Apr 09, 2013 at 02:25:28PM -0400, Skippy VonDrake wrote:
> >> libguestfs: qemu version 1.4
> >> libguestfs: command: run:
> >> /home/skippy/Downloads/qemu/latest-build/install_dir/bin/qemu-system-x86_64
> >> libguestfs: command: run: \ -nographic
> >> libguestfs: command: run: \ -machine accel=kvm:tcg
> >> libguestfs: command: run: \ -device ?
> >> libguestfs: [00025ms] finished testing qemu features
> >> libguestfs: [00025ms] r from fork: 13658 \n
> >>  \ libguestfs: error: appliance closed the connection unexpectedly,
> >> see earlier error messages
> >
> > Either some output is missing, or something very strange is happening
> > in the appliance back end.  Would advise adding lots more debugging to
> > the code that starts at this comment:
> >
> >   if (r == 0) {                 /* Child (qemu). */
> >
> > I don't think the error has anything to do with qemu-nbd.  It doesn't
> > even get to the point where libguestfs prints the qemu command line.
> 
> Maybe I mucked up libguestfs logging with my own logging... don't see
> how but it's possible.
> 
> Here are the log statements I put in for the qemu-child.
> I ended with listing the args in g->app.cmdline just before
> this statement:
>    execv (g->qemu, g->app.cmdline); /* Run qemu. */
> 
> in guestfs forked child - pid for qemu process: 29439
> qemu child - before if (has_appliance_drive)
> qemu child - before Set up virtio-serial
> qemu child - before Dump the command line (after setting up stderr)
> qemu child - before * Put qemu in a new process group. *
> /usr/local/bin/qemu-system-x86_64
>   -global
>   virtio-blk-pci.scsi=off
>   -nodefconfig
>   -nodefaults
>   -nographic
>   -device
>   virtio-scsi-pci,id=scsi
>   -drive
>   file=nbd:localhost:3000,format=raw,id=hd0,if=none

My next guess was going to be that it was failing to create
the nbd: command line parameter properly, but this looks OK.

I would enable core dumps (ulimit -c unlimited) and then see what
process dumps core and get a stack trace from that.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v




More information about the Libguestfs mailing list