-net socket,listen... segfaults

Bug #388197 reported by Chris Cowan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kvm (Ubuntu)
Fix Released
Low
Unassigned
qemu (Fedora)
Fix Released
Medium

Bug Description

Binary package hint: kvm

I'm trying to get two virtual machines on the same vlan, looking at directions from http://www.gnome.org/~markmc/qemu-networking.html .
When I use this command:
"kvm -cdrom ubuntu-9.04-desktop-i386.iso -net nic -net socket,listen=:8010"
I just get "Segmentation fault".

If I try to make it listen on a port that's in use or a privileged port, I get a sensible error instead as expected:
 bind: Permission denied
 Could not initialize device 'socket'

I'm using kvm package version 1:84+dfsg-0ubuntu12 in Ubuntu 9.04.

Revision history for this message
In , Harald (harald-redhat-bugs) wrote :

qemu-system-x86-0.10-16.fc11.x86_64

$ sudo qemu -hda test/root.ext2 -m 256M -net nic,macaddr=52:54:00:12:34:56 -net socket,listen=localhost:4567 -kernel /boot/vmlinuz-$(uname -r) -initrd test/initramfs.testing -append "root=/dev/sda rw"
Segmentation fault

problem is "-net socket,listen=..."

(gdb) bt
#0 strlen () at ../sysdeps/x86_64/strlen.S:31
#1 0x0000003f9987f166 in *__GI___strdup (s=0x0) at strdup.c:42
#2 0x00000000004865a7 in net_socket_listen_init (host_str=<value optimized out>,
    name=<value optimized out>, model=<value optimized out>, vlan=<value optimized out>) at net.c:1622
#3 net_client_init (host_str=<value optimized out>, name=<value optimized out>,
    model=<value optimized out>, vlan=<value optimized out>) at net.c:1914
#4 0x0000000000486d27 in net_client_parse (str=<value optimized out>) at net.c:2039
#5 0x000000000040cf2d in main (argc=<value optimized out>, argv=<value optimized out>,
    envp=<value optimized out>) at /usr/src/debug/qemu-kvm-0.10/qemu/vl.c:5738
(gdb) quit

Revision history for this message
In , Luiz (luiz-redhat-bugs) wrote :

Glauber, this is already fixed upstream (Avi's qemu-kvm.git tree) it's commit ea053add700d8abe203cd79a9ffb082aee4eabc0 .

I will attach the patch here (so that you can apply in the package, in case you won't rebase soon).

Revision history for this message
In , Luiz (luiz-redhat-bugs) wrote :

Created attachment 344893
upstream fix

Revision history for this message
In , Mark (mark-redhat-bugs) wrote :

Glauber proposed this for the stable branch:

  http://marc.info/?l=qemu-devel&m=124286670230504

We'll pull the patch into an update soon

Revision history for this message
In , Mark (mark-redhat-bugs) wrote :

I'm pushing a qemu-0.10.5-2.fc11 update to updates-testing with this fix.

* Wed Jun 3 2009 Mark McLoughlin <email address hidden> - 2:0.10.5-2
- Prevent locked cdrom eject - fixes hang at end of anaconda installs (#501412)
- Fix crash with '-net socket,listen=...' (#501264)
- Avoid harmless 'unhandled wrmsr' warnings (#499712)

Note, this is already fixed in qemu-0.10.50-4.kvm86

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

qemu-0.10.5-2.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/qemu-0.10.5-2.fc11

Revision history for this message
In , Bug (bug-redhat-bugs) wrote :

This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

qemu-0.10.5-2.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.

Changed in qemu (Fedora):
status: Unknown → Fix Released
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

I just added a watch on a Fedora bug. Looks like it's been fixed in upstream qemu, and should be fixed in Karmic as soon as I merge qemu-kvm.

If you interested in testing some (very) unsupported daily builds, you can test the pristine upstream daily qemu-kvm package build available at:
 * https://edge.launchpad.net/~qemu/+archive/ppa

:-Dustin

Changed in kvm (Ubuntu):
importance: Undecided → Low
milestone: none → ubuntu-9.10
status: New → Triaged
Changed in kvm (Ubuntu):
status: Triaged → Fix Released
Changed in qemu (Fedora):
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.