Skip to contentSkip to conversation

xend crash at startup

PATCH Guillaume Rousse 1 participant 2 messages Nov 5, 2007 – Dec 6, 2007 Kbuild

lore
Share & tools
lore
#0 lore raw

xend crashes at startup with following stack trace:
...
File "/usr/lib64/python/xen/xend/XendPIF.py", line 68, in linux_get_phy_ifaces
phy_ifaces.append((name, int(mtu), bridged_mac))
UnboundLocalError: local variable 'bridged_mac' referenced before assignment

The simple patch attached below prevent the crash, and allow xend to start normally.

It seems the crash happens when bridged_ifname is set to eth2, whereas eth2 doesn't appear in ip -o link show.

I'm joining output of 'ifconfig', 'ip -o link', and 'brctl show'.

Signature · 3 lines
Guillaume Rousse
Moyens Informatiques - INRIA Futurs
Tel: 01 69 35 69 62
XendPIF.py renamed from usr/lib64/python/xen/xend/XendPIF.py +1 -0
@@ -61,6 +61,7 @@
             if name[0] == 'p' and mac == 'fe:ff:ff:ff:ff:ff':
                 bridged_ifname = linux_phy_to_virt(name)
                 bridged_if = ifaces.get(bridged_ifname)
+                bridged_mac = ''
                 if bridged_if:
                     bridged_mac = bridged_if[2]
                 phy_ifaces.append((name, int(mtu), bridged_mac))

bridge name bridge id STP enabled interfaces
administratif 8000.feffffffffff no peth2
dmz 8000.feffffffffff no peth3
recherche 8000.feffffffffff no peth1
services 8000.feffffffffff no vif0.0

							peth0
							vif2.0

xenbr0 8000.000000000000 no

administratif Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 RX packets:3034 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 lg file transmission:0
RX bytes:305104 (297.9 KiB) TX bytes:0 (0.0 b)

dmz Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 RX packets:447 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 lg file transmission:0
RX bytes:106353 (103.8 KiB) TX bytes:0 (0.0 b)

eth0 Link encap:Ethernet HWaddr 00:1A:A0:14:A9:53

          inet adr:193.51.235.19  Bcast:193.51.235.63  Masque:255.255.255.192
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:211728 errors:0 dropped:0 overruns:0 frame:0
          TX packets:150507 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:0 
          RX bytes:247843263 (236.3 MiB)  TX bytes:67882172 (64.7 MiB)

lo Link encap:Boucle locale
inet adr:127.0.0.1 Masque:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:82 errors:0 dropped:0 overruns:0 frame:0 TX packets:82 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 lg file transmission:0
RX bytes:6712 (6.5 KiB) TX bytes:6712 (6.5 KiB)

peth0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF

          UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1
          RX packets:220556 errors:0 dropped:0 overruns:0 frame:0
          TX packets:164769 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000 
          RX bytes:249622348 (238.0 MiB)  TX bytes:69630057 (66.4 MiB)
          Interruption:16 Mémoire:f8000000-f8011100 

peth1 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 RX packets:25464 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 lg file transmission:1000
RX bytes:2958983 (2.8 MiB) TX bytes:0 (0.0 b) Interruption:16 Mémoire:f4000000-f4011100

peth2 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 RX packets:9703 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 lg file transmission:1000
RX bytes:786995 (768.5 KiB) TX bytes:0 (0.0 b) Adresse de base:0xecc0 Mémoire:fc5e0000-fc600000

peth3 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 RX packets:7100 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 lg file transmission:1000
RX bytes:541022 (528.3 KiB) TX bytes:0 (0.0 b) Adresse de base:0xec80 Mémoire:fc5c0000-fc5e0000

recherche Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 RX packets:18341 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 lg file transmission:0
RX bytes:2154136 (2.0 MiB) TX bytes:0 (0.0 b)

services Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 RX packets:19473 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 lg file transmission:0
RX bytes:3365681 (3.2 MiB) TX bytes:0 (0.0 b)

vif0.0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF

          UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1
          RX packets:150747 errors:0 dropped:0 overruns:0 frame:0
          TX packets:212225 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:0 
          RX bytes:67923236 (64.7 MiB)  TX bytes:247900044 (236.4 MiB)

vif2.0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
UP BROADCAST RUNNING NOARP MTU:1500 Metric:1
RX packets:1529 errors:0 dropped:0 overruns:0 frame:0 TX packets:53338 errors:0 dropped:18536 overruns:0 carrier:0 collisions:0 lg file transmission:32
RX bytes:199763 (195.0 KiB) TX bytes:43411929 (41.4 MiB)

xenbr0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 lg file transmission:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

1: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue \ link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: vif0.0: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue \ link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff
3: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc noqueue \ link/ether 00:1a:a0:14:a9:53 brd ff:ff:ff:ff:ff:ff
4: vif0.1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop \ link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff
5: veth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop \ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
6: vif0.2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop \ link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff
7: veth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop \ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
8: vif0.3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop \ link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff
9: veth3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop \ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff

10: peth1: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000\    link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff
11: peth2: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000\    link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff
12: peth3: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000\    link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff

13: eth4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000\ link/ether 00:0e:0c:db:3e:36 brd ff:ff:ff:ff:ff:ff
14: eth5: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000\ link/ether 00:0e:0c:db:3e:37 brd ff:ff:ff:ff:ff:ff
15: peth0: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000\ link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff
16: services: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue \ link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff
17: recherche: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue \ link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff
18: administratif: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue \ link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff
19: dmz: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc noqueue \ link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff
20: xenbr0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc noqueue \ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
22: vif2.0: <BROADCAST,NOARP,UP,10000> mtu 1500 qdisc pfifo_fast qlen 32\ link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff

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

#1 lore raw
Quoted 7 lines · Guillaume Rousse

xend crashes at startup with following stack trace:
...
File "/usr/lib64/python/xen/xend/XendPIF.py", line 68, in linux_get_phy_ifaces
phy_ifaces.append((name, int(mtu), bridged_mac))
UnboundLocalError: local variable 'bridged_mac' referenced before assignment

Quoted 5 lines

The simple patch attached below prevent the crash, and allow xend to start normally.

It seems the crash happens when bridged_ifname is set to eth2, whereas eth2 doesn't appear in ip -o link show.

The problem surfaced again: xend start just crashes with previous message.

If I apply submitted patch, xend start just hang infinitly, and strace shows a futex issue:
Process 18743 attached - interrupt to quit
futex(0xcce634, FUTEX_WAIT, 1627, NULL) = 0
futex(0xcce608, FUTEX_WAKE, 1) = 0
futex(0xcce660, FUTEX_WAKE, 1) = 1
rt_sigaction(SIGPIPE, {SIG_IGN}, NULL, 8) = 0
futex(0xb18840, FUTEX_WAKE, 1) = 0
futex(0xb18840, FUTEX_WAKE, 1) = 0
rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0

futex(0xcce660, FUTEX_WAIT, 2, NULL)    = 0
futex(0xcce660, FUTEX_WAIT, 2, NULL)    = 0
futex(0xcce660, FUTEX_WAIT, 2, NULL)    = 0
futex(0xcce660, FUTEX_WAIT, 2, NULL)    = 0
futex(0xcce660, FUTEX_WAIT, 2, NULL)    = 0
futex(0xcce660, FUTEX_WAIT, 2, NULL)    = 0

write(19, "\2\0\0\0\0\0\0\0\304\0\0\0009\0\0\0", 16) = 16 write(19, "/vm/2cc873ba-81ea-4a3e-a6bc-15e9"..., 57) = 57 futex(0xcce634, FUTEX_WAIT, 1641, NULL) = 0
futex(0xcce608, FUTEX_WAKE, 1) = 0
futex(0xcce660, FUTEX_WAKE, 1) = 1
rt_sigaction(SIGPIPE, {SIG_IGN}, NULL, 8) = 0
futex(0xb18840, FUTEX_WAKE, 1) = 0
rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0

futex(0xcce660, FUTEX_WAIT, 2, NULL)    = 0
futex(0xcce660, FUTEX_WAIT, 2, NULL)    = 0
futex(0xcce660, FUTEX_WAIT, 2, NULL)    = 0
futex(0xcce660, FUTEX_WAIT, 2, NULL)    = 0
futex(0xcce660, FUTEX_WAIT, 2, NULL)    = 0
futex(0xcce660, FUTEX_WAIT, 2, NULL)    = 0

write(19, "\7\0\0\0\0\0\0\0\304\0\0\0\2\0\0\0", 16) = 16
write(19, "T\0", 2) = 2
futex(0xcce634, FUTEX_WAIT, 1655, NULL) = 0
futex(0xcce608, FUTEX_WAKE, 1) = 0
futex(0xcce660, FUTEX_WAKE, 1) = 1
rt_sigaction(SIGPIPE, {SIG_IGN}, NULL, 8) = 0
futex(0xb18840, FUTEX_WAKE, 1) = 0
rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0

futex(0xcce660, FUTEX_WAIT, 2, NULL)    = 0
futex(0xcce660, FUTEX_WAIT, 2, NULL)    = 0
futex(0xcce660, FUTEX_WAIT, 2, NULL)    = 0
futex(0xcce660, FUTEX_WAIT, 2, NULL)    = 0
futex(0xcce660, FUTEX_WAIT, 2, NULL)    = 0
futex(0xcce660, FUTEX_WAIT, 2, NULL)    = 0

write(19, "\6\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0", 16) = 16
write(19, "\0", 1) = 1
futex(0xcce634, FUTEX_WAIT, 1669, NULL) = 0
futex(0xcce608, FUTEX_WAKE, 1) = 0
futex(0xcce660, FUTEX_WAKE, 1) = 1
rt_sigaction(SIGPIPE, {SIG_IGN}, NULL, 8) = 0
futex(0xb18840, FUTEX_WAKE, 1) = 0
rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0

futex(0xcce660, FUTEX_WAIT, 2, NULL)    = 0
futex(0xcce660, FUTEX_WAIT, 2, NULL)    = 0
futex(0xcce660, FUTEX_WAIT, 2, NULL)    = 0
futex(0xcce660, FUTEX_WAIT, 2, NULL)    = 0
futex(0xcce660, FUTEX_WAIT, 2, NULL)    = 0
futex(0xcce660, FUTEX_WAIT, 2, NULL)    = 0

write(19, "\2\0\0\0\0\0\0\0\313\0\0\0009\0\0\0", 16) = 16 write(19, "/vm/2cc873ba-81ea-4a3e-a6bc-15e9"..., 57) = 57 futex(0xcce634, FUTEX_WAIT, 1683, NULL) = 0
futex(0xcce608, FUTEX_WAKE, 1) = 0
futex(0xcce660, FUTEX_WAKE, 1) = 1
rt_sigaction(SIGPIPE, {SIG_IGN}, NULL, 8) = 0
futex(0xb18840, FUTEX_WAKE, 1) = 0
futex(0xb18840, FUTEX_WAKE, 1) = 0
rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0 futex(0xcce660, FUTEX_WAIT, 2, NULL <unfinished ...>

It may be related to the fact I had to use kill -9 on processus resulting from previous run, tough.

Signature · 3 lines
Guillaume Rousse
Moyens Informatiques - INRIA Futurs
Tel: 01 69 35 69 62