Error: (22, 'Invalid argument')

Bug #1175155 reported by Nazar Mokrynskyi
36
This bug affects 8 people
Affects Status Importance Assigned to Milestone
xen (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Error occured after yesterday update. After reboot I'm not able to start virtual machine that works fine before.
Config and log in attachment.
Ubuntu 13.04, kernel 3.9.0-rc8
CPU AMD FX-8120

Downgrade from version 4.2.1-0ubuntu3.1 to 4.2.1-0ubuntu3 returns system in workable state.
So, this is connected with update.

Revision history for this message
Nazar Mokrynskyi (nazar-pc) wrote :
Revision history for this message
Nazar Mokrynskyi (nazar-pc) wrote :
description: updated
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xen (Ubuntu):
status: New → Confirmed
Revision history for this message
ptmn (ptmn) wrote :

Same problem. 4.2.1-0ubuntu3 works fine.

Revision history for this message
Nazar Mokrynskyi (nazar-pc) wrote :

The same on official ubuntu kernels 3.8/3.9 and compiled 3.10-rc1.
Ubuntu 13.10 affected too.

Revision history for this message
Nazar Mokrynskyi (nazar-pc) wrote :

Latest Xen release, still affected by this bug!

Revision history for this message
Misiek (misiekt) wrote :

Ubuntu 12.04.02 LTS is also affected.

Bug was introduced in:
xen-hypervisor-4.1-amd64 4.1.2-2ubuntu2.8

and still present in latest 4.1.2-2ubuntu2.9.

Downgrading to 4.1.2-2ubuntu2.7 resolves the issue.

Possible solution is here:
http://xen.crc.id.au/bugs/view.php?id=5

but i couldn't compile package due to some rtl8139 ROM missing.

Revision history for this message
Nazar Mokrynskyi (nazar-pc) wrote :

Misiek, mark, please, that this bug affects you too.

Revision history for this message
Misiek (misiekt) wrote :

After last update 4.1.2-2ubuntu2.10 LTS version 12.04.02 is no longer affected.
All pci passtrough configurations are working again.

Revision history for this message
Misiek (misiekt) wrote :

Well, I rushed last comment.

Error: (22, 'Invalid argument') still appears in LTS 4.1.2-2ubuntu2.10, but only if I add Radeon HDA HDMI audio device.
It isn't nessessary, since Xen is adding it automatically, and then it works, but listing it explicit in pci=['xx:xx.x'] is still causing bug to surface.

Revision history for this message
Nazar Mokrynskyi (nazar-pc) wrote :

So, for graphics card passtrough it is necessary to listing only one PCI device, not two as before. Am I right?
Instead of
xen-pciback.hide=(04:00.0)(04:00.1)
only
xen-pciback.hide=(04:00.0)
right?

Revision history for this message
Misiek (misiekt) wrote :

Nope, you have to hide both from kernel. It's just, that listing 04:00.1 in config file is causing error. At least with xm stack.
Xen is attaching it anyway runtime, so it has to be hidden or you get "does not belong to pciback" error.

BTW atm im passing pci=['01:00.0','00:1a.0','04:00.0'] to the HVM, which stands for Radeon, one USB bus, and Audigy. And this works fine. But when I change to pci=['01:00.0','01:00.1','00:1a.0','04:00.0'], which adds HDMI from Radeon, then I get said "22 error".

I used to pass onboard Panther HDA, but after day or so sound was often garbled in Win7 VM, so I switched to SB.

Also Radeon is my secondary gpu, because I'm using i5-3570 gpu onboard asrock z77 pro4 for hypervisor/gnome display.

Revision history for this message
Nazar Mokrynskyi (nazar-pc) wrote :

Still affected on Ubuntu 13.10 with version 4.2.1-2ubuntu2

Proposed solution didn't help, the same error.

Revision history for this message
Dmitry Skryabin (gig-tmb) wrote :

Xen 4.1.2-2ubuntu2

When i am create vm with pci pass got this error

xm create win2008ex
Using config file "./win2008ex".
Error: (22, 'Invalid argument')

Have different servers .... ubuntu 12.04.2 & this error ((((
Security updates come ))) but )))
I'am still falback on 4.1.2-2ubuntu2.7 or

Misiek (misiekt) wrote on 2013-06-24: #7
Possible solution is here:
http://xen.crc.id.au/bugs/view.php?id=5
Really work!!!

When we get proper sollution via repo )))

Revision history for this message
Heiko Sieger (h-sieger) wrote :

I'm running LM 14 (= Ubuntu 12.10) and get the same error since xen 4.1.3-3ubuntu1.5.

NOTE: This is Xen 4.1 and I'm using the xm toolstack!

Here is the xm dmesg output (shortened):
(XEN) Xen version 4.1.3 (Ubuntu 4.1.3-3ubuntu1.7) (<email address hidden>) (gcc version 4.7.2 (Ubuntu/Linaro 4.7.2-2ubuntu1) ) Tue Jun 25 13:22:24 UTC 2013
(XEN) Bootloader: GRUB 2.00-7ubuntu11
(XEN) Command line: placeholder iommu=1 dom0_mem=min:2048M,max:6G vga=mode-0x031A console=vga

All xen 4.1.3 versions prior to xen 4.1.3-3ubuntu1.5 work without issues.

Here the xend.log entries:
[2013-07-11 12:31:07 2511] ERROR (XendDomainInfo:108) Domain construction failed
Traceback (most recent call last):
  File "/usr/lib/xen-4.1/bin/../lib/python/xen/xend/XendDomainInfo.py", line 106, in create
    vm.start()
  File "/usr/lib/xen-4.1/bin/../lib/python/xen/xend/XendDomainInfo.py", line 474, in start
    XendTask.log_progress(31, 60, self._initDomain)
  File "/usr/lib/xen-4.1/bin/../lib/python/xen/xend/XendTask.py", line 209, in log_progress
    retval = func(*args, **kwds)
  File "/usr/lib/xen-4.1/bin/../lib/python/xen/xend/XendDomainInfo.py", line 2930, in _initDomain
    raise VmError(str(exn))
VmError: (22, 'Invalid argument')

I tried removing the HDMI audio device in the /etc/xen/guest.cfg config file but it made no difference:
# pci=[ '02:00.0', '02:00.1' , '00:1a.0' , '0a:00.0' , '0b:00.0' ]
pci=[ '02:00.0', '00:1a.0' , '0a:00.0' , '0b:00.0' ]

Note: 02:00.0 is my secondary graphics card, 02:00.1 is the audio device on that graphics card.

This bug has been around for a long time. Any chance seeing it fixed?

P.S.: Should I open a new bug report for Xen 4.1 ?

Revision history for this message
Heiko Sieger (h-sieger) wrote :

This bug appears also in xen 4.1 used in Quantal and Precise, one of which is a LTS release affecting many users.

Would upgrading to Xen 4.1.5 stable fix this issue in Quantal and Precise ? See https://bugs.launchpad.net/ubuntu/+source/xen/+bug/1180396

One more thing: Considering the number of people affected and the fact that this bug has already been solved in upstream stable Xen releases I wonder why this has been given so little attention as it seems. Importance "undecided" and "unassigned" suggest that this bug is not treated with any priority.

tags: added: quantal
Heiko Sieger (h-sieger)
tags: added: passthrough pci precise raring
Revision history for this message
James Horner (humankind135) wrote :

Just to add my 2 cents, I also get this error when I try and pass though a pci-e usb card or try to include the hdmi audio device from a ATI Radeon HD 7770 on Raring. The pass through of 2 gfx to 2 different vms works though, and pciback is used via an initscript.

(XEN) Xen version 4.2.1 (Ubuntu 4.2.1-0ubuntu3.2) (<email address hidden>) (gcc (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3) Mon Jun 10 15:23:30 UTC 2013
(XEN) Bootloader: GRUB 2.00-13ubuntu3
(XEN) Command line: placeholder

ERROR (XendDomainInfo:108) Domain construction failed
Traceback (most recent call last):
  File "/usr/lib/xen-4.2/bin/../lib/python/xen/xend/XendDomainInfo.py", line 106, in create
    vm.start()
  File "/usr/lib/xen-4.2/bin/../lib/python/xen/xend/XendDomainInfo.py", line 474, in start
    XendTask.log_progress(31, 60, self._initDomain)
  File "/usr/lib/xen-4.2/bin/../lib/python/xen/xend/XendTask.py", line 209, in log_progress
    retval = func(*args, **kwds)
  File "/usr/lib/xen-4.2/bin/../lib/python/xen/xend/XendDomainInfo.py", line 2936, in _initDomain
    raise VmError(str(exn))
VmError: (22, 'Invalid argument')

Revision history for this message
Nazar Mokrynskyi (nazar-pc) wrote :

Received Xen 4.3 yesterday on Ubuntu 13.10, switched to xl, and everything works. Not sure that xm will work too (I tried a lot of different configurations with xm/xl, but as I remember, it worked with xm as well).

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.