From: Kashyap Chamarthy <kchamart@redhat.com>
To: "Richard W.M. Jones" <rjones@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] QEMU segfault: Booting an overlay with backing_file over NBD: nbd.c:nbd_receive_request():L756: read failed
Date: Fri, 30 Jan 2015 00:33:51 +0100 [thread overview]
Message-ID: <20150129233351.GD32706@tesla.redhat.com> (raw)
In-Reply-To: <20150129172222.GC32706@tesla.redhat.com>
On Thu, Jan 29, 2015 at 06:22:22PM +0100, Kashyap Chamarthy wrote:
> On Thu, Jan 29, 2015 at 04:47:23PM +0000, Richard W.M. Jones wrote:
> > On Thu, Jan 29, 2015 at 05:25:09PM +0100, Kashyap Chamarthy wrote:
[. . .]
> > > On the shell where `qemu-nbd` is running, I notice this
> > >
> > > nbd.c:nbd_receive_request():L756: read failed
> >
>
> > You really need to get the stack trace from that core dump to
> > debug this further.
>
> I don't see the core dump locally (ABRT or some such not configured),
> will re-test this with `gdb` in a little while to get the traces.
Okay, now I had the coredump, and ran GDB ('bt full') with it[1] with
qemu-debuginfo files installed. Not sure if it has inough info, as I
didn't install the ~ 3.6 GB of other missing debuginfo RPMs (this is my
primary laptop, I can replicate this test on a different machine with
the missing debuginfo files if needed).
Next, I tried the external wrapper technique you once wrote about[1], to
run QEMU under `gdbserver`, here's the result:
$ gdb
. . .
(gdb) file /usr/bin/qemu-system-x86_64
Reading symbols from /usr/bin/qemu-system-x86_64...Reading symbols from /usr/lib/debug/usr/bin/qemu-system-x86_64.debug...done.
done.
(gdb) target remote tcp::1234
Remote debugging using tcp::1234
Reading symbols from /lib64/ld-linux-x86-64.so.2...Reading symbols from /usr/lib/debug/usr/lib64/ld-2.20.so.debug...done.
done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
0x00007ffff7ddbcf0 in _start () from /lib64/ld-linux-x86-64.so.2
(gdb) cont
Continuing.
Program received signal SIGSEGV, Segmentation fault.
0x0000555555872159 in aio_set_fd_handler (ctx=ctx@entry=0x0, fd=8, io_read=io_read@entry=0x5555558a5470 <nbd_reply_ready>, io_write=io_write@entry=0x5555558a4d80 <nbd_restart_write>,
opaque=opaque@entry=0x5555562605e0) at aio-posix.c:50
Does this help?
Precise steps of what I did:
(1) Use the below wrapper script with `gdbserver`
----------------------------------------------------------------
$ cat /export/qemu-wrapper.sh
#!/bin/bash -
if ! echo "$@" | grep -sqE -- '-help|-version|-device \?' ; then
gdbserver="gdbserver :1234"
fi
exec $gdbserver /usr/bin/qemu-system-x86_64 "$@"
----------------------------------------------------------------
(2) On shell #1, export the backing file over QEMU NBD:
$ qemu-nbd -f qcow2 -p10809 \
/var/lib/libvirt/images/f21vm.qcow2 -t
(3) On shell #3, Invoke the QEMU wrapper script:
$ ./qemu-wrapper.sh \
-nographic \
-nodefconfig \
-nodefaults \
-m 2048 \
-device virtio-scsi-pci,id=scsi \
-device virtio-serial-pci \
-serial stdio \
-drive file=./overlay1-f21vm.qcow2,format=qcow2,if=virtio,cache=writeback
Process /usr/bin/qemu-system-x86_64 created; pid = 1944
Listening on port 1234
(4) On shell #3, run GDB (output is above).
[1] https://kashyapc.fedorapeople.org/virt/qemu-nbd-test/stack-traces-from-coredump.txt
--
/kashyap
next prev parent reply other threads:[~2015-01-29 23:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-29 16:25 [Qemu-devel] QEMU segfault: Booting an overlay with backing_file over NBD: nbd.c:nbd_receive_request():L756: read failed Kashyap Chamarthy
2015-01-29 16:47 ` Richard W.M. Jones
2015-01-29 17:22 ` Kashyap Chamarthy
2015-01-29 23:33 ` Kashyap Chamarthy [this message]
2015-01-30 17:15 ` Kevin Wolf
2015-01-30 18:41 ` Kashyap Chamarthy
2015-01-30 19:32 ` Max Reitz
2015-01-30 22:13 ` Kashyap Chamarthy
2015-02-02 8:14 ` Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150129233351.GD32706@tesla.redhat.com \
--to=kchamart@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rjones@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).