Package: qemu-kvm
Version: 0.12.5+dfsg-5+squeeze6
Severity: important
Tags: upstream patch


Hi, it's currently not possible to hotplug NIC's using libvirt and as far as I 
can tell, it's qemu's fault.
When I try to hotplug a NIC I get the following error:

internal error unable to send TAP file handle: No file descriptor supplied via 
SCM_RIGHTS

I've been looking around for a while and found that Ubuntu includes a patch to 
fix this:

https://launchpad.net/ubuntu/+source/qemu-kvm/0.12.4+noroms-0ubuntu3

Could this be included in squeeze and lenny-backports? Or do you guys know of 
another way to hotplug network devices with libvirt? :-)

-- Package-specific info:


/proc/cpuinfo:

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 30
model name      : Intel(R) Xeon(R) CPU           X3450  @ 2.67GHz
stepping        : 5
cpu MHz         : 2660.403
cache size      : 8192 KB
physical id     : 0
siblings        : 8
core id         : 0
cpu cores       : 4
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 11
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm 
constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf 
pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 
popcnt lahf_lm tpr_shadow vnmi flexpriority ept vpid
bogomips        : 5320.80
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 30
model name      : Intel(R) Xeon(R) CPU           X3450  @ 2.67GHz
stepping        : 5
cpu MHz         : 2660.403
cache size      : 8192 KB
physical id     : 0
siblings        : 8
core id         : 1
cpu cores       : 4
apicid          : 2
initial apicid  : 2
fpu             : yes
fpu_exception   : yes
cpuid level     : 11
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm 
constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf 
pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 
popcnt lahf_lm tpr_shadow vnmi flexpriority ept vpid
bogomips        : 5319.72
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 2
vendor_id       : GenuineIntel
cpu family      : 6
model           : 30
model name      : Intel(R) Xeon(R) CPU           X3450  @ 2.67GHz
stepping        : 5
cpu MHz         : 2660.403
cache size      : 8192 KB
physical id     : 0
siblings        : 8
core id         : 2
cpu cores       : 4
apicid          : 4
initial apicid  : 4
fpu             : yes
fpu_exception   : yes
cpuid level     : 11
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm 
constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf 
pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 
popcnt lahf_lm tpr_shadow vnmi flexpriority ept vpid
bogomips        : 5319.72
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 3
vendor_id       : GenuineIntel
cpu family      : 6
model           : 30
model name      : Intel(R) Xeon(R) CPU           X3450  @ 2.67GHz
stepping        : 5
cpu MHz         : 2660.403
cache size      : 8192 KB
physical id     : 0
siblings        : 8
core id         : 3
cpu cores       : 4
apicid          : 6
initial apicid  : 6
fpu             : yes
fpu_exception   : yes
cpuid level     : 11
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm 
constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf 
pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 
popcnt lahf_lm tpr_shadow vnmi flexpriority ept vpid
bogomips        : 5319.72
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 4
vendor_id       : GenuineIntel
cpu family      : 6
model           : 30
model name      : Intel(R) Xeon(R) CPU           X3450  @ 2.67GHz
stepping        : 5
cpu MHz         : 2660.403
cache size      : 8192 KB
physical id     : 0
siblings        : 8
core id         : 0
cpu cores       : 4
apicid          : 1
initial apicid  : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 11
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm 
constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf 
pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 
popcnt lahf_lm tpr_shadow vnmi flexpriority ept vpid
bogomips        : 5319.71
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 5
vendor_id       : GenuineIntel
cpu family      : 6
model           : 30
model name      : Intel(R) Xeon(R) CPU           X3450  @ 2.67GHz
stepping        : 5
cpu MHz         : 2660.403
cache size      : 8192 KB
physical id     : 0
siblings        : 8
core id         : 1
cpu cores       : 4
apicid          : 3
initial apicid  : 3
fpu             : yes
fpu_exception   : yes
cpuid level     : 11
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm 
constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf 
pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 
popcnt lahf_lm tpr_shadow vnmi flexpriority ept vpid
bogomips        : 5319.70
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 6
vendor_id       : GenuineIntel
cpu family      : 6
model           : 30
model name      : Intel(R) Xeon(R) CPU           X3450  @ 2.67GHz
stepping        : 5
cpu MHz         : 2660.403
cache size      : 8192 KB
physical id     : 0
siblings        : 8
core id         : 2
cpu cores       : 4
apicid          : 5
initial apicid  : 5
fpu             : yes
fpu_exception   : yes
cpuid level     : 11
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm 
constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf 
pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 
popcnt lahf_lm tpr_shadow vnmi flexpriority ept vpid
bogomips        : 5319.72
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 7
vendor_id       : GenuineIntel
cpu family      : 6
model           : 30
model name      : Intel(R) Xeon(R) CPU           X3450  @ 2.67GHz
stepping        : 5
cpu MHz         : 2660.403
cache size      : 8192 KB
physical id     : 0
siblings        : 8
core id         : 3
cpu cores       : 4
apicid          : 7
initial apicid  : 7
fpu             : yes
fpu_exception   : yes
cpuid level     : 11
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm 
constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf 
pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 
popcnt lahf_lm tpr_shadow vnmi flexpriority ept vpid
bogomips        : 5319.70
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:




-- System Information:
Debian Release: 6.0.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages qemu-kvm depends on:
ii  adduser                3.112+nmu2        add and remove users and groups
ii  bridge-utils           1.4-5             Utilities for configuring the Linu
ii  iproute                20100519-3        networking and traffic control too
ii  libaio1                0.3.107-7         Linux kernel AIO access library - 
ii  libasound2             1.0.23-2.1        shared library for ALSA applicatio
ii  libbluetooth3          4.66-3            Library to use the BlueZ Linux Blu
ii  libbrlapi0.5           4.2-7             braille display access via BRLTTY 
ii  libc6                  2.11.2-10         Embedded GNU C Library: Shared lib
ii  libcurl3-gnutls        7.21.0-2          Multi-protocol file transfer libra
ii  libgnutls26            2.8.6-1           the GNU TLS library - runtime libr
ii  libncurses5            5.7+20100313-5    shared libraries for terminal hand
ii  libpci3                1:3.1.7-6         Linux PCI Utilities (shared librar
ii  libpulse0              0.9.21-3+squeeze1 PulseAudio client libraries
ii  libsasl2-2             2.1.23.dfsg1-7    Cyrus SASL - authentication abstra
ii  libsdl1.2debian        1.2.14-6.1        Simple DirectMedia Layer
ii  libuuid1               2.17.2-9          Universally Unique ID library
ii  libvdeplug2            2.2.3-3           Virtual Distributed Ethernet - Plu
ii  libx11-6               2:1.3.3-4         X11 client-side library
ii  python                 2.6.6-3+squeeze6  interactive high-level object-orie
ii  zlib1g                 1:1.2.3.4.dfsg-3  compression library - runtime

Versions of packages qemu-kvm recommends:
ii  linux-image-2.6.26-2-amd 2.6.26-26lenny2 Linux 2.6.26 image on AMD64
ii  linux-image-2.6.32-5-amd 2.6.32-35       Linux 2.6.32 for 64-bit PCs

Versions of packages qemu-kvm suggests:
pn  debootstrap                   <none>     (no description available)
pn  samba                         <none>     (no description available)
ii  vde2                          2.2.3-3    Virtual Distributed Ethernet

-- no debconf information

*** scm-rights-fd.patch
>From e53f27b9d9df73461308618151fa6e6392aebd85 Mon Sep 17 00:00:00 2001
From: Paolo Bonzini <pbonz...@redhat.com>
Date: Fri, 16 Apr 2010 15:25:23 +0000
Subject: stash away SCM_RIGHTS fd until a getfd command arrives

If there is already a fd in s->msgfd before recvmsg it is
closed by parts that this patch does not touch.  So, only
one descriptor can be "leaked" by attaching it to a command
other than getfd.

Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitul...@redhat.com>

diff -Nur qemu-kvm-0.12.4+noroms/monitor.c qemu-kvm-0.12.4+noroms.new/monitor.c
--- qemu-kvm-0.12.4+noroms/monitor.c    2010-05-09 06:05:19.000000000 -0500
+++ qemu-kvm-0.12.4+noroms.new/monitor.c        2010-06-16 11:01:57.000000000 
-0500
@@ -2294,15 +2294,6 @@
         return;
     }
 
-    fd = dup(fd);
-    if (fd == -1) {
-        if (errno == EMFILE)
-            qemu_error_new(QERR_TOO_MANY_FILES);
-        else
-            qemu_error_new(QERR_UNDEFINED_ERROR);
-        return;
-    }
-
     QLIST_FOREACH(monfd, &mon->fds, next) {
         if (strcmp(monfd->name, fdname) != 0) {
             continue;
diff -Nur qemu-kvm-0.12.4+noroms/qemu-char.c 
qemu-kvm-0.12.4+noroms.new/qemu-char.c
--- qemu-kvm-0.12.4+noroms/qemu-char.c  2010-05-09 06:05:19.000000000 -0500
+++ qemu-kvm-0.12.4+noroms.new/qemu-char.c      2010-06-16 11:03:40.000000000 
-0500
@@ -1955,7 +1955,9 @@
 {
     TCPCharDriver *s = chr->opaque;
 
-    return s->msgfd;
+    int fd = s->msgfd;
+    s->msgfd = -1;
+    return fd;
 }
 
 #ifndef _WIN32
@@ -2043,10 +2045,6 @@
             tcp_chr_process_IAC_bytes(chr, s, buf, &size);
         if (size > 0)
             qemu_chr_read(chr, buf, size);
-        if (s->msgfd != -1) {
-            close(s->msgfd);
-            s->msgfd = -1;
-        }
     }
 }
 



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to