[Bug 1564853] [NEW] xendomains fails to suspend VMs not running

2016-04-01 Thread Philipp Hahn
Public bug reported:

`/etc/init.d/xendomains stop` fails on xen-4.1.6.1 as it tries to parse
the output of "xm list", which has a varying number of columns for
running and already shut down VMs:

For managed inactive domains `xm list` does not output a domain-ID and a
state.

| # xm list
| NameID   Mem VCPUs  State   
Time(s)
| Domain-0 0  3884 2 r- 71.6
| yyy  512 1 0.0
| xxx  7   512 1 -b  1.1

Also cpu is not output.

Rewrite parseln() to use IFS for splitting and use number of output columns to
parse the lines.

** Affects: xen (Ubuntu)
 Importance: Undecided
 Status: New


** Tags: patch

** Patch added: "Fix `xm list` parsing"
   
https://bugs.launchpad.net/bugs/1564853/+attachment/4619341/+files/20_Bug40697_xendomains.patch

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

Title:
  xendomains fails to suspend VMs not running

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xen/+bug/1564853/+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 1515145] Re: xm migrate --live panics hypervisor

2016-04-01 Thread Philipp Hahn
Backport 3b0bcb8 x86/mm/p2m: Move p2m code in HVMOP_[gs]et_mem_access into p2m.c
needs f488040222f34df97deb2470f14cef7fb9599810 to fix the build on i386.

f488040 Fix 32-bit build after p2m series
3b0bcb8 x86/mm/p2m: Move p2m code in HVMOP_[gs]et_mem_access into p2m.c

** Patch added: "Backport 3b0bcb8  + f488040"
   
https://bugs.launchpad.net/ubuntu/+source/xen/+bug/1515145/+attachment/4619340/+files/xsa97-hap-4.1-prereq2.patch

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

Title:
  xm migrate --live panics hypervisor

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xen/+bug/1515145/+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 1564797] [NEW] Changing media fails

2016-04-01 Thread Philipp Hahn
Public bug reported:

With xen-4.1.6.1 changing the CD-ROM media fails as xend mixes passing
arguments as "int" and "str".

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/xen/web/SrvBase.py", line 85, in 
perform
return op_method(op, req)
  File "/usr/lib/python2.5/site-packages/xen/xend/server/SrvDomain.py", line 
201, in op_device_configure
req)
  File "/usr/lib/python2.5/site-packages/xen/xend/server/SrvDomain.py", line 
171, in call
return FormFn(fn, args)(req.args)
  File "/usr/lib/python2.5/site-packages/xen/xend/Args.py", line 166, in 
__call__
return self.call_with_form_args(self.fn, fargs, xargs=xargs)
  File "/usr/lib/python2.5/site-packages/xen/xend/Args.py", line 138, in 
call_with_form_args
return fn(*params, **keys)
  File "/usr/lib/python2.5/site-packages/xen/xend/XendDomainInfo.py", line 
1099, in device_configure
dev_uuid = dev_control.reconfigureDevice(devid, dev_config)
  File "/usr/lib/python2.5/site-packages/xen/xend/server/blkif.py", line 128, 
in reconfigureDevice
(dev, mode) = self.readBackend(devid, 'dev', 'mode')
  File "/usr/lib/python2.5/site-packages/xen/xend/server/DevController.py", 
line 439, in readBackend
raise VmError("Device %s not connected" % devid)
VmError: Device 832 not connected

Patch was sent upstream, but not accepted as xen-4.1 is EOL by now:


For reference our bug-entry:


** Affects: xen (Ubuntu)
 Importance: Undecided
 Status: New


** Tags: patch-forwarded-upstream

** Patch added: "xend: Fix device argument types"
   
https://bugs.launchpad.net/bugs/1564797/+attachment/4619252/+files/0041-Bug-23394-xen-change-media.patch

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

Title:
  Changing media fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xen/+bug/1564797/+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 1564790] [NEW] blktap2 fails to terminate with filenames containing blanks

2016-04-01 Thread Philipp Hahn
Public bug reported:

Shutting down a domU with xen-4.1.6.1 doesn't terminate the corresponding 
blktap2
process, since one (other) VM uses a image file, which contains spaces in its
file name.  /var/log/xen/xend-debug.log has the following information:

Unhandled exception in thread started by
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/xen/xend/server/BlktapController.py", 
line 199, in finishDeviceCleanup
    TapdiskController.destroy(path)
  File "/usr/lib/python2.6/dist-packages/xen/xend/server/BlktapController.py", 
line 289, in destroy
    tapdisk = TapdiskController.fromDevice(device)
  File "/usr/lib/python2.6/dist-packages/xen/xend/server/BlktapController.py", 
line 278, in fromDevice
    TapdiskController.list())
  File "/usr/lib/python2.6/dist-packages/xen/xend/server/BlktapController.py", 
line 256, in list
    key, value = pair.split('=')
ValueError: need more than 1 value to unpack

** Affects: xen (Ubuntu)
 Importance: Undecided
 Status: New


** Tags: patch

** Patch added: "Fix tap-ctl parsing"
   
https://bugs.launchpad.net/bugs/1564790/+attachment/4619233/+files/0006-Bug-18357-Fix-tap-ctl-parsing.patch

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

Title:
  blktap2 fails to terminate with filenames containing blanks

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xen/+bug/1564790/+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 1564792] [NEW] Somtimes 1st domU fails to start due to hotplug race

2016-04-01 Thread Philipp Hahn
Public bug reported:

Sometimes qemu/the kernel takes too long for the first domain to start with 
xen-4.1.6.1.
The hotplug script then finds the device still in state 1=Initialising and 
aborts.
Add an artifical delay of 1 seconds and try again.

** Affects: xen (Ubuntu)
 Importance: Undecided
 Status: New


** Tags: patch

** Patch added: "Fix race during device hotplug"
   
https://bugs.launchpad.net/bugs/1564792/+attachment/4619234/+files/0003-Bug-20481-Fix-race-during-device-hotplug.patch

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

Title:
  Somtimes 1st domU fails to start due to hotplug race

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xen/+bug/1564792/+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 1564785] [NEW] hw/dma: Print error message only once

2016-04-01 Thread Philipp Hahn
Public bug reported:

Some Windows VMs triggers qemu-dm to print a log message multiple times
and fills up the log-file with 50 MiB / minute.

It's enough to print the message only once.

The patch was sent upstream but I never got feedback:


For reference here the entry in our bug-tracker:


** Affects: xen (Ubuntu)
 Importance: Undecided
 Status: New


** Tags: patch

** Patch added: "hw/dma: Print error message only once"
   
https://bugs.launchpad.net/bugs/1564785/+attachment/4619232/+files/0052-Bug-35488-hw-dma-Print-error-message-only-once.patch

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

Title:
  hw/dma: Print error message only once

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xen/+bug/1564785/+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 1564782] [NEW] Fix hex decoding in sxp.Parser

2016-04-01 Thread Philipp Hahn
Public bug reported:

If a managed domain is creates with a name/description containing 
non-ASCII-characters, `xm list` fails in xen-4.1.6.1
This is caused by "xend" implementing its own broken hex-decoder.

The patch was sent upstream but rejected as xen-4.1 (and Python-xend)
being EOL: 

For reference here's the link to our bug-tracker:


** Affects: xen (Ubuntu)
 Importance: Undecided
 Status: New


** Tags: patch

** Patch added: "xend: Fix hex decoding in sxp.Parser"
   
https://bugs.launchpad.net/bugs/1564782/+attachment/4619230/+files/0062-Bug-36098-xen-Fix-hex-decoding-in-sxp.Parser.patch

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

Title:
  Fix hex decoding in sxp.Parser

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xen/+bug/1564782/+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 1564777] [NEW] xenstore memory corruption

2016-04-01 Thread Philipp Hahn
Public bug reported:

The C implementation of xenstored in xen-4.1.6.1 is missing commit 
de8c3e826499dbf69d01ee935a67b5d67a131496 from xen-4.6:
  tools/xenstore: Correct use of va_end() after va_copy()
This leads to data corruption which only triggers very rarely; we were never 
able to reproduce it in our test environment, but we had crashes of xenstored 
nearly each month.

For reference here's the issues from our bug-tracker:


** Affects: xen (Ubuntu)
 Importance: Undecided
 Status: New


** Tags: patch

** Patch added: "tools/xenstore: Correct use of va_end() after va_copy()"
   
https://bugs.launchpad.net/bugs/1564777/+attachment/4619213/+files/0072-tools-xenstore-Correct-use-of-va_end-after-va_copy.patch

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

Title:
  xenstore memory corruption

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xen/+bug/1564777/+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 1515145] Re: xm migrate --live panics hypervisor

2016-04-01 Thread Philipp Hahn
The first patch does not work!

The backport was quiet complicates as that patch is in the middle of
4) eca988d x86/mm: merge the shadow, hap and log-dirty locks into a single 
paging lock.
3) 5bf494a x86/mm: Make MM locks recursive.
2) 301493f x86/mm: dedup the various copies of the shadow lock functions
1) 3b0bcb8 x86/mm/p2m: Move p2m code in HVMOP_[gs]et_mem_access into p2m.c

2) and 4) are already in debian/patches/xsa97-hap-4.1-prereq.patch, so
the patch also contains the parts from eca988d which where skipped as
5bf494a was not back-ported.

This patch also requires a back-port of
3b0bcb890955e1c3e2fde10a026c5d85481e6fb8 (1) as compilation failes
otherwise - I'll attach that next - as an alternative it could be enough
to '#include "../mm-locks.h"' instead, but I didn't test that.

** Patch added: "Fixed patch v2"
   
https://bugs.launchpad.net/ubuntu/+source/xen/+bug/1515145/+attachment/4619204/+files/0003-x86-mm-Make-MM-locks-recursive.patch

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

Title:
  xm migrate --live panics hypervisor

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xen/+bug/1515145/+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 1515145] Re: xm migrate --live panics hypervisor

2016-04-01 Thread Philipp Hahn
Backport 3b0bcb8 x86/mm/p2m: Move p2m code in HVMOP_[gs]et_mem_access
into p2m.c

** Patch added: "Backport 3b0bcb8"
   
https://bugs.launchpad.net/ubuntu/+source/xen/+bug/1515145/+attachment/4619207/+files/0002-x86-mm-p2m-Move-p2m-code-in-HVMOP_-gs-et_mem_access-.patch

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

Title:
  xm migrate --live panics hypervisor

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xen/+bug/1515145/+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 1515145] Re: xm migrate --live panics hypervisor

2016-03-30 Thread Philipp Hahn
debian/patches/xsa97-hap-4.1-prereq.patch is the combination of
 * commit 301493fb027648db6808b66d1ccf849f524b8422
   x86/mm: dedup the various copies of the shadow lock functions
 * commit eca988de7381e5efe58792dc166611e4523d33b3
   x86/mm: merge the shadow, hap and log-dirty locks into a single paging lock.

but it's missing 
 * commit 5bf494a7bf3674f32ebaab1b70b76e5f174812a3
   x86/mm: Make MM locks recursive.

which leads to a recursive locking call to crash the hypervisor.

With the patch applied "xm migrate -c -l $dom $host" works again.

** Patch added: "x86/mm: Make MM locks recursive."
   
https://bugs.launchpad.net/ubuntu/+source/xen/+bug/1515145/+attachment/4617139/+files/0001-x86-mm-Make-MM-locks-recursive.patch

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

Title:
  xm migrate --live panics hypervisor

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xen/+bug/1515145/+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 1515145] Re: xm migrate --live panics hypervisor

2016-03-30 Thread Philipp Hahn
Reverting the following patches makes the crash go away 
(4.1.6.1-0ubuntu0.12.04.8):
* xsa97-hap-4.1-prereq.patch
* xsa97-hap-4.2-prereq.patch
* xsa97-hap-4.2.patch

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

Title:
  xm migrate --live panics hypervisor

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xen/+bug/1515145/+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