From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48000) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wl0yv-0000bp-6s for qemu-devel@nongnu.org; Thu, 15 May 2014 15:06:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wl0yp-0005cu-Hm for qemu-devel@nongnu.org; Thu, 15 May 2014 15:06:17 -0400 Received: from mail-ob0-f180.google.com ([209.85.214.180]:38555) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wl0yp-0005cY-Bo for qemu-devel@nongnu.org; Thu, 15 May 2014 15:06:11 -0400 Received: by mail-ob0-f180.google.com with SMTP id va2so1782869obc.11 for ; Thu, 15 May 2014 12:06:08 -0700 (PDT) MIME-Version: 1.0 Sender: camm@ualberta.ca In-Reply-To: <20140501165336.26844.20328.malone@gac.canonical.com> References: <20140501000512.26604.21360.malonedeb@gac.canonical.com> <20140501165336.26844.20328.malone@gac.canonical.com> Date: Thu, 15 May 2014 13:06:08 -0600 Message-ID: From: Cam Macdonell Content-Type: multipart/alternative; boundary=001a11c24a324d541304f974fdb2 Subject: Re: [Qemu-devel] [Bug 1314857] Re: seg fault in ivshmem when using ioeventfd=on List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bug 1314857 <1314857@bugs.launchpad.net> Cc: "qemu-devel@nongnu.org Developers" --001a11c24a324d541304f974fdb2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello, The patch for this later bug has been proposed. I'm not sure why it's not merged. http://patchwork.ozlabs.org/patch/316785/ Cheers, Cam On Thu, May 1, 2014 at 10:53 AM, Gene Snider wrote: > When I tried the same thing with git master (latest) I get a different > error: > qemu_chr_fe_claim_no_fail: error chardev "(null)" already used > > ** Also affects: qemu-kvm (Ubuntu) > Importance: Undecided > Status: New > > -- > You received this bug notification because you are a member of qemu- > devel-ml, which is subscribed to QEMU. > https://bugs.launchpad.net/bugs/1314857 > > Title: > seg fault in ivshmem when using ioeventfd=3Don > > Status in QEMU: > New > Status in =E2=80=9Cqemu-kvm=E2=80=9D package in Ubuntu: > New > > Bug description: > When launching qemu with the ivshmem device and the nahanni guest > server there is segmentation fault in the setup_ioeventfds function of > ivshmem.c. If the ioeventfd=3Don flag is set the pci_ivshmem_init will > call setup_ioeventfds at line 668. This function relies on the 'peers' > member of the server info which is not allocated until line 669. > > To reproduce you will need the nahanni guest server code. The driver > code is not needed. You will also need a qcow2 or other bootable image > to use for launching qemu. The error occurs before the actual image > launch. > > Start the nahanni ivshmem server with a small global memory space ( > although the bug is not allocation specific ) > ivshmem -m 1 -n 2 -p /tmp/ivshmem_socket > > Next launch qemu with initialization for the ivshmem device. > qemu-system-x86_64 -hda test_iso.qcow2 -localtime -boot c -chardev > socket,path=3D"/tmp/ivshmem_socket",id=3Divshmem_socket -device > ivshmem,chardev=3Divshmem_socket,size=3D1,ioeventfd=3Don > > If gdb is used the following error is recorded: > Program received signal SIGSEGV, Segmentation fault. > 0x000055555579dd52 in setup_ioeventfds (s=3D0x555556619580) > at /home/genes/work/ubuntu/qemu-kvm-1.0+noroms/hw/ivshmem.c:367 > 367 for (j =3D 0; j < s->peers[i].nb_eventfds; j++) { > (gdb) print s->peers > $2 =3D (Peer *) 0x0 > > To manage notifications about this bug go to: > https://bugs.launchpad.net/qemu/+bug/1314857/+subscriptions > > --001a11c24a324d541304f974fdb2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello,

The patch for this later bug= has been proposed.=C2=A0=C2=A0 I'm not sure why it's not merged.
http://patchwork.ozlabs.org/patch/316785/

Cheers,
Cam


On Thu, May 1, 2014 at 10:53 AM, Gene Snider <gene@cvtt.net> wrote:
When I tried the same thing with git master = (latest) =C2=A0I get a different error:
qemu_chr_fe_claim_no_fail: error chardev "(null)" already used
** Also affects: qemu-kvm (Ubuntu)
=C2=A0 =C2=A0Importance: Undecided
=C2=A0 =C2=A0 =C2=A0 =C2=A0Status: New

--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https= ://bugs.launchpad.net/bugs/1314857

Title:
=C2=A0 seg fault in ivshmem when using ioeventfd=3Don

Status in QEMU:
=C2=A0 New
Status in =E2=80=9Cqemu-kvm=E2=80=9D package in Ubuntu:
=C2=A0 New

Bug description:
=C2=A0 When launching qemu with the ivshmem device and the nahanni guest =C2=A0 server there is segmentation fault in the setup_ioeventfds function = of
=C2=A0 ivshmem.c. If the ioeventfd=3Don flag is set the pci_ivshmem_init wi= ll
=C2=A0 call setup_ioeventfds at line 668. This function relies on the '= peers'
=C2=A0 member of the server info which is not allocated until line 669.

=C2=A0 To reproduce you will need the nahanni guest server code. The driver=
=C2=A0 code is not needed. You will also need a qcow2 or other bootable ima= ge
=C2=A0 to use for launching qemu. The error occurs before the actual image<= br> =C2=A0 launch.

=C2=A0 Start the nahanni ivshmem server with a small global memory space ( = although the bug is not allocation specific )
=C2=A0 ivshmem -m 1 -n 2 -p /tmp/ivshmem_socket

=C2=A0 Next launch qemu with initialization for the ivshmem device.
=C2=A0 qemu-system-x86_64 -hda test_iso.qcow2 -localtime -boot c -chardev s= ocket,path=3D"/tmp/ivshmem_socket",id=3Divshmem_socket -device iv= shmem,chardev=3Divshmem_socket,size=3D1,ioeventfd=3Don

=C2=A0 If gdb is used the following error is recorded:
=C2=A0 Program received signal SIGSEGV, Segmentation fault.
=C2=A0 0x000055555579dd52 in setup_ioeventfds (s=3D0x555556619580)
=C2=A0 =C2=A0 =C2=A0 at /home/genes/work/ubuntu/qemu-kvm-1.0+noroms/hw/ivsh= mem.c:367
=C2=A0 367 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 for (j =3D 0; j < s= ->peers[i].nb_eventfds; j++) {
=C2=A0 (gdb) print s->peers
=C2=A0 $2 =3D (Peer *) 0x0

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1314857/+subscriptions<= /a>


--001a11c24a324d541304f974fdb2--