[Bug 1472500] Re: virt-manager. restore windows vm- Unknown savevm section type 5

2015-07-08 Thread Nigel Jones
Updated package to qemu after testing against the packages in
https://launchpad.net/ubuntu/+source/qemu (2.3 debs). With these
installed this bug does not occur. Note that I did remove USB
controller/redirector and changed spice-vnc in order to get the vm to
start since these 2.3 packages as of 8 July 2015 appear not to support
spice or usb

** Package changed: virt-manager (Ubuntu) = qemu (Ubuntu)

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to qemu in Ubuntu.
https://bugs.launchpad.net/bugs/1472500

Title:
  virt-manager. restore windows vm- Unknown savevm section type 5

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1472500/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1472571] Re: libvirt reporting spice not supported in 2.3.1

2015-07-08 Thread Nigel Jones
for reference this was the original bug which prompted me to consider
trying 2.3 https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1472500

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to qemu-kvm in Ubuntu.
https://bugs.launchpad.net/bugs/1472571

Title:
  libvirt reporting spice not supported in 2.3.1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qemu-kvm/+bug/1472571/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1472500] Re: virt-manager. restore windows vm- Unknown savevm section type 5

2015-07-08 Thread Nigel Jones
qemu 2.3.1 appears to fix this, though see
https://bugs.launchpad.net/ubuntu/+source/qemu-kvm/+bug/1472571 for the
new problem (unrelated) it causes. There is also no supported fix for
15.04

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to qemu in Ubuntu.
https://bugs.launchpad.net/bugs/1472500

Title:
  virt-manager. restore windows vm- Unknown savevm section type 5

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1472500/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1472571] [NEW] libvirt reporting spice not supported in 2.3.1

2015-07-08 Thread Nigel Jones
Public bug reported:

I am running Ubuntu 15.04 (not 15.10/dev). Due to another bug in qemu
2.2 I decided to try the 2.3.1 packages (from build here). I realise
there is potential dependency issues and the config is likely untested.

However as this could be a genuin issue, I wanted to report that With
these installed, along with latest libvirt I noticed that whilst the bug
I needed a fix to was addressed (a savevm issue), any VM configured to
use spice would not launch.

libvirt (via virt-manager) reports
Error starting domain: unsupported configuration: spice graphics are not 
supported with this QEMU
which is also reflected in syslog:
Jul  8 11:50:36 jonesn-ThinkPad-W530 libvirtd[2142]: unsupported configuration: 
spice graphics are not supported with this QEMU


On reviewing the build logs, it appears qemu HAS been built with spice ie it 
reports:
spice support yes (0.12.7/0.12.5)


As some additional validation I also then replaced these packages with another 
private ppa (a second opinion) - in no means official of course. 
https://launchpad.net/~jacob/+archive/ubuntu/virtualisation . These packages, 
which also include virt-manager also result in the same error

It's possible that spice support is being incorrectly validated

Relevant extracts  of my VM definition include

   emulator/usr/bin/kvm-spice/emulator

channel type='spicevmc'
  target type='virtio' name='com.redhat.spice.0'/
  address type='virtio-serial' controller='0' bus='0' port='1'/
/channel

graphics type='spice' autoport='yes'/

   video
  model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1'/
  address type='pci' domain='0x' bus='0x00' slot='0x02' 
function='0x0'/
/video

** Affects: qemu-kvm (Ubuntu)
 Importance: Undecided
 Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to qemu-kvm in Ubuntu.
https://bugs.launchpad.net/bugs/1472571

Title:
  libvirt reporting spice not supported in 2.3.1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qemu-kvm/+bug/1472571/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1181777] Re: kvm: freeze a guest with a NIC PCI passthrough

2013-09-18 Thread Nigel Jones
After getting the bug mail for this bug and reading it with interest, I
happened to run into this issue today myself and did some investigation
at a seabios level.

My original hit of the issue was with RHEL, but I reproduced it with the
same card (Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express
Gigabit Ethernet Controller  (PCI ID 10ec:8168)) on Ubuntu saucy.

The logs in QEMU logs list however the follow:

2013-09-18 11:09:37.307+: starting up
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin 
QEMU_AUDIO_DRV=none /usr/bin/kvm-spice -name test -S -machine 
pc-i440fx-1.5,accel=kvm,usb=off -m 1024 -realtime mlock=off -smp 
1,sockets=1,cores=1,threads=1 -uuid e2481510-dcb8-8bc3-8cc5-dfd51f5d73d7 
-no-user-config -nodefaults -chardev 
socket,id=charmonitor,path=/var/lib/libvirt/qemu/test.monitor,server,nowait 
-mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown 
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive 
file=/var/lib/libvirt/images/test.img,if=none,id=drive-ide0-0-0,format=raw 
-device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 
-drive 
file=/home/njones/pfSense-LiveCD-2.1-RELEASE-amd64.iso,if=none,id=drive-ide0-1-0,readonly=on,format=raw
 -device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -chardev 
pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -vnc 
127.0.0.1:0 -vga cirrus -device intel-hda,id=sound0,bus=pci.0,a
 ddr=0x3 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device 
pci-assign,configfd=24,host=06:00.0,id=hostdev0,bus=pci.0,addr=0x5 -device 
virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4
W: kvm binary is deprecated, please use qemu-system-x86_64 instead
char device redirected to /dev/pts/0 (label charserial0)
qemu-system-x86_64: -device 
pci-assign,configfd=24,host=06:00.0,id=hostdev0,bus=pci.0,addr=0x5: pci-assign: 
Cannot read from host /sys/bus/pci/devices/:06:00.0/rom
Device option ROM contents are probably invalid (check dmesg).
Skip option ROM probe with rombar=0, or load from file with romfile=
[after virsh destroy]
qemu: terminating on signal 15 from pid 1143
2013-09-18 11:13:54.183+: shutting down

At the same time, dmesg reports:

[  412.463287] pci-stub :06:00.0: claimed by stub
[  413.177444] type=1400 audit(1379502837.636:78): apparmor=STATUS 
operation=profile_load parent=2874 profile=unconfined 
name=libvirt-e2481510-dcb8-8bc3-8cc5-dfd51f5d73d7 pid=2875 
comm=apparmor_parser
[  413.178897] type=1400 audit(1379502837.636:79): apparmor=DENIED 
operation=capable parent=1 profile=/usr/sbin/libvirtd pid=1148 
comm=libvirtd pid=1148 comm=libvirtd capability=29  capname=audit_write
[  414.330150] assign device 0:6:0.0
[  414.330585] pci-stub :06:00.0: Invalid ROM contents

virsh edit'ing the VM and adding rom bar='off'/ to the hostdev
entry to read:

hostdev mode='subsystem' type='pci' managed='yes'
  source
address domain='0x' bus='0x06' slot='0x00' function='0x0'/
  /source
  rom bar='off'/
  address type='pci' domain='0x' bus='0x00' slot='0x05' 
function='0x0'/
/hostdev

caused the message to go away.

I applied the same element on the RHEL machine, which also seemed to
solve that problem, so it's possible that precise also needs this
option.

I'm suspecting what is happening is that the ROM on the network devices
is confusing seabios/coreboot but need to do some more digging first.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to ipxe in Ubuntu.
https://bugs.launchpad.net/bugs/1181777

Title:
  kvm: freeze a guest with a NIC PCI passthrough

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ipxe/+bug/1181777/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 455832] Re: segfault when attaching disk with same physical device

2010-09-18 Thread Nigel Jones
FYI: The uploaded package still works:

njo...@fantail:~$ apt-cache policy libvirt-bin
libvirt-bin:
  Installed: 0.7.5-5ubuntu27.3
  Candidate: 0.7.5-5ubuntu27.3
  Version table:
 *** 0.7.5-5ubuntu27.3 0
500 http://nz.archive.ubuntu.com/ubuntu/ lucid-proposed/main Packages
100 /var/lib/dpkg/status
 0.7.5-5ubuntu27.2 0
500 http://nz.archive.ubuntu.com/ubuntu/ lucid-updates/main Packages
 0.7.5-5ubuntu27 0
500 http://nz.archive.ubuntu.com/ubuntu/ lucid/main Packages
njo...@fantail:~$ virsh list; virsh destroy lucid-test; virsh start lucid-test; 
virsh attach-device lucid-test /tmp/455832.xml; virsh attach-device lucid-test 
/tmp/455832.xml
 Id Name State
--

error: Failed to destroy domain lucid-test
error: Requested operation is not valid: domain is not running

Domain lucid-test started

Device attached successfully

error: Failed to attach device from /tmp/455832.xml
error: operation failed: target vdc already exists

-- 
segfault when attaching disk with same physical device
https://bugs.launchpad.net/bugs/455832
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to libvirt in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 571093] Re: [SRU] multipath + libvirtd eats away more memory over time

2010-09-18 Thread Nigel Jones
I've tested this bug again w/ the new patch, it is working fine as
expected for me, w/ no increase of RES memory while running the
multipath commands to add/remove devices in udev.

Looks ready to me (and w/ my testing of bug #455832), it should be ready
for pushing.

-- 
[SRU] multipath + libvirtd eats away more memory over time
https://bugs.launchpad.net/bugs/571093
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to libvirt in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 571093] Re: [SRU] multipath + libvirtd eats away more memory over time

2010-09-18 Thread Nigel Jones
** Tags added: verification-done
** Tags removed: verification-needed

-- 
[SRU] multipath + libvirtd eats away more memory over time
https://bugs.launchpad.net/bugs/571093
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to libvirt in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 455832] Re: segfault when attaching disk with same physical device

2010-09-18 Thread Nigel Jones
To be clear, when I said FYI: The uploaded package still works: I had
meant:

The uploaded package contains the correct fix.

The 'target vdc already exists' error message is the correct error
message for this patch.

** Tags added: verification-done
** Tags removed: verification-needed

-- 
segfault when attaching disk with same physical device
https://bugs.launchpad.net/bugs/455832
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to libvirt in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 615077] Re: [Maverick] SDL local window broken in last update

2010-08-31 Thread Nigel Jones
I can confirm this on a clean install from the Maverick 20100816 Desktop
CD Build (will update shortly in case another update has fixed it), I
have a feeling that this might be an X bug.

Running via virt-manager I get exactly the same output as Dave, however
when running from a gnome-terminal session I get the following output:

r...@njones-laptop:~# LC_ALL=C 
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin 
XAUTHORITY=/root/.Xauthority DISPLAY=:0.0 /usr/bin/kvm -S -M pc-0.12 
-enable-kvm -m 512 -smp 1,sockets=1,cores=1,threads=1 -name sdl-test -uuid 
ea5b78aa-3611-fdbb-8d94-219b01bb6e7f -nodefaults -chardev 
socket,id=monitor,path=/var/lib/libvirt/qemu/sdl-test.monitor,server,nowait 
-mon chardev=monitor,mode=readline -rtc base=utc -boot c -drive 
file=/var/lib/libvirt/images/sdl-test.img,if=none,id=drive-virtio-disk0,boot=on,format=raw
 -device 
virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0 
-drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device 
ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -device 
virtio-net-pci,vlan=0,id=net0,mac=52:54:00:9a:c7:b7,bus=pci.0,addr=0x3 -net 
tap,fd=44,vlan=0,name=hostnet0 -chardev pty,id=serial0 -device 
isa-serial,chardev=serial0 -usb -sdl -vga cirrus -device 
virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6 
char device redirected to /dev/pts/4
TUNGETIFF ioctl() failed: Bad file descriptor
TUNSETOFFLOAD ioctl() failed: Bad file descriptor
pci_add_option_rom: failed to find romfile pxe-virtio.bin
No protocol specified
No protocol specified
init kbd.
Could not open SDL display

(notice extra line 'init kbd', I have a feeling that the TUNGETIFF and
TUNSETOFFLOAD issues are unrelated, but will check shortly as well)

When run from the CLI, the screen goes blank (LCD backlight is still
powered though)  if I say SSH in and reboot, the machine goes down but
instead of the normal shutdown animation, the graphics are dirty like
zebra (corrupted quite badly, and very colourful).

Certainly feels like an X bug to me, especially as there doesn't seem to
have been any changes in upstream sdl.c.  Rationale is that my Xorg logs
show:

[  1004.863] (II) AIGLX: Suspending AIGLX clients for VT switch

at around time of the crash  the graphics corruption.

** Changed in: qemu-kvm (Ubuntu)
   Status: New = Confirmed

-- 
[Maverick] SDL local window broken in last update
https://bugs.launchpad.net/bugs/615077
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to qemu-kvm in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 615077] Re: [Maverick] SDL local window broken in last update

2010-08-31 Thread Nigel Jones
More testing: only happens if XAUTHORITY is set as an environment
variable it seems, an interesting thing to note is that xhost doesn't
work either, so it doesn't look like an AIGLX bug (I disabled it) but it
does look X related.

-- 
[Maverick] SDL local window broken in last update
https://bugs.launchpad.net/bugs/615077
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to qemu-kvm in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 615077] Re: [Maverick] SDL local window broken in last update

2010-08-31 Thread Nigel Jones
** Tags added: regression-potential

-- 
[Maverick] SDL local window broken in last update
https://bugs.launchpad.net/bugs/615077
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to qemu-kvm in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 615077] Re: [Maverick] SDL local window broken in last update

2010-08-31 Thread Nigel Jones
I've tagged the bug regression-potential as it looks like a regression
between Lucid  Maverick, here is what I know from reproducing:

Reproduction:
Bug can be reproduced by creating (in virt-manager) on a clean Maverick 
install, by creating a virtual machine, editing the configuration (using 
virt-manager), remove the VNC device, and replace it with an SDL Local device.  
Upon starting the machine, it will not start and after a period will display an 
error to such effect.

If you access /var/log/libvirt/qemu/vmname.log and copy  paste the
kvm command (along w/ environment variables, you will likely crash X
completely.

I have also successfully reproduced this issue w/ upstream git HEAD 
qemu-kvm_0.12.4+noroms-0ubuntu6_amd64.deb (earlier version that what
Dave suggested the issue started with).

Observations:
When $XAUTHORITY is set correctly (when running the command manually - also 
likely if you 'virsh edit $vmname' and set the path there as well), an strace 
looks fairly normal, and similar to that of under Lucid, no framebuttle calls 
etc.

When $XAUTHORITY is not set correctly and is run from the terminal
(gnome-terminal for instance) it looks like the KVM command attempts to
open the framebuffer (/dev/fb) and perform a lot of ioctl calls on it
(http://www.linuxjournal.com/article/2783 for a good explanation in
laymans terms of what the ioctls are calling for), as a result Xorg
pretty much dies, the screen goes blank (but backlight is still on), but
there is no ability to switch VTs etcs, it is only possible to SSH into
the machine.  The KVM process also dies.

I found that generating an X configuration disabling AIGLX  booting w/
'nomodeset' (and removing the quiet  splash in the process) allowed me
to recover w/ Ctrl+Alt+F1, Ctrl+Alt+F7, and Ctrl+C the process (it is
still running, unlike w/ modesetting/aiglx).

For reference, this machine is running a fairly bog standard fresh
installation (now fully up to date) and has a ATI Mobility Radeon HD
4500 Series card, using the open source modules/etc, I've had no
problems w/ KVM/etc on this laptop (under both Ubuntu  Fedora) in the
past, both using the open source graphics.

I'll upload strace output in a moment...

-- 
[Maverick] SDL local window broken in last update
https://bugs.launchpad.net/bugs/615077
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to qemu-kvm in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 615077] Re: [Maverick] SDL local window broken in last update

2010-08-31 Thread Nigel Jones

** Attachment added: strace Output - parent process
   
https://bugs.launchpad.net/ubuntu/+source/qemu-kvm/+bug/615077/+attachment/1531966/+files/qemuregbroke.1904.gz

-- 
[Maverick] SDL local window broken in last update
https://bugs.launchpad.net/bugs/615077
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to qemu-kvm in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 589063] Re: Windows Server 2008 won't boot with more than 4 vCPUs

2010-08-30 Thread Nigel Jones
Thanks for the testing Troy.

Just attaching the individual patch from the debdiff for now, I'll check
w/ the Server Team regarding getting this as an SRU.

** Patch added: Patch included in SRU Debdiff 
0001-fix-PkgLength-calculation-for-the-SSDT.patch
   
https://bugs.launchpad.net/ubuntu/+source/qemu-kvm/+bug/589063/+attachment/1528933/+files/0001-fix-PkgLength-calculation-for-the-SSDT.patch

-- 
Windows Server 2008 won't boot with more than 4 vCPUs
https://bugs.launchpad.net/bugs/589063
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to qemu-kvm in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 619302] Re: kvm -initrd 'file' dumps core if 'file' does not exist

2010-08-30 Thread Nigel Jones
I've done a bit of digging here:

I encounter the issue in both Lucid and Maverick.

gdb on the generated core, w/ a 'bt' shows:

snip
#2  0x0046f2c5 in oom_check (size=value optimised out)
at qemu-malloc.c:30
#3  qemu_malloc (size=value optimised out) at qemu-malloc.c:59
#4  0x0044a616 in load_linux (fw_cfg=0x275e060, 
kernel_filename=value optimised out, 
initrd_filename=0x7fff8a0e45d5 baabaablacksheep, 
kernel_cmdline=value optimised out, max_ram_size=value optimised out)
at /build/buildd/qemu-kvm-0.12.3+noroms/hw/pc.c:876
snip

hw/pc.c:876 is an attempt to allocate memory for the size of the initrd,
the function that calculates the size of the initrd returns '-1' if the
file doesn't exist.

Upstream have patched it though to check for an initrd size of -1 and
I'm in the process of grabbing the particular change and getting as a
diff that could be applied.

-- 
kvm -initrd 'file' dumps core if 'file' does not exist
https://bugs.launchpad.net/bugs/619302
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to qemu-kvm in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 619302] Re: kvm -initrd 'file' dumps core if 'file' does not exist

2010-08-30 Thread Nigel Jones
Upstream have fixed this in commit
d6fa4b77fb8f27ac84cf23fb1e15016673d98a47

Which I have modified for what we currently have in Lucid  Maverick,
the patch seems to apply cleanly.

Tested with Maverick already and seems to be fine.

** Patch added: Proposed patch from upstream git
   
https://bugs.launchpad.net/ubuntu/+source/qemu-kvm/+bug/619302/+attachment/1529684/+files/check-for-invalid-initrd-file.patch

** Tags added: patch

-- 
kvm -initrd 'file' dumps core if 'file' does not exist
https://bugs.launchpad.net/bugs/619302
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to qemu-kvm in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 619302] Re: kvm -initrd 'file' dumps core if 'file' does not exist

2010-08-30 Thread Nigel Jones
** Changed in: qemu-kvm (Ubuntu)
   Status: New = Confirmed

-- 
kvm -initrd 'file' dumps core if 'file' does not exist
https://bugs.launchpad.net/bugs/619302
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to qemu-kvm in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 589063] Re: Windows Server 2008 won't boot with more than 4 vCPUs

2010-08-27 Thread Nigel Jones
I've had a bit more of a look...

I have been experimenting w/ Windows 2008 64-bit original release
installing the Enterprise edition.

Lucid ships with seabios 0.5.1-0ubuntu2 which experiences the issue.
Maverick ships with seabios 0.6.0-0ubuntu1 which from my testing doesn't.

I did a quick rebuild of 0.6.0-0ubuntu1 for Lucid, and I can boot a 5
vCPU Enterprise VM okay, which I couldn't before.

So it looks like the issue is somewhere upstream between Jan 2010 and
early July 2010...

** Also affects: seabios (Ubuntu)
   Importance: Undecided
   Status: New

-- 
Windows Server 2008 won't boot with more than 4 vCPUs
https://bugs.launchpad.net/bugs/589063
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to qemu-kvm in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 589063] Re: Windows Server 2008 won't boot with more than 4 vCPUs

2010-08-27 Thread Nigel Jones
** Changed in: seabios (Ubuntu)
   Status: New = Confirmed

-- 
Windows Server 2008 won't boot with more than 4 vCPUs
https://bugs.launchpad.net/bugs/589063
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to qemu-kvm in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 589063] Re: Windows Server 2008 won't boot with more than 4 vCPUs

2010-08-27 Thread Nigel Jones
I isolated fix to upstream patch
http://git.linuxtogo.org/?p=kevin/seabios.git;a=blobdiff;f=src/acpi.c;h=244536a276ae360f016e58b2eefaee83654abd75;hp=f613b034120d3595f9e9c4104acffbeae8dbd228;hb=3012af189e0f89bd33df1c0711a46f098053e9a7;hpb=92a5742b5f9f217ba6315fa13d075ba98ebc3fd6

If someone wants to test it to verify the fix, I've built a PPA package
with the bug fix at https://launchpad.net/~dev-
nigelj/+archive/bugtest/+packages, and find attached a SRU ready debdiff
that includes the upstream patch, plus adds quilt/dpkg-source V3 (quilt)
requirements to match Maverick.

** Patch added: seabios-0.5.1-0ubuntu2.1 SRU-Ready debdiff
   
https://bugs.launchpad.net/ubuntu/+source/seabios/+bug/589063/+attachment/1522634/+files/589063-seabios.debdiff

-- 
Windows Server 2008 won't boot with more than 4 vCPUs
https://bugs.launchpad.net/bugs/589063
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to qemu-kvm in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 589063] Re: Windows Server 2008 won't boot with more than 4 vCPUs

2010-08-27 Thread Nigel Jones
I was going to try and get hold of Dustin via IRC, but I wasn't able to.

I'm not sure how this package fits into the Server SRU picture, and I'm
not really in a position to call how safe an ACPI change like this on
it's own is (although, this was the first of only a few that I can tell
between 0.5.1  0.6.0 that upstream performed, so I'd hazard a guess
that it is safe.

I really thing it deserves some testing/oversight from separate eyes
before it even goes into -proposed etc.

In addition I don't have a box w/ more than 4 cores, I was reproducing
the issue by over-committing CPU resources, so I think it really needs
to be tested on more server-ish type hardware.

-- 
Windows Server 2008 won't boot with more than 4 vCPUs
https://bugs.launchpad.net/bugs/589063
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to qemu-kvm in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 455832] Re: segfault when attaching disk with same physical device

2010-08-26 Thread Nigel Jones
Attached is proposed debdiff for SRU.

Also includes updated patch for Bug #571093

** Description changed:

  I was testing attaching and detaching an AoE block device and all was
  going fine until I tried to attach a device twice in a row without
  changing the target device. Doing so resulted in a segfault. My example
  uses AoE but I bet any disk type='block' would work. This is easily a
  local DoS for libvirtd for anyone one in the libvirtd group or more than
  likely a remote user who has access to qemu+ssh://vuln host/system.
  
  This happens with the apparmor security driver disabled too (ie, edit
  /etc/libvirt/qemu.conf to have 'security = none' and restart
  /etc/init.d/libvirt-bin).
  
  Eg:
  $ cat  /tmp/aoe.xml  EOM
  disk type='block'
-   driver name='virtio'/
-   source dev='/dev/etherd/e2.2'/
-   target dev='vda' bus='virtio'/
+   driver name='virtio'/
+   source dev='/dev/etherd/e2.2'/
+   target dev='vda' bus='virtio'/
  /disk
  EOM
-  
- $ virsh attach-device sec-karmic-amd64 /tmp/aoe.xml 
+ 
+ $ virsh attach-device sec-karmic-amd64 /tmp/aoe.xml
  Connecting to uri: qemu:///system
  Device attached successfully
  
- $ virsh detach-device sec-karmic-amd64 /tmp/aoe.xml 
+ $ virsh detach-device sec-karmic-amd64 /tmp/aoe.xml
  Connecting to uri: qemu:///system
  Device detached successfully
  
- $ virsh attach-device sec-karmic-amd64 /tmp/aoe.xml 
+ $ virsh attach-device sec-karmic-amd64 /tmp/aoe.xml
  Connecting to uri: qemu:///system
  Device attached successfully
  
- $ virsh attach-device sec-karmic-amd64 /tmp/aoe.xml 
+ $ virsh attach-device sec-karmic-amd64 /tmp/aoe.xml
  Connecting to uri: qemu:///system
  error: Failed to attach device from /tmp/aoe.xml
  error: server closed connection
  
  $ dmesg| tail -1
  [ 1006.485494] libvirtd[2909]: segfault at 70 ip 004345f2 sp 
7f1f75c73b70 error 4 in libvirtd[40+77000]
  
- 
- If you start libvirtd in another window under gdb, you can see the issue:
+ If you start libvirtd in another window under gdb, you can see the
+ issue:
  
  $ sudo gdb libvirtd
  GNU gdb (GDB) 7.0-ubuntu
  Copyright (C) 2009 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.  Type show copying
  and show warranty for details.
  This GDB was configured as x86_64-linux-gnu.
  For bug reporting instructions, please see:
  http://www.gnu.org/software/gdb/bugs/...
  Reading symbols from /usr/sbin/libvirtd...(no debugging symbols found)...done.
  (gdb) run
- Starting program: /usr/sbin/libvirtd 
+ Starting program: /usr/sbin/libvirtd
  [Thread debugging using libthread_db enabled]
  16:26:02.316: warning : qemudStartup:521 : Unable to create cgroup for 
driver: No such device or address
  16:26:02.572: warning : lxcStartup:1460 : Unable to create cgroup for driver: 
No such device or address
  [New Thread 0x7f8fb8346910 (LWP 4645)]
  [New Thread 0x7f8fb7b45910 (LWP 4646)]
  [New Thread 0x7f8fb7344910 (LWP 4647)]
  [New Thread 0x7f8fb6b43910 (LWP 4648)]
  [New Thread 0x7f8fb6342910 (LWP 4649)]
  WARNING: Unhandled message: interface=org.freedesktop.DBus.Introspectable, 
path=/, member=Introspect
  16:26:11.730: error : qemudDomainAttachPciDiskDevice:4857 : operation failed: 
target vda already exists
  libvir: QEMU error : operation failed: target vda already exists
  
  Program received signal SIGSEGV, Segmentation fault.
  [Switching to Thread 0x7f8fb7344910 (LWP 4647)]
  0x004345f2 in ?? ()
  (gdb) bt
  #0  0x004345f2 in ?? ()
  #1  0x0043489c in ?? ()
  #2  0x00434b94 in ?? ()
  #3  0x00434d91 in ?? ()
  #4  0x0042cc2a in ?? ()
  #5  0x7f8fbcc53b01 in virDomainAttachDevice () from /usr/lib/libvirt.so.0
  #6  0x0041dddf in ?? ()
  #7  0x0041f5c6 in ?? ()
  #8  0x0041f884 in ?? ()
  #9  0x00413a5c in ?? ()
  #10 0x7f8fbacfba04 in start_thread (arg=value optimized out)
- at pthread_create.c:300
+ at pthread_create.c:300
  #11 0x7f8fbaa657bd in clone ()
- at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
+ at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
  #12 0x in ?? ()
+ 
+ 
+ SRU:
+  * IMPACT: If affected, libvirtd will crash unexpectedly when attempting to 
attach a disk device to a running Virtual Machine when it is already attached.
+  * ADDRESSED: The patch prevents libvirt from entering a code path when 
cgroups are not used, thus preventing a NULL Pointer Exception/Dereference from 
occuring.
+  * PATCH: Modification of my attached patch to match upstream patch.
+  * TEST CASE: 
+ 
+ 1. Create/use any existing KVM virtual machine
+ 2. Insert the contents below into a file called /tmp/455832-testcase.xml
+ 
+ ---
+ disk type='block'
+   driver name='virtio'/
+   source dev='/dev/sdd'/
+   target dev='vdc' bus='virtio'/
+ /disk
+ ---
+   

[Bug 571093] Re: [SRU] multipath + libvirtd eats away more memory over time

2010-08-26 Thread Nigel Jones
I've included the attached patch in an SRU candidate for Bug #455832,
you can view the proposed debdiff there.

** Patch added: 9024-free-memory-for-invalid-devices.patch
   
https://bugs.launchpad.net/ubuntu/+source/multipath-tools/+bug/571093/+attachment/1520540/+files/9024-free-memory-for-invalid-devices.patch

-- 
[SRU] multipath + libvirtd eats away more memory over time
https://bugs.launchpad.net/bugs/571093
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to libvirt in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 589063] Re: Windows Server 2008 won't boot with more than 4 vCPUs

2010-08-26 Thread Nigel Jones
I can confirm this is an issue in Lucid w/ qemu-kvm 0.12.3+noroms-
0ubuntu9.

Microsoft Kbase has a little bit of details of specifically is likely to
be wrong, at http://support.microsoft.com/kb/314830 (browse down to
0x0011)

-- 
Windows Server 2008 won't boot with more than 4 vCPUs
https://bugs.launchpad.net/bugs/589063
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to qemu-kvm in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 571093] Re: [SRU] multipath + libvirtd eats away more memory over time

2010-08-16 Thread Nigel Jones
Steve,

Looks like the latest version of the patch was not applied (libvirt
maintainers applied a modified patch to upstream that fixed a couple
more memory leaks.

This version does work, but I know others still had some lingering
problems that I couldn't reproduce.

The patch they are now using is:
http://libvirt.org/git/?p=libvirt.git;a=commit;h=e7f3bad46edf352abd9f700af9ec59882762c4ca

But it does currently WFM.

-- 
[SRU] multipath + libvirtd eats away more memory over time
https://bugs.launchpad.net/bugs/571093
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to libvirt in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 567701] Re: Date not updated by ntp when network interfaces started

2010-05-26 Thread Nigel Jones
Just to note, this appears to be working out of the box with current
Maverick packages for me, there appears to be quite a few changes to NTP
packaging as well.

-- 
Date not updated by ntp when network interfaces started
https://bugs.launchpad.net/bugs/567701
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to ntp in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 585027] Re: Race condition with dmsetup causes 'map already present' messages

2010-05-26 Thread Nigel Jones
Yes, as stated in my original comment, it is reproducible (myself and
Dustin Kirkland), with variants of while true; do sudo multipath -F;
sudo multipath -v4 ; done.

All that is required is a device that multipath will create a
/dev/mapper entry for (use_friendly_names or not) and remove with -F (as
exampled in my original comment, a bog standard Hard Disk drive will be
fit for the purpose.

** Changed in: multipath-tools (Ubuntu)
   Status: Incomplete = New

-- 
Race condition with dmsetup causes 'map already present' messages
https://bugs.launchpad.net/bugs/585027
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to multipath-tools in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 455832] Re: segfault when attaching disk with same physical device

2010-05-25 Thread Nigel Jones
** Tags added: patch

-- 
segfault when attaching disk with same physical device
https://bugs.launchpad.net/bugs/455832
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to libvirt in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 571093] Re: [SRU] multipath + libvirtd eats away more memory over time

2010-05-25 Thread Nigel Jones
Ariel,

What was the previous rate of increase?

I don't personally have the hardware to reproduce the issue (looks like
ocfs2 + EMC SAN based on your udev output), so could you maybe provide
the following:

 * valgrind -v --leak-check=full --show-reachable=yes /usr/sbin/libvirtd -v
  (Once it's settled and you've observed that the RES memory has increased 
Ctrl+C valgrind and attach the output)
 * LIBVIRT_DEBUG=1 libvirtd -v
  (Again, try to collect the debug messages while the change events are 
occurring)

I'll see if I can work it out more with that info.

-- 
[SRU] multipath + libvirtd eats away more memory over time
https://bugs.launchpad.net/bugs/571093
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to libvirt in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 571093] Re: multipath + libvirtd eats away more memory over time

2010-05-24 Thread Nigel Jones
I've had another look at this bug, reproducing etc, this time through
GDB, with the output from valgrind  the debug output in my last two
posts, here is what I believe is happening:

1. multipath -v4 gets called (or other appropriate trigger)
 - multipath detects a device that it believes is new, which triggers a udev 
add/change event
2. libvirt picks up on the events and runs the code within 
udevAddOneDevice(device)
3. While running around it seems that one of the if functions around 
node_device_udev.c:1230 returns non zero and hits the 'goto out' call.
4. As a result virNodeDeviceDefFree(def); does not get called and libvirt still 
thinks that the device exists.
5. When multipath realizes itself that the device isn't worth anything it 
triggers a udev remove call.
6. libvirt tries to remove the device but fails early on because it doesn't 
know what udev is talking about, and again doesn't free memory.

For what it's worth, just before the goto out call was made gdb was about to 
tell me the following:
(gdb) p def
$4 = (virNodeDeviceDefPtr) 0x1cabd70
(gdb) x/t def
0x1cabd70:  
(gdb) x/3x def
0x1cabd70:  0x  0x  0x
(gdb) x/s def
0x1cabd70:   

I've got a distinct feeling that if virNodeDeviceDefFree(def) was called
before the function returned, this memory leak wouldn't have happened.

I'm going to give it a test and see what happens.

-- 
multipath + libvirtd eats away more memory over time
https://bugs.launchpad.net/bugs/571093
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to libvirt in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 571093] Re: multipath + libvirtd eats away more memory over time

2010-05-24 Thread Nigel Jones
Okay, I've created a patch that should fix the issue in two ways, first
as observed in my previous comment I suspected that adding a
virNodeDeviceDefFree(def) to udevAddOneDevice() would solve the issue,
it for the most part did but still left approximately an 8k RES memory
leak.

Looking at the valgrind data that I had managed to generate (Comment
#13) I suspected a second leak and noticed that
udevProcessDeviceListEntry() after running udevAddOneDevice() ran
udev_device_unref(device); which according to the udev code does:

 * Drop a reference of a udev device. If the refcount reaches zero,
 * the resources of the device will be released.

Based on the fact that the reference is wiped at the end of
udevProcessDeviceListEntry() I have added it to
udevEventHandleCallback() which is the other main location of
udevAddOneDevice() getting called.

This is now resulting in no increase in RES memory (except for natural
increases).

Patch is attached.

** Patch added: Rough patch that appears to fix the two main causes.
   
http://launchpadlibrarian.net/49024396/9024-free-memory-for-invalid-devices.patch

-- 
multipath + libvirtd eats away more memory over time
https://bugs.launchpad.net/bugs/571093
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to libvirt in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 585027] [NEW] Race condition with dmsetup causes 'map already present' messages

2010-05-24 Thread Nigel Jones
Public bug reported:

Binary package hint: multipath-tools

Environment:

njo...@fantail:~$ lsb_release -rd
Description:Ubuntu 10.04 LTS
Release:10.04
njo...@fantail:~$ apt-cache policy multipath-tools
multipath-tools:
  Installed: 0.4.8-14ubuntu4
  Candidate: 0.4.8-14ubuntu4
  Version table:
 *** 0.4.8-14ubuntu4 0
500 http://nz.archive.ubuntu.com/ubuntu/ lucid/main Packages
100 /var/lib/dpkg/status

Issue:

While reproducing
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/571093 both
myself and Dustin Kirkland encountered an apparent race condition in
multipath and dmsetup.

We were attempting variants of 'while true; do sudo multipath -F; sudo
multipath -v4 ; done' to create a set of udev add/remove events and
noticed that shortly after starting, no output appeared within the
'udevadm monitor' command.

We observed that the output from a: multipath -v4 was similar to:

r...@fantail:~# multipath -v4
Discover device /sys/block/ram0
ram0: device node name blacklisted
Discover device /sys/block/ram1
ram1: device node name blacklisted
Discover device /sys/block/ram2
ram2: device node name blacklisted
Discover device /sys/block/ram3
ram3: device node name blacklisted
Discover device /sys/block/ram4
ram4: device node name blacklisted
Discover device /sys/block/ram5
ram5: device node name blacklisted
Discover device /sys/block/ram6
ram6: device node name blacklisted
Discover device /sys/block/ram7
ram7: device node name blacklisted
Discover device /sys/block/ram8
ram8: device node name blacklisted
Discover device /sys/block/ram9
ram9: device node name blacklisted
Discover device /sys/block/ram10
ram10: device node name blacklisted
Discover device /sys/block/ram11
ram11: device node name blacklisted
Discover device /sys/block/ram12
ram12: device node name blacklisted
Discover device /sys/block/ram13
ram13: device node name blacklisted
Discover device /sys/block/ram14
ram14: device node name blacklisted
Discover device /sys/block/ram15
ram15: device node name blacklisted
Discover device /sys/block/loop0
loop0: device node name blacklisted
Discover device /sys/block/loop1
loop1: device node name blacklisted
Discover device /sys/block/loop2
loop2: device node name blacklisted
Discover device /sys/block/loop3
loop3: device node name blacklisted
Discover device /sys/block/loop4
loop4: device node name blacklisted
Discover device /sys/block/loop5
loop5: device node name blacklisted
Discover device /sys/block/loop6
loop6: device node name blacklisted
Discover device /sys/block/loop7
loop7: device node name blacklisted
Discover device /sys/block/sda
sda: not found in pathvec
sda: mask = 0x1f
sda: dev_t = 8:0
sda: size = 625142448
sda: subsystem = scsi
sda: vendor = ATA
sda: product = WDC WD3200AAKS-0
sda: rev = 12.0
sda: h:b:t:l = 0:0:0:0
sda: serial = WD-WCAS7070
sda: getprio = NULL (internal default)
sda: prio = 1
sda: getuid = /lib/udev/scsi_id -g -u -d /dev/%n (config file default)
sda: uid = 1ATA_WDC_WD3200AAKS-00TMA0_WD-WCAS7070 (callout)
Discover device /sys/block/sr0
sr0: device node name blacklisted
Discover device /sys/block/sdb
sdb: not found in pathvec
sdb: mask = 0x1f
sdb: dev_t = 8:16
sdb: size = 15679488
sdb: subsystem = scsi
sdb: vendor = Kingston
sdb: product = DataTraveler G2
sdb: rev = PMAP
sdb: h:b:t:l = 6:0:0:0
sdb: serial =
sdb: getprio = NULL (internal default)
sdb: prio = 1
sdb: getuid = /lib/udev/scsi_id -g -u -d /dev/%n (config file default)
error calling out /lib/udev/scsi_id -g -u -d /dev/sdb
Discover device /sys/block/sdc
sdc: not found in pathvec
sdc: mask = 0x1f
sdc: dev_t = 8:32
sdc: size = 41943040
sdc: subsystem = scsi
sdc: vendor = IET
sdc: product = VIRTUAL-DISK
sdc: rev = 0
sdc: h:b:t:l = 7:0:0:0
sdc: serial =
sdc: getprio = NULL (internal default)
sdc: prio = 1
sdc: getuid = /lib/udev/scsi_id -g -u -d /dev/%n (config file default)
error calling out /lib/udev/scsi_id -g -u -d /dev/sdc
Discover device /sys/block/dm-0
dm-0: device node name blacklisted
Discovery status 0
= paths list =
uuid   hcildev dev_t pri dm_st  chk_st
1ATA_WDC_WD3200AAKS-00TMA0_WD-WCAS7070 0:0:0:0 sda 8:0   1   [undef][undef
   6:0:0:0 sdb 8:16  1   [undef][undef
   7:0:0:0 sdc 8:32  1   [undef][undef
sda: ownership set to 1ATA_WDC_WD3200AAKS-00TMA0_WD-WCAS7070
sda: not found in pathvec
sda: mask = 0xc
sda: path checker = directio (config file default)
directio: called for 800
directio: called in synchronous mode
directio: starting new request
directio: async io getevents returns 1 (errno=No such file or directory)
directio: io finished 4096/0
sda: state = 2
sda: prio = 1
1ATA_WDC_WD3200AAKS-00TMA0_WD-WCAS7070: pgfailover = -1 (internal default)
1ATA_WDC_WD3200AAKS-00TMA0_WD-WCAS7070: pgpolicy = failover (internal 
default)
1ATA_WDC_WD3200AAKS-00TMA0_WD-WCAS7070: selector = round-robin 0 (internal 
default)

[Bug 571093] Re: [SRU] multipath + libvirtd eats away more memory over time

2010-05-24 Thread Nigel Jones
I have forwarded the bug/patch to Debian BTS as http://bugs.debian.org
/cgi-bin/bugreport.cgi?bug=582965 so they can incorporate the fix there.

** Bug watch added: Debian Bug tracker #582965
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=582965

** Also affects: libvirt (Debian) via
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=582965
   Importance: Unknown
   Status: Unknown

-- 
[SRU] multipath + libvirtd eats away more memory over time
https://bugs.launchpad.net/bugs/571093
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to libvirt in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 455832] Re: segfault when attaching disk with same physical device

2010-05-24 Thread Nigel Jones
I had a look at this bug and I seem to have prevented it, i.e.:

njo...@fantail:~$ cat /tmp/455832.xml 
disk type='block'
  driver name='virtio'/
  source dev='/dev/sdd'/
  target dev='vdc' bus='virtio'/
/disk

(sdd is a USB stick)

Before patch:

njo...@fantail:~$ virsh list; virsh destroy lucid-test; virsh start lucid-test; 
virsh attach-device lucid-test /tmp/455832.xml; virsh attach-device lucid-test 
/tmp/455832.xml
 Id Name State
--
  9 lucid-test   running

Domain lucid-test destroyed

Domain lucid-test started

Device attached successfully

error: Failed to attach device from /tmp/455832.xml
error: server closed connection

After patch:

njo...@fantail:~$ virsh list; virsh destroy lucid-test; virsh start lucid-test; 
virsh attach-device lucid-test /tmp/455832.xml; virsh attach-device lucid-test 
/tmp/455832.xml
 Id Name State
--
 10 lucid-test   running

Domain lucid-test destroyed

Domain lucid-test started

Device attached successfully

error: Failed to attach device from /tmp/455832.xml
error: operation failed: target vdc already exists

From GDB w/o patch:
Core was generated by `libvirtd -v'.
Program terminated with signal 11, Segmentation fault.
#0  0x7f3cbe516402 in virCgroupPathOfController (group=0x0, controller=4, 
key=0x7f3cbe5d6d7c devices.deny, path=0x7f3cb7fc88d8) at util/cgroup.c:246
246 if (group-controllers[controller].mountPoint == NULL)
(gdb) p
The history is empty.
(gdb) bt
#0  0x7f3cbe516402 in virCgroupPathOfController (group=0x0, controller=4, 
key=0x7f3cbe5d6d7c devices.deny, path=0x7f3cb7fc88d8) at util/cgroup.c:246
#1  0x7f3cbe51661c in virCgroupSetValueStr (group=0x0, controller=4, 
key=0x7f3cbe5d6d7c devices.deny, value=0x7f3cb0049b40 b 8:16 rwm) at 
util/cgroup.c:271
#2  0x7f3cbe516914 in virCgroupDenyDevice (group=0x0, type=value optimized 
out, major=value optimized out, minor=value optimized out) at 
util/cgroup.c:882
#3  0x7f3cbe516bf4 in virCgroupDenyDevicePath (group=0x0, path=value 
optimized out) at util/cgroup.c:932
#4  0x0043ce2b in qemudDomainAttachDevice (dom=0x7f3cb0028920, 
xml=0x7f3cb006a9d8 \340\244u) at qemu/qemu_driver.c:5505
#5  0x7f3cbe551e81 in virDomainAttachDevice (domain=0x7f3cb0028920, 
xml=0x7f3cb000f080 disk type='block'\n  driver name='virtio'/\n  
source dev='/dev/sdb'/\n  target dev='vdc' bus='virtio'/\n/disk\n) at 
libvirt.c:5093
#6  0x0042296f in remoteDispatchDomainAttachDevice (server=value 
optimized out, client=value optimized out, conn=0x758bc0, hdr=value 
optimized out, rerr=0x7f3cb7fc8b80, args=0x7f3cb7fc8c10, 
ret=0x7f3cb7fc8c60) at remote.c:883
#7  0x00424421 in remoteDispatchClientCall (server=value optimized 
out, client=0x762110, msg=0x7a30f0) at dispatch.c:506
#8  0x004247d3 in remoteDispatchClientRequest (server=0x74f110, 
client=0x762110, msg=0x7a30f0) at dispatch.c:388
#9  0x0041768c in qemudWorker (data=value optimized out) at 
libvirtd.c:1522
#10 0x7f3cbca0b9ca in start_thread (arg=value optimized out) at 
pthread_create.c:300
#11 0x7f3cbc76969d in clone () at 
../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#12 0x in ?? ()

Basically, it appears that qemudDomainAttachDevice calls
virCgroupDenyDevicePath using a NULL pointer, the attached patch will
not call cgroup if the pointer is NULL.

I'm not sure if this requires any more tidying up.

** Patch added: Patch to not run virCgroupDenyDevicePath if cgroup pointer is 
NULL
   http://launchpadlibrarian.net/49053293/9025-do-not-deny-cgroup-if-null.patch

-- 
segfault when attaching disk with same physical device
https://bugs.launchpad.net/bugs/455832
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to libvirt in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 455832] Re: segfault when attaching disk with same physical device

2010-05-24 Thread Nigel Jones
Also, I forgot to mention in my previous comment, I'm yet to determine
if this also affects the current release of libvirt.

-- 
segfault when attaching disk with same physical device
https://bugs.launchpad.net/bugs/455832
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to libvirt in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 571093] Re: multipath + libvirtd eats away more memory over time

2010-05-20 Thread Nigel Jones
Some more investigation:

--technical bits-- (non tech lower down)

libvirtd debug logging (attached) shows running multipath -F/multipath
-v4 does the following:

14:02:28.570: debug : udevEventHandleCallback:1363 : udev action: 'add'
14:02:28.570: info : udevGetDeviceProperty:111 : udev reports device '252:0' 
does not have property 'DRIVER'
14:02:28.570: info : udevGetDeviceProperty:111 : udev reports device '252:0' 
does not have property 'PCI_CLASS'
14:02:28.570: info : udevGetDeviceProperty:111 : udev reports device '252:0' 
does not have property 'INTERFACE'
14:02:28.570: info : udevGetDeviceType:1082 : Could not determine device type 
for device with sysfs path '252:0'

[snip]
14:02:28.592: debug : udevEventHandleCallback:1363 : udev action: 'add'
14:02:28.592: info : udevGetDeviceProperty:111 : udev reports device 'dm-0' 
does not have property 'DRIVER'
14:02:28.592: debug : udevGetDeviceProperty:131 : Found property key 'DEVNAME' 
value '/dev/dm-0' for device with sysname 'dm-0'
14:02:28.592: info : udevGetDeviceProperty:111 : udev reports device 'dm-0' 
does not have property 'ID_BUS'
14:02:28.592: info : udevGetDeviceProperty:111 : udev reports device 'dm-0' 
does not have property 'ID_SERIAL'
14:02:28.592: info : udevGetDeviceSysfsAttr:200 : udev reports device 'dm-0' 
does not have sysfs attr 'device/vendor'
14:02:28.592: info : udevGetDeviceSysfsAttr:200 : udev reports device 'dm-0' 
does not have sysfs attr 'device/model'
14:02:28.592: info : udevGetDeviceProperty:111 : udev reports device 'dm-0' 
does not have property 'ID_TYPE'
14:02:28.592: info : udevKludgeStorageType:912 : Could not find definitive 
storage type for device with sysfs path '/sys/devices/virtual/block/dm-0', 
trying to guess it
14:02:28.592: info : udevKludgeStorageType:924 : Could not determine storage 
type for device with sysfs path '/sys/devices/virtual/block/dm-0'
[snip]
14:02:28.594: debug : udevEventHandleCallback:1363 : udev action: 'remove'
14:02:28.594: info : udevRemoveOneDevice:1147 : Failed to find device to remove 
that has udev name '/sys/devices/virtual/bdi/252:0'
14:02:28.598: debug : udevEventHandleCallback:1363 : udev action: 'remove'
14:02:28.598: info : udevRemoveOneDevice:1147 : Failed to find device to remove 
that has udev name '/sys/devices/virtual/block/dm-0'

udevEventHandleCallback(...) will call udevAddOneDevice(device) in turn
runs udevGetDeviceProperty(...) indirectly.

Assuming (and I'd need to check this) that udevGetDeviceProperty()
returns PROPERTY_ERROR then I have a feeling we have found the problem
as it does not look to have free'd the memory in the exit path - would
have to check, especially if udevRemoveOneDevice also fails.

-- non technical bits --

It would be interesting to see if other peoples debug output from
libvirt mimics my data.  Instructions can be found at
http://honk.sigxcpu.org/con/Debugging_libvirt.html

In particular instead of libvirtd -d, try:

LIBVIRT_DEBUG=1 libvirtd -v

I'm going to have a bit more of a play around soon to see if I can work
this out a bit more.

** Attachment added: 'LIBVIRT_DEBUG=1 libvirtd -v' output
   http://launchpadlibrarian.net/48845025/lp571093-libvirt-verbosedebug

-- 
multipath + libvirtd eats away more memory over time
https://bugs.launchpad.net/bugs/571093
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to libvirt in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 571093] Re: multipath + libvirtd eats away more memory over time

2010-05-19 Thread Nigel Jones
I've done a bit of an experiment and this is what I've found:

Running valgrind on libvirtd -v ($ sudo valgrind -v --leak-check=full
--show-reachable=yes /usr/sbin/libvirtd -v) produced the output in
lp571093-libvirt-val-run1

A quick summary:

==15520== 78,696 (18,048 direct, 60,648 indirect) bytes in 376 blocks are 
definitely lost in loss record 324 of 325
==15520==at 0x4C267CC: calloc (vg_replace_malloc.c:467)
==15520==by 0x42CFAD: virAlloc (memory.c:100)
==15520==by 0x47C96D: udevAddOneDevice (node_device_udev.c:1209)
==15520==by 0x47D166: udevDeviceMonitorStartup (node_device_udev.c:1265)
==15520==by 0x54BD1BF: virStateInitialize (in /usr/lib/libvirt.so.0.7.5)
==15520==by 0x41A64B: main (libvirtd.c:3153)
==15520==
==15520== 204,320 (22,736 direct, 181,584 indirect) bytes in 98 blocks are 
definitely lost in loss record 325 of 325
==15520==at 0x4C267CC: calloc (vg_replace_malloc.c:467)
==15520==by 0x50508CB: udev_device_new (libudev-device.c:240)
==15520==by 0x505285C: udev_monitor_receive_device (libudev-monitor.c:589)
==15520==by 0x47D367: udevEventHandleCallback (node_device_udev.c:1356)
==15520==by 0x414AF8: virEventRunOnce (event.c:478)
==15520==by 0x4166D8: qemudOneLoop (libvirtd.c:2169)
==15520==by 0x4169B2: qemudRunLoop (libvirtd.c:2278)
==15520==by 0x70669C9: start_thread (pthread_create.c:300)
==15520==by 0x736369C: clone (clone.S:112)

==15520== LEAK SUMMARY:
==15520==definitely lost: 46,856 bytes in 628 blocks
==15520==indirectly lost: 282,769 bytes in 8,181 blocks
==15520==  possibly lost: 0 bytes in 0 blocks
==15520==still reachable: 109,152 bytes in 1,303 blocks
==15520== suppressed: 0 bytes in 0 blocks
==15520==

I triggered the issue by running:
$ sudo multipath -F
$ sudo multipath -v4
multiple times to replicate the issue.

I'd say that this is definitely a libvirt/udev bug based on the
behaviour.  I believe that while Nick's suggestion in Comment #9 may
avoid the problem it looks like it's really a bandaid and it's possible
that other applications will trigger this issue via udev.

** Attachment added: valgrind -v --leak-check=full --show-reachable=yes 
/usr/sbin/libvirtd -v output
   http://launchpadlibrarian.net/48714083/lp571093-libvirt-val-run1

-- 
multipath + libvirtd eats away more memory over time
https://bugs.launchpad.net/bugs/571093
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to libvirt in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs