Skip to contentSkip to conversation

BUG? domU reboot fails when using "pci =" option

DISCUSSION list user 2 participants 4 messages May 4, 2006

lore
Share & tools
lore

list user

author
#0 lore raw

Hi all,

I believe I've found a bug.

Running xen-3.0.2-2 with linux-2.6.16 built from sources.

Domain-0 has one hidden PCI slot: pciback.hide=(00:0d.0)

It is exposed in a domU with pci = ['00:0d.0'].

If that domU is shutdown with xm destroy, or with a shutdown -h now, all works as expected. But if instead it is rebooted, either by xm reboot or shutdown -r now, it shuts down, attempts to restart and fails silently. This is evidenced by the fact that an xm list has used up one increment on its domU counter. At that point a manual start works.

Now, if the pci device is NOT enabled in the domU config file, reboot works correctly.

Checking xend.log provides a clue:

dev_config referenced before assignment in
/usr/lib/xen/xend/server/pciif.py

Not really a python coder but it looks like the invocation in question is on line 97, which indicates that whole section of code may be borked, since it now thinks it's xen-2.0.

Hope that's helpful to someone.

Mike Wright

author
#1 lore raw
Quoted 19 lines · list user

Hi all,

I believe I've found a bug.

Running xen-3.0.2-2 with linux-2.6.16 built from sources.

Domain-0 has one hidden PCI slot: pciback.hide=(00:0d.0)

It is exposed in a domU with pci = ['00:0d.0'].

If that domU is shutdown with xm destroy, or with a shutdown -h now, all works as expected. But if instead it is rebooted, either by xm reboot or shutdown -r now, it shuts down, attempts to restart and fails silently. This is evidenced by the fact that an xm list has used up one increment on its domU counter. At that point a manual start works.

Now, if the pci device is NOT enabled in the domU config file, reboot works correctly.

Quoted 9 lines

Checking xend.log provides a clue:

dev_config referenced before assignment in
/usr/lib/xen/xend/server/pciif.py

Not really a python coder but it looks like the invocation in question is on line 97, which indicates that whole section of code may be borked, since it now thinks it's xen-2.0.

Additional info.

If xend and xendomains are set to run automatically at boot time via chkconfig the same error occurs, but ONLY when the pci device has been exported to a domU. An "xm list" starts at domid 2, showing that one domU has failed at startup.

Again, the error is familiar, but this time displays on the domain-0 console:

local variable dev_config referenced before assignment

:m)

Quoted 12 lines

Hope that's helpful to someone.

Mike Wright

_______________________________________________
Xen-users mailing list
[email protected]
http://lists.xensource.com/xen-users

#2 lore raw
Quoted 9 lines · list user

list user wrote:

Additional info.

If xend and xendomains are set to run automatically at boot time via chkconfig the same error occurs, but ONLY when the pci device has been exported to a domU. An "xm list" starts at domid 2, showing that one domU has failed at startup.

Quoted 11 lines

Again, the error is familiar, but this time displays on the domain-0 console:

local variable dev_config referenced before assignment

:m)

Quoted 4 lines

Hope that's helpful to someone.

Mike Wright

I'm not quite sure how this python error could be causing your reboot problem, but you did find a typo in that script. I'll submit a patch for it to xen-unstable. If you'd like to fix it yourself, just change dev_config to config.

Did you upgrade your box from xen 2.0.x to xen 3.0.2? That code path is unlikely to be followed unless you either used an SXP configuration file (which I didn't think you had done because "pci = ['00:0d.0']" wouldn't work in an SXP file) or your Xen 3.0.2 installation didn't completely overwrite all of the Xen 2.0.x files.

Ryan

author
#3 lore raw
Quoted 17 lines · Ryan
Quoted 15 lines · list user

list user wrote:

Additional info.

If xend and xendomains are set to run automatically at boot time via chkconfig the same error occurs, but ONLY when the pci device has been exported to a domU. An "xm list" starts at domid 2, showing that one domU has failed at startup.

Again, the error is familiar, but this time displays on the domain-0 console:

local variable dev_config referenced before assignment

:m)

Quoted 2 lines

Hope that's helpful to someone.

Quoted 8 lines
Quoted 2 lines
Quoted 2 lines

Mike Wright

I'm not quite sure how this python error could be causing your reboot problem, but you did find a typo in that script. I'll submit a patch for it to xen-unstable. If you'd like to fix it yourself, just change dev_config to config.

Thanks Ryan,

I tried the fix but it just gave a different symptom. (same error, different variable)

So... rpm --erase xen JIC there were any ghosts around. Manually removed all traces of xen from the system. Then did a ./install.sh from
the xen-3.0.2-2 directory, which had a clean "make world".

The results are the same.

I've found a more generic error about a local variable being used before assignment, but I think it's referring to dev_config.

Again, this only happens on auto-boot or domU reboot, and only when there is a "pci =" line in the domU's definition file.

Any ideas how I can help debug this?

:m)

Quoted 16 lines

Did you upgrade your box from xen 2.0.x to xen 3.0.2? That code path is unlikely to be followed unless you either used an SXP configuration file (which I didn't think you had done because "pci = ['00:0d.0']" wouldn't work in an SXP file) or your Xen 3.0.2 installation didn't completely overwrite all of the Xen 2.0.x files.

Ryan

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel