xenconsole fix. reference of tty->count in xencons_close() is racy. It must be protected by tty_sem semaphore like con_close() in drivers/char/vt.c -- yamahata _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Fri, 7 Jul 2006 17:35:56 +0900, Isaku Yamahata <yamahata@valinux.co.jp> wrote:> xenconsole fix. reference of tty->count in xencons_close() is racy. > It must be protected by tty_sem semaphore like con_close() in > drivers/char/vt.c> +++ b/linux-2.6-xen-sparse/drivers/xen/console/console.c Fri Jul 07 17:34:08 2006 +0900 > @@ -536,6 +536,7 @@ static void xencons_close(struct tty_str > if (DUMMY_TTY(tty)) > return; > > + down(&tty_sem); > if (tty->count == 1) { > tty->closing = 1; > tty_wait_until_sent(tty, 0);......> } > + up(&tty_sem); > }This is clearly not a safe idea. You do not know what the line discipline is going to do. If you are concerned about tty->count, then why don''t you drop the mutex before all those convoluted functions get called? -- Pete _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Mike Freemon
2006-Jul-07 20:26 UTC
[Xen-devel] network-bridge script breaks network connectivity
Hi All, First, I wasn''t sure whether to report this via bugzilla or the xen-devel list. Since this is against the current tip of xen-unstable, I went here first. I can move this to bugzilla if you want, just let me know. Summary is --> the "network-bridge start" script breaks all network connectivity. ICMP broken, DHCP fails, etc. I am running current FC5 EM64T x86_64 VT-x with the latest xen-unstable. Running "network-bridge stop" restores network functionality. Below is the relevant data -- before and after dumps, config files, and a trace of the network-bridge script itself. Any help is appreciated. Thanks... - Mike Hardware -------- Dell Precision 380 2 CPUs @ Intel Pentium D 965EE 3.73GHz/2x2MB L2, Dual Core HT VT-x EM64T 4 GB RAM 2 SATA @ 250GB each NIC class: NETWORK bus: PCI detached: 0 device: eth0 driver: tg3 desc: "Broadcom Corporation NetXtreme BCM5751 Gigabit Ethernet PCI Express" network.hwaddr: 00:13:72:1f:90:3d vendorId: 14e4 deviceId: 1677 subVendorId: 1028 subDeviceId: 01e8 pciType: 1 pcidom: 0 pcibus: 4 pcidev: 0 pcifn: 0 Software -------- Fedora Core 5 x86_64 w/ current updates Current Xen-unstable from hg [root@shark network-scripts]# uname -a Linux shark.ncsa.uiuc.edu 2.6.16.13-xen #1 SMP Thu Jul 6 22:48:46 CDT 2006 x86_64 x86_64 x86_64 GNU/Linux [root@shark network-scripts]# xm info host : shark.ncsa.uiuc.edu release : 2.6.16.13-xen version : #1 SMP Thu Jul 6 22:48:46 CDT 2006 machine : x86_64 nr_cpus : 4 nr_nodes : 1 sockets_per_node : 1 cores_per_socket : 2 threads_per_core : 2 cpu_mhz : 3724 hw_caps : bfebfbff:20000800:00000000:00000180:0000e43d:00000000:00000001 total_memory : 4030 free_memory : 127 xen_major : 3 xen_minor : 0 xen_extra : -unstable xen_caps : xen-3.0-x86_64 hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64 xen_pagesize : 4096 platform_params : virt_start=0xffff800000000000 xen_changeset : Wed Jul 05 18:48:41 2006 +0100 10647:8e55c5c11475 cc_compiler : gcc version 4.1.1 20060525 (Red Hat 4.1.1-1) cc_compile_by : root cc_compile_domain : ncsa.uiuc.edu cc_compile_date : Thu Jul 6 22:50:30 CDT 2006 [root@shark network-scripts]# ********************************************************* * * before execution of network-bridge start * * (I assume the "v" adapters are left over from earlier) * ********************************************************* [root@shark scripts]# ifconfig -a eth0 Link encap:Ethernet HWaddr 00:13:72:1F:90:3D inet addr:141.142.220.111 Bcast:141.142.220.255 Mask:255.255.255.0 inet6 addr: fe80::213:72ff:fe1f:903d/64 Scope:Link UP BROADCAST RUNNING MTU:1500 Metric:1 RX packets:1243 errors:0 dropped:0 overruns:0 frame:0 TX packets:562 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:550543 (537.6 KiB) TX bytes:71436 (69.7 KiB) Interrupt:17 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:194 errors:0 dropped:0 overruns:0 frame:0 TX packets:194 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:21248 (20.7 KiB) TX bytes:21248 (20.7 KiB) sit0 Link encap:IPv6-in-IPv4 NOARP MTU:1480 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 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) veth0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF BROADCAST NOARP MULTICAST MTU:1500 Metric:1 RX packets:150 errors:0 dropped:0 overruns:0 frame:0 TX packets:40 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:11376 (11.1 KiB) TX bytes:8250 (8.0 KiB) veth1 Link encap:Ethernet HWaddr 00:00:00:00:00:00 BROADCAST 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 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) veth2 Link encap:Ethernet HWaddr 00:00:00:00:00:00 BROADCAST 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 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) veth3 Link encap:Ethernet HWaddr 00:00:00:00:00:00 BROADCAST 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 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) veth4 Link encap:Ethernet HWaddr 00:00:00:00:00:00 BROADCAST 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 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) veth5 Link encap:Ethernet HWaddr 00:00:00:00:00:00 BROADCAST 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 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) veth6 Link encap:Ethernet HWaddr 00:00:00:00:00:00 BROADCAST 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 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) veth7 Link encap:Ethernet HWaddr 00:00:00:00:00:00 BROADCAST 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 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) vif0.0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF BROADCAST NOARP MTU:1500 Metric:1 RX packets:230 errors:0 dropped:0 overruns:0 frame:0 TX packets:327 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:26327 (25.7 KiB) TX bytes:25963 (25.3 KiB) vif0.1 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF BROADCAST 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 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) vif0.2 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF BROADCAST 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 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) vif0.3 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF BROADCAST 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 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) vif0.4 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF BROADCAST 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 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) vif0.5 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF BROADCAST 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 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) vif0.6 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF BROADCAST 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 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) vif0.7 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF BROADCAST 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 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) [root@shark scripts]# pwd /etc/xen/scripts [root@shark scripts]# ./network-bridge status ===========================================================18: eth0: <BROADCAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether 00:13:72:1f:90:3d brd ff:ff:ff:ff:ff:ff inet 141.142.220.111/24 brd 141.142.220.255 scope global eth0 inet6 fe80::213:72ff:fe1f:903d/64 scope link valid_lft forever preferred_lft forever Device "xenbr0" does not exist. [root@shark scripts]# netstat -rn Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 141.142.220.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0 0.0.0.0 141.142.220.1 0.0.0.0 UG 0 0 0 eth0 [root@shark scripts]# brctl show bridge name bridge id STP enabled interfaces [root@shark scripts]# ping www.yahoo.com PING www.yahoo.akadns.net (209.73.186.238) 56(84) bytes of data. 64 bytes from f1.www.vip.re3.yahoo.com (209.73.186.238): icmp_seq=1 ttl=49 time=56.2 ms 64 bytes from f1.www.vip.re3.yahoo.com (209.73.186.238): icmp_seq=2 ttl=48 time=44.7 ms 64 bytes from f1.www.vip.re3.yahoo.com (209.73.186.238): icmp_seq=3 ttl=48 time=43.3 ms --- www.yahoo.akadns.net ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2001ms rtt min/avg/max/mdev = 43.353/48.127/56.271/5.792 ms [root@shark scripts]# [root@shark xen]# cat xend-config.sxp # -*- sh -*- # # Xend configuration file. # # This example configuration is appropriate for an installation that # utilizes a bridged network configuration. Access to xend via http # is disabled. # Commented out entries show the default for that entry, unless otherwise # specified. #(logfile /var/log/xend.log) (loglevel DEBUG) #(xend-http-server no) #(xend-unix-server no) #(xend-tcp-xmlrpc-server no) #(xend-unix-xmlrpc-server yes) #(xend-relocation-server no) (xend-relocation-server yes) #(xend-unix-path /var/lib/xend/xend-socket) # Port xend should use for the HTTP interface, if xend-http-server is set. #(xend-port 8000) # Port xend should use for the relocation interface, if xend-relocation-server # is set. #(xend-relocation-port 8002) # Address xend should listen on for HTTP connections, if xend-http-server is # set. # Specifying ''localhost'' prevents remote connections. # Specifying the empty string '''' (the default) allows all connections. #(xend-address '''') #(xend-address localhost) # Address xend should listen on for relocation-socket connections, if # xend-relocation-server is set. # Meaning and default as for xend-address above. #(xend-relocation-address '''') # The hosts allowed to talk to the relocation port. If this is empty (the # default), then all connections are allowed (assuming that the connection # arrives on a port and interface on which we are listening; see # xend-relocation-port and xend-relocation-address above). Otherwise, this # should be a space-separated sequence of regular expressions. Any host with # a fully-qualified domain name or an IP address that matches one of these # regular expressions will be accepted. # # For example: # (xend-relocation-hosts-allow ''^localhost$ ^.*\.example\.org$'') # #(xend-relocation-hosts-allow '''') (xend-relocation-hosts-allow ''^localhost$'') # The limit (in kilobytes) on the size of the console buffer #(console-limit 1024) ## # To bridge network traffic, like this: # # dom0: fake eth0 -> vif0.0 -+ # | # bridge -> real eth0 -> the network # | # domU: fake eth0 -> vifN.0 -+ # # use # # (network-script network-bridge) # # Your default ethernet device is used as the outgoing interface, by default. # To use a different one (e.g. eth1) use # # (network-script ''network-bridge netdev=eth1'') # # The bridge is named xenbr0, by default. To rename the bridge, use # # (network-script ''network-bridge bridge=<name>'') # # It is possible to use the network-bridge script in more complicated # scenarios, such as having two outgoing interfaces, with two bridges, and # two fake interfaces per guest domain. To do things like this, write # yourself a wrapper script, and call network-bridge from it, as appropriate. # (network-script network-bridge) # The script used to control virtual interfaces. This can be overridden on a # per-vif basis when creating a domain or a configuring a new vif. The # vif-bridge script is designed for use with the network-bridge script, or # similar configurations. # # If you have overridden the bridge name using # (network-script ''network-bridge bridge=<name>'') then you may wish to do the # same here. The bridge name can also be set when creating a domain or # configuring a new vif, but a value specified here would act as a default. # # If you are using only one bridge, the vif-bridge script will discover that, # so there is no need to specify it explicitly. # (vif-script vif-bridge) ## Use the following if network traffic is routed, as an alternative to the # settings for bridged networking given above. #(network-script network-route) #(vif-script vif-route) ## Use the following if network traffic is routed with NAT, as an alternative # to the settings for bridged networking given above. #(network-script network-nat) #(vif-script vif-nat) # Dom0 will balloon out when needed to free memory for domU. # dom0-min-mem is the lowest memory level (in MB) dom0 will get down to. # If dom0-min-mem=0, dom0 will never balloon out. (dom0-min-mem 196) # In SMP system, dom0 will use dom0-cpus # of CPUS # If dom0-cpus = 0, dom0 will take all cpus available (dom0-cpus 0) # Whether to enable core-dumps when domains crash. #(enable-dump no) # The tool used for initiating virtual TPM migration #(external-migration-tool '''') [root@shark xen]# [root@shark scripts]# cat /proc/interrupts CPU0 CPU1 CPU2 CPU3 1: 247 63 8547 608 Phys-irq i8042 7: 0 0 0 0 Phys-irq parport0 8: 0 0 0 0 Phys-irq rtc 9: 0 0 0 0 Phys-irq acpi 12: 10345 0 8008 127287 Phys-irq i8042 14: 131 1205 37361 0 Phys-irq ide0 16: 73 0 0 0 Phys-irq HDA Intel 17: 15519 0 0 0 Phys-irq eth0 18: 6984 5390 55 0 Phys-irq libata 19: 0 0 0 0 Phys-irq uhci_hcd:usb1, ehci_hcd:usb5 20: 0 0 0 0 Phys-irq uhci_hcd:usb2 21: 3 0 0 0 Phys-irq uhci_hcd:usb3, ohci1394 22: 0 0 0 0 Phys-irq uhci_hcd:usb4 256: 447212 0 0 0 Dynamic-irq timer0 257: 150173 0 0 0 Dynamic-irq resched0 258: 6473 0 0 0 Dynamic-irq callfunc0 259: 0 243402 0 0 Dynamic-irq resched1 260: 0 6442 0 0 Dynamic-irq callfunc1 261: 0 525624 0 0 Dynamic-irq timer1 262: 0 0 203927 0 Dynamic-irq resched2 263: 0 0 416 0 Dynamic-irq callfunc2 264: 0 0 659350 0 Dynamic-irq timer2 265: 0 0 0 329754 Dynamic-irq resched3 266: 0 0 0 6607 Dynamic-irq callfunc3 267: 0 0 0 455152 Dynamic-irq timer3 268: 101 0 0 0 Dynamic-irq xenbus 269: 0 0 0 0 Dynamic-irq console NMI: 0 0 0 0 LOC: 0 0 0 0 ERR: 0 MIS: 0 ************************************************************* * * execution of network-bridge start here * ************************************************************* [root@shark scripts]# sh -x network-bridge start ++ dirname network-bridge + dir=. + . ./xen-script-common.sh ++ set -e + . ./xen-network-common.sh ++ ''['' -e /etc/SuSE-release '']'' ++ which ifup + findCommand start + for arg in ''"$@"'' + expr index start + command=start + return + evalVariables start + for arg in ''"$@"'' + expr index start = ''>'' 1 ++ ip route list ++ awk ''/^default / { print $NF }'' ++ sed ''s/^[^0-9]*//'' + vifnum=0 + vifnum=0 + bridge=xenbr0 + netdev=eth0 + antispoof=no + pdev=peth0 + vdev=veth0 + vif0=vif0.0 + case "$command" in + op_start + ''['' xenbr0 = null '']'' + link_exists veth0 + ip link show veth0 + return 0 + create_bridge xenbr0 + local bridge=xenbr0 + ''['' ''!'' -e /sys/class/net/xenbr0/bridge '']'' + brctl addbr xenbr0 + brctl stp xenbr0 off + brctl setfd xenbr0 0 + ip link set xenbr0 arp off + ip link set xenbr0 multicast off + ip link set xenbr0 up + link_exists veth0 + ip link show veth0 + return 0 ++ ip link show eth0 ++ grep ''link\/ether'' ++ sed -e ''s/.*ether \(..:..:..:..:..:..\).*/\1/'' + mac=00:13:72:1f:90:3d + preiftransfer eth0 + true + transfer_addrs eth0 veth0 + local src=eth0 + local dst=veth0 + ip addr show dev veth0 + egrep -q ''^ *inet '' + ip addr show dev eth0 + egrep ''^ *inet '' + sed -e '' s/inet/ip addr add/ s@\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+/[0-9]\+\)@\1@ s/eth0/dev veth0/ '' + sh -e + ip route list + sed -ne '' /dev veth0\( \|$\)/ { s/^/ip route del / p }'' + sh -e + ifdown eth0 + ip link set eth0 name peth0 + ip link set veth0 name eth0 + setup_bridge_port peth0 + local dev=peth0 + ip link set peth0 down + ip link set peth0 arp off + ip link set peth0 multicast off + ip link set peth0 addr fe:ff:ff:ff:ff:ff + ip addr flush peth0 Nothing to flush. + setup_bridge_port vif0.0 + local dev=vif0.0 + ip link set vif0.0 down + ip link set vif0.0 arp off + ip link set vif0.0 multicast off + ip link set vif0.0 addr fe:ff:ff:ff:ff:ff + ip addr flush vif0.0 Nothing to flush. + ip link set eth0 addr 00:13:72:1f:90:3d arp on + ip link set xenbr0 up + add_to_bridge xenbr0 vif0.0 + local bridge=xenbr0 + local dev=vif0.0 + ''['' -e /sys/class/net/xenbr0/brif/vif0.0 '']'' + brctl addif xenbr0 vif0.0 + ip link set vif0.0 up + add_to_bridge2 xenbr0 peth0 + local bridge=xenbr0 + local dev=peth0 + local maxtries=10 + echo -n ''Waiting for peth0 to negotiate link.'' Waiting for peth0 to negotiate link.+ ip link set peth0 up ++ seq 10 + for i in ''`seq ${maxtries}`'' + ifconfig peth0 + grep -q RUNNING + echo -n . .+ sleep 1 + for i in ''`seq ${maxtries}`'' + ifconfig peth0 + grep -q RUNNING + echo -n . .+ sleep 1 + for i in ''`seq ${maxtries}`'' + ifconfig peth0 + grep -q RUNNING + echo -n . .+ sleep 1 + for i in ''`seq ${maxtries}`'' + ifconfig peth0 + grep -q RUNNING + echo -n . .+ sleep 1 + for i in ''`seq ${maxtries}`'' + ifconfig peth0 + grep -q RUNNING + echo -n . .+ sleep 1 + for i in ''`seq ${maxtries}`'' + ifconfig peth0 + grep -q RUNNING + echo -n . .+ sleep 1 + for i in ''`seq ${maxtries}`'' + ifconfig peth0 + grep -q RUNNING + echo -n . .+ sleep 1 + for i in ''`seq ${maxtries}`'' + ifconfig peth0 + grep -q RUNNING + break + ''['' 8 -eq 10 '']'' + add_to_bridge xenbr0 peth0 + local bridge=xenbr0 + local dev=peth0 + ''['' -e /sys/class/net/xenbr0/brif/peth0 '']'' + brctl addif xenbr0 peth0 + ip link set peth0 up + do_ifup eth0 + ifup eth0 Determining IP information for eth0...PING 141.142.220.1 (141.142.220.1) from 141.142.220.111 eth0: 56(84) bytes of data. --- 141.142.220.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 6.290/6.290/6.290/0.000 ms done. + ''['' no = yes '']'' [root@shark scripts]# ********************************************************* * * after execution of network-bridge start * * (no network connectivity) * ********************************************************* [root@shark log]# ping www.yahoo.com ping: unknown host www.yahoo.com [root@shark log]# [root@shark scripts]# ifconfig -a eth0 Link encap:Ethernet HWaddr 00:13:72:1F:90:3D inet addr:141.142.220.111 Bcast:141.142.220.255 Mask:255.255.255.0 inet6 addr: fe80::213:72ff:fe1f:903d/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:93 errors:0 dropped:0 overruns:0 frame:0 TX packets:16 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:8608 (8.4 KiB) TX bytes:3344 (3.2 KiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:194 errors:0 dropped:0 overruns:0 frame:0 TX packets:194 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:21248 (20.7 KiB) TX bytes:21248 (20.7 KiB) peth0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 RX packets:138 errors:0 dropped:0 overruns:0 frame:0 TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:16228 (15.8 KiB) TX bytes:658 (658.0 b) Interrupt:17 sit0 Link encap:IPv6-in-IPv4 NOARP MTU:1480 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 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) veth1 Link encap:Ethernet HWaddr 00:00:00:00:00:00 BROADCAST 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 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) veth2 Link encap:Ethernet HWaddr 00:00:00:00:00:00 BROADCAST 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 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) veth3 Link encap:Ethernet HWaddr 00:00:00:00:00:00 BROADCAST 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 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) veth4 Link encap:Ethernet HWaddr 00:00:00:00:00:00 BROADCAST 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 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) veth5 Link encap:Ethernet HWaddr 00:00:00:00:00:00 BROADCAST 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 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) veth6 Link encap:Ethernet HWaddr 00:00:00:00:00:00 BROADCAST 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 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) veth7 Link encap:Ethernet HWaddr 00:00:00:00:00:00 BROADCAST 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 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) vif0.0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 RX packets:16 errors:0 dropped:0 overruns:0 frame:0 TX packets:93 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:3344 (3.2 KiB) TX bytes:8608 (8.4 KiB) vif0.1 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF BROADCAST 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 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) vif0.2 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF BROADCAST 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 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) vif0.3 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF BROADCAST 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 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) vif0.4 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF BROADCAST 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 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) vif0.5 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF BROADCAST 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 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) vif0.6 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF BROADCAST 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 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) vif0.7 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF BROADCAST 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 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) xenbr0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 RX packets:154 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:17011 (16.6 KiB) TX bytes:0 (0.0 b) [root@shark scripts]# pwd /etc/xen/scripts [root@shark scripts]# ./network-bridge status ===========================================================3: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue link/ether 00:13:72:1f:90:3d brd ff:ff:ff:ff:ff:ff inet 141.142.220.111/24 brd 141.142.220.255 scope global eth0 inet6 fe80::213:72ff:fe1f:903d/64 scope link valid_lft forever preferred_lft forever 21: xenbr0: <BROADCAST,NOARP,UP> mtu 1500 qdisc noqueue link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff inet6 fe80::200:ff:fe00:0/64 scope link valid_lft forever preferred_lft forever bridge name bridge id STP enabled interfaces xenbr0 8000.feffffffffff no peth0 vif0.0 141.142.220.0/24 dev eth0 proto kernel scope link src 141.142.220.111 169.254.0.0/16 dev eth0 scope link default via 141.142.220.1 dev eth0 Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 141.142.220.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0 0.0.0.0 141.142.220.1 0.0.0.0 UG 0 0 0 eth0 ===========================================================[root@shark scripts]# netstat -rn Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 141.142.220.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0 0.0.0.0 141.142.220.1 0.0.0.0 UG 0 0 0 eth0 [root@shark scripts]# brctl show bridge name bridge id STP enabled interfaces xenbr0 8000.feffffffffff no peth0 vif0.0 [root@shark log]# xm dmesg __ __ _____ ___ _ _ _ \ \/ /___ _ __ |___ / / _ \ _ _ _ __ ___| |_ __ _| |__ | | ___ \ // _ \ ''_ \ |_ \| | | |__| | | | ''_ \/ __| __/ _` | ''_ \| |/ _ \ / \ __/ | | | ___) | |_| |__| |_| | | | \__ \ || (_| | |_) | | __/ /_/\_\___|_| |_| |____(_)___/ \__,_|_| |_|___/\__\__,_|_.__/|_|\___| http://www.cl.cam.ac.uk/netos/xen University of Cambridge Computer Laboratory Xen version 3.0-unstable (root@ncsa.uiuc.edu) (gcc version 4.1.1 20060525 (Red Hat 4.1.1-1)) Thu Jul 6 22:50:30 CDT 2006 Latest ChangeSet: Wed Jul 05 18:48:41 2006 +0100 10647:8e55c5c11475 (XEN) Command line: /xen-3.0-unstable.gz (XEN) Physical RAM map: (XEN) 0000000000000000 - 00000000000a0000 (usable) (XEN) 00000000000f0000 - 0000000000100000 (reserved) (XEN) 0000000000100000 - 00000000e7e8ac00 (usable) (XEN) 00000000e7e8ac00 - 00000000e7e8cc00 (ACPI NVS) (XEN) 00000000e7e8cc00 - 00000000e7e8ec00 (ACPI data) (XEN) 00000000e7e8ec00 - 00000000e8000000 (reserved) (XEN) 00000000f0000000 - 00000000f4000000 (reserved) (XEN) 00000000fec00000 - 00000000fed00400 (reserved) (XEN) 00000000fed20000 - 00000000feda0000 (reserved) (XEN) 00000000fee00000 - 00000000fef00000 (reserved) (XEN) 00000000ffb00000 - 0000000100000000 (reserved) (XEN) 0000000100000000 - 0000000114000000 (usable) (XEN) System RAM: 4030MB (4126888kB) (XEN) Xen heap: 13MB (14308kB) (XEN) Using scheduler: SMP Credit Scheduler (credit) (XEN) found SMP MP-table at 000fe710 (XEN) DMI 2.3 present. (XEN) Using APIC driver default (XEN) ACPI: RSDP (v002 DELL ) @ 0x00000000000feb00 (XEN) ACPI: XSDT (v001 DELL WS 380 0x00000007 ASL 0x00000061) @ 0x00000000000fd260 (XEN) ACPI: FADT (v003 DELL WS 380 0x00000007 ASL 0x00000061) @ 0x00000000000fd358 (XEN) ACPI: SSDT (v001 DELL st_ex 0x00001000 INTL 0x20050309) @ 0x00000000fffcd6c9 (XEN) ACPI: MADT (v001 DELL WS 380 0x00000007 ASL 0x00000061) @ 0x00000000000fd44c (XEN) ACPI: BOOT (v001 DELL WS 380 0x00000007 ASL 0x00000061) @ 0x00000000000fd4be (XEN) ACPI: ASF! (v016 DELL WS 380 0x00000007 ASL 0x00000061) @ 0x00000000000fd4e6 (XEN) ACPI: MCFG (v001 DELL WS 380 0x00000007 ASL 0x00000061) @ 0x00000000000fd54d (XEN) ACPI: HPET (v001 DELL WS 380 0x00000007 ASL 0x00000061) @ 0x00000000000fd58b (XEN) ACPI: DSDT (v001 DELL dt_ex 0x00001000 INTL 0x20050309) @ 0x0000000000000000 (XEN) ACPI: Local APIC address 0xfee00000 (XEN) ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled) (XEN) Processor #0 15:6 APIC version 20 (XEN) ACPI: LAPIC (acpi_id[0x02] lapic_id[0x02] enabled) (XEN) Processor #2 15:6 APIC version 20 (XEN) ACPI: LAPIC (acpi_id[0x03] lapic_id[0x01] enabled) (XEN) Processor #1 15:6 APIC version 20 (XEN) ACPI: LAPIC (acpi_id[0x04] lapic_id[0x03] enabled) (XEN) Processor #3 15:6 APIC version 20 (XEN) ACPI: LAPIC_NMI (acpi_id[0xff] high level lint[0x1]) (XEN) ACPI: IOAPIC (id[0x08] address[0xfec00000] gsi_base[0]) (XEN) IOAPIC[0]: apic_id 8, version 32, address 0xfec00000, GSI 0-23 (XEN) ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl) (XEN) ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level) (XEN) ACPI: IRQ0 used by override. (XEN) ACPI: IRQ2 used by override. (XEN) ACPI: IRQ9 used by override. (XEN) Enabling APIC mode: Flat. Using 1 I/O APICs (XEN) ACPI: HPET id: 0x8086a201 base: 0xfed00000 (XEN) Using ACPI (MADT) for SMP configuration information (XEN) Initializing CPU#0 (XEN) Detected 3724.207 MHz processor. (XEN) CPU: Trace cache: 12K uops, L1 D cache: 16K (XEN) CPU: L2 cache: 2048K (XEN) CPU: Physical Processor ID: 0 (XEN) CPU: Processor Core ID: 0 (XEN) VMXON is done (XEN) Intel machine check architecture supported. (XEN) Intel machine check reporting enabled on CPU#0. (XEN) CPU0: Intel P4/Xeon Extended MCE MSRs (24) available (XEN) CPU0: Thermal monitoring enabled (XEN) CPU0: Intel(R) Pentium(R) D CPU 3.73GHz stepping 04 (XEN) Booting processor 1/2 eip 90000 (XEN) Initializing CPU#1 (XEN) CPU: Trace cache: 12K uops, L1 D cache: 16K (XEN) CPU: L2 cache: 2048K (XEN) CPU: Physical Processor ID: 0 (XEN) CPU: Processor Core ID: 1 (XEN) VMXON is done (XEN) Intel machine check architecture supported. (XEN) Intel machine check reporting enabled on CPU#1. (XEN) CPU1: Intel P4/Xeon Extended MCE MSRs (24) available (XEN) CPU1: Thermal monitoring enabled (XEN) CPU1: Intel(R) Pentium(R) D CPU 3.73GHz stepping 04 (XEN) Booting processor 2/1 eip 90000 (XEN) Initializing CPU#2 (XEN) CPU: Trace cache: 12K uops, L1 D cache: 16K (XEN) CPU: L2 cache: 2048K (XEN) CPU: Physical Processor ID: 0 (XEN) CPU: Processor Core ID: 0 (XEN) VMXON is done (XEN) Intel machine check architecture supported. (XEN) Intel machine check reporting enabled on CPU#2. (XEN) CPU2: Intel P4/Xeon Extended MCE MSRs (24) available (XEN) CPU2: Thermal monitoring enabled (XEN) CPU2: Intel(R) Pentium(R) D CPU 3.73GHz stepping 04 (XEN) Booting processor 3/3 eip 90000 (XEN) Initializing CPU#3 (XEN) CPU: Trace cache: 12K uops, L1 D cache: 16K (XEN) CPU: L2 cache: 2048K (XEN) CPU: Physical Processor ID: 0 (XEN) CPU: Processor Core ID: 1 (XEN) VMXON is done (XEN) Intel machine check architecture supported. (XEN) Intel machine check reporting enabled on CPU#3. (XEN) CPU3: Intel P4/Xeon Extended MCE MSRs (24) available (XEN) CPU3: Thermal monitoring enabled (XEN) CPU3: Intel(R) Pentium(R) D CPU 3.73GHz stepping 04 (XEN) Total of 4 processors activated. (XEN) ENABLING IO-APIC IRQs (XEN) -> Using new ACK method (XEN) ..TIMER: vector=0xF0 apic1=0 pin1=2 apic2=-1 pin2=-1 (XEN) checking TSC synchronization across 4 CPUs: passed. (XEN) Platform timer is 14.318MHz HPET (XEN) Brought up 4 CPUs (XEN) Machine check exception polling timer started. (XEN) *** LOADING DOMAIN 0 *** (XEN) Domain 0 kernel supports features = { 0000000f }. (XEN) Domain 0 kernel requires features = { 00000000 }. (XEN) PHYSICAL MEMORY ARRANGEMENT: (XEN) Dom0 alloc.: 0000000006000000->0000000008000000 (973151 pages to be allocated) (XEN) VIRTUAL MEMORY ARRANGEMENT: (XEN) Loaded kernel: ffffffff80100000->ffffffff8044bf08 (XEN) Init. ramdisk: ffffffff8044c000->ffffffff80894a00 (XEN) Phys-Mach map: ffffffff80895000->ffffffff81011af8 (XEN) Start info: ffffffff81012000->ffffffff81013000 (XEN) Page tables: ffffffff81013000->ffffffff81020000 (XEN) Boot stack: ffffffff81020000->ffffffff81021000 (XEN) TOTAL: ffffffff80000000->ffffffff81400000 (XEN) ENTRY ADDRESS: ffffffff80100000 (XEN) Dom0 has maximum 4 VCPUs (XEN) Initrd len 0x448a00, start at 0xffffffff8044c000 (XEN) Scrubbing Free RAM: .............................................done. (XEN) Xen trace buffers: disabled (XEN) Xen is relinquishing VGA console. (XEN) *** Serial input -> DOM0 (type ''CTRL-a'' three times to switch input to Xen). [root@shark log]# [root@shark log]# dmesg|tail -50 eth0: no IPv6 routers present ADDRCONF(NETDEV_UP): eth0: link is not ready ADDRCONF(NETDEV_UP): eth0: link is not ready tg3: eth0: Link is up at 1000 Mbps, full duplex. tg3: eth0: Flow control is on for TX and on for RX. ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready eth0: no IPv6 routers present Bridge firewalling registered device vif0.0 entered promiscuous mode xenbr0: port 1(vif0.0) entering learning state xenbr0: topology change detected, propagating xenbr0: port 1(vif0.0) entering forwarding state ADDRCONF(NETDEV_UP): peth0: link is not ready tg3: peth0: Link is up at 1000 Mbps, full duplex. tg3: peth0: Flow control is on for TX and on for RX. ADDRCONF(NETDEV_CHANGE): peth0: link becomes ready device peth0 entered promiscuous mode xenbr0: port 2(peth0) entering learning state xenbr0: topology change detected, propagating xenbr0: port 2(peth0) entering forwarding state eth0: no IPv6 routers present eth0: no IPv6 routers present xenbr0: port 1(vif0.0) entering disabled state xenbr0: port 2(peth0) entering disabled state peth0 adding interface with same address as a received packet device peth0 left promiscuous mode xenbr0: port 2(peth0) entering disabled state device vif0.0 left promiscuous mode xenbr0: port 1(vif0.0) entering disabled state ADDRCONF(NETDEV_UP): eth0: link is not ready tg3: eth0: Link is up at 1000 Mbps, full duplex. tg3: eth0: Flow control is on for TX and on for RX. ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready ADDRCONF(NETDEV_UP): eth0: link is not ready tg3: eth0: Link is up at 1000 Mbps, full duplex. tg3: eth0: Flow control is on for TX and on for RX. ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready device vif0.0 entered promiscuous mode xenbr0: port 1(vif0.0) entering learning state xenbr0: topology change detected, propagating xenbr0: port 1(vif0.0) entering forwarding state ADDRCONF(NETDEV_UP): peth0: link is not ready tg3: peth0: Link is up at 1000 Mbps, full duplex. tg3: peth0: Flow control is on for TX and on for RX. ADDRCONF(NETDEV_CHANGE): peth0: link becomes ready device peth0 entered promiscuous mode xenbr0: port 2(peth0) entering learning state xenbr0: topology change detected, propagating xenbr0: port 2(peth0) entering forwarding state eth0: no IPv6 routers present [root@shark log]# [root@shark log]# cat xend.log [2006-07-07 14:11:35 xend 4214] INFO (SrvDaemon:283) Xend Daemon started [2006-07-07 14:11:35 xend 4214] INFO (SrvDaemon:287) Xend changeset: Wed Jul 05 18:48:41 2006 +0100 10647:8e55c5c11475. [2006-07-07 14:11:35 xend.XendDomainInfo 4214] DEBUG (XendDomainInfo:208) XendDomainInfo.recreate({''paused'': 0, ''cpu_time'': 1426695905974L, ''ssidref'': 0, ''handle'': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ''shutdown_reason'': 0, ''dying'': 0, ''dom'': 0, ''mem_kb'': 3925372, ''maxmem_kb'': 17179869180, ''max_vcpu_id'': 3, ''crashed'': 0, ''running'': 1, ''shutdown'': 0, ''online_vcpus'': 4, ''blocked'': 0}) [2006-07-07 14:11:35 xend.XendDomainInfo 4214] INFO (XendDomainInfo:220) Recreating domain 0, UUID 00000000-0000-0000-0000-000000000000. [2006-07-07 14:11:35 xend.XendDomainInfo 4214] WARNING (XendDomainInfo:242) No vm path in store for existing domain 0 [2006-07-07 14:11:35 xend.XendDomainInfo 4214] DEBUG (XendDomainInfo:702) Storing VM details: {''name'': ''Domain-0'', ''on_reboot'': ''restart'', ''on_poweroff'': ''destroy'', ''uuid'': ''00000000-0000-0000-0000-000000000000'', ''on_crash'': ''restart'', ''vcpus'': ''4'', ''vcpu_avail'': ''15'', ''memory'': ''3834'', ''maxmem'': ''3834''} [2006-07-07 14:11:35 xend.XendDomainInfo 4214] DEBUG (XendDomainInfo:737) Storing domain details: {''cpu/1/availability'': ''online'', ''cpu/3/availability'': ''online'', ''name'': ''Domain-0'', ''console/limit'': ''1048576'', ''cpu/2/availability'': ''online'', ''vm'': ''/vm/00000000-0000-0000-0000-000000000000'', ''domid'': ''0'', ''cpu/0/availability'': ''online'', ''memory/target'': ''3926016''} [2006-07-07 14:11:35 xend 4214] DEBUG (XendDomain:153) number of vcpus to use is 0 [2006-07-07 14:11:35 xend.XendDomainInfo 4214] DEBUG (XendDomainInfo:920) XendDomainInfo.handleShutdownWatch [root@shark log]# [root@shark log]# cat xend-debug.log Nothing to flush. Nothing to flush. [root@shark log]# [root@shark scripts]# cat /proc/interrupts CPU0 CPU1 CPU2 CPU3 1: 247 63 8928 608 Phys-irq i8042 7: 0 0 0 0 Phys-irq parport0 8: 0 0 0 0 Phys-irq rtc 9: 0 0 0 0 Phys-irq acpi 12: 10345 0 8008 129259 Phys-irq i8042 14: 131 1205 37805 0 Phys-irq ide0 16: 73 0 0 0 Phys-irq HDA Intel 17: 15674 0 0 0 Phys-irq peth0 18: 6984 5541 55 0 Phys-irq libata 19: 0 0 0 0 Phys-irq uhci_hcd:usb1, ehci_hcd:usb5 20: 0 0 0 0 Phys-irq uhci_hcd:usb2 21: 3 0 0 0 Phys-irq uhci_hcd:usb3, ohci1394 22: 0 0 0 0 Phys-irq uhci_hcd:usb4 256: 450957 0 0 0 Dynamic-irq timer0 257: 151586 0 0 0 Dynamic-irq resched0 258: 6547 0 0 0 Dynamic-irq callfunc0 259: 0 245111 0 0 Dynamic-irq resched1 260: 0 6516 0 0 Dynamic-irq callfunc1 261: 0 535159 0 0 Dynamic-irq timer1 262: 0 0 205406 0 Dynamic-irq resched2 263: 0 0 416 0 Dynamic-irq callfunc2 264: 0 0 664594 0 Dynamic-irq timer2 265: 0 0 0 331968 Dynamic-irq resched3 266: 0 0 0 6681 Dynamic-irq callfunc3 267: 0 0 0 461830 Dynamic-irq timer3 268: 101 0 0 0 Dynamic-irq xenbus 269: 0 0 0 0 Dynamic-irq console NMI: 0 0 0 0 LOC: 0 0 0 0 ERR: 0 MIS: 0 [root@shark scripts]# cat /proc/interrupts CPU0 CPU1 CPU2 CPU3 1: 247 63 9014 608 Phys-irq i8042 7: 0 0 0 0 Phys-irq parport0 8: 0 0 0 0 Phys-irq rtc 9: 0 0 0 0 Phys-irq acpi 12: 10345 0 8008 131011 Phys-irq i8042 14: 131 1205 37937 0 Phys-irq ide0 16: 73 0 0 0 Phys-irq HDA Intel 17: 15729 0 0 0 Phys-irq peth0 18: 6984 5580 55 0 Phys-irq libata 19: 0 0 0 0 Phys-irq uhci_hcd:usb1, ehci_hcd:usb5 20: 0 0 0 0 Phys-irq uhci_hcd:usb2 21: 3 0 0 0 Phys-irq uhci_hcd:usb3, ohci1394 22: 0 0 0 0 Phys-irq uhci_hcd:usb4 256: 452006 0 0 0 Dynamic-irq timer0 257: 152144 0 0 0 Dynamic-irq resched0 258: 6569 0 0 0 Dynamic-irq callfunc0 259: 0 246043 0 0 Dynamic-irq resched1 260: 0 6538 0 0 Dynamic-irq callfunc1 261: 0 537793 0 0 Dynamic-irq timer1 262: 0 0 205995 0 Dynamic-irq resched2 263: 0 0 416 0 Dynamic-irq callfunc2 264: 0 0 666652 0 Dynamic-irq timer2 265: 0 0 0 333086 Dynamic-irq resched3 266: 0 0 0 6703 Dynamic-irq callfunc3 267: 0 0 0 463610 Dynamic-irq timer3 268: 101 0 0 0 Dynamic-irq xenbus 269: 0 0 0 0 Dynamic-irq console NMI: 0 0 0 0 LOC: 0 0 0 0 ERR: 0 MIS: 0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Fri, Jul 07, 2006 at 12:24:50PM -0700, Pete Zaitcev wrote:> On Fri, 7 Jul 2006 17:35:56 +0900, Isaku Yamahata <yamahata@valinux.co.jp> wrote: > > > xenconsole fix. reference of tty->count in xencons_close() is racy. > > It must be protected by tty_sem semaphore like con_close() in > > drivers/char/vt.c > > > +++ b/linux-2.6-xen-sparse/drivers/xen/console/console.c Fri Jul 07 17:34:08 2006 +0900 > > @@ -536,6 +536,7 @@ static void xencons_close(struct tty_str > > if (DUMMY_TTY(tty)) > > return; > > > > + down(&tty_sem); > > if (tty->count == 1) { > > tty->closing = 1; > > tty_wait_until_sent(tty, 0); > ...... > > } > > + up(&tty_sem); > > } > > This is clearly not a safe idea. You do not know what the line > discipline is going to do. If you are concerned about tty->count, > then why don''t you drop the mutex before all those convoluted > functions get called?You''re right. It''s daingerous. How about this patch? Setting TTY_CLOSING is intrusinve. But referencing tty->count is already intrusive. -- yamahata _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Sat, 8 Jul 2006 14:16:29 +0900, Isaku Yamahata <yamahata@valinux.co.jp> wrote:> You''re right. It''s daingerous. How about this patch? > Setting TTY_CLOSING is intrusinve. > But referencing tty->count is already intrusive.I agree with this logic. However, I don''t know what Alan Cox is going to say about (or whoever maintains tty_io.c now). -- Pete _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Christian Limpach
2006-Jul-08 15:47 UTC
Re: [Xen-devel] network-bridge script breaks network connectivity
On 7/7/06, Mike Freemon <mfreemon@ncsa.uiuc.edu> wrote:> Hi All, > > First, I wasn''t sure whether to report this via bugzilla or the xen-devel > list. Since this is against the current tip of xen-unstable, I went here > first. I can move this to bugzilla if you want, just let me know. > > Summary is --> the "network-bridge start" script breaks all network > connectivity. ICMP broken, DHCP fails, etc. I am running current FC5 > EM64T x86_64 VT-x with the latest xen-unstable. Running "network-bridge > stop" restores network functionality. > > Below is the relevant data -- before and after dumps, config files, and a > trace of the network-bridge script itself. Any help is appreciated. Thanks...What does your /etc/resolv.conf look like before/after network-bridge start? Does ping with an IP address work? You say that DHCP fails but the log looks like it succeeds and even ping of your gateway address seems to work. christian _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Mike Freemon
2006-Jul-08 22:28 UTC
Re: [Xen-devel] network-bridge script breaks network connectivity
You are correct -- My short summary was technically accurate in only the most abstract of ways :-) After some more digging, I found that the iptables rules were blocking traffic passing across the xenbr0 bridge (bridge-nf). I am using the same "fedora default" iptables rules as my other xen machines (dumped below), so I was confused as to why this machine was different. This happens to be the first machine I have compiled Xen from hg sources (to pull in the latest vt-x vmx stuff). What I found was that the fedora distro of Xen contains the following lines in the create_bridge() method of /etc/xen/scripts/network-bridge: sysctl -w "net.bridge.bridge-nf-call-arptables=0" sysctl -w "net.bridge.bridge-nf-call-ip6tables=0" sysctl -w "net.bridge.bridge-nf-call-iptables=0" This disables the iptables filtering on the bridge. This seems like a reasonable default since bridges don''t normally do IP-layer filtering. What is the view of the Xen team on this? Are there reasons why this could not be included in the xen sources as well? - Mike :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [8335:620449] :RH-Firewall-1-INPUT - [0:0] -A INPUT -j RH-Firewall-1-INPUT -A FORWARD -j RH-Firewall-1-INPUT -A RH-Firewall-1-INPUT -i lo -j ACCEPT -A RH-Firewall-1-INPUT -p icmp -m icmp --icmp-type any -j ACCEPT -A RH-Firewall-1-INPUT -p ipv6-crypt -j ACCEPT -A RH-Firewall-1-INPUT -p ipv6-auth -j ACCEPT -A RH-Firewall-1-INPUT -d 224.0.0.251 -p udp -m udp --dport 5353 -j ACCEPT -A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT -A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT -A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT -A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited COMMIT At 7/8/2006 10:47 AM Saturday, Christian Limpach wrote:>On 7/7/06, Mike Freemon <mfreemon@ncsa.uiuc.edu> wrote: >>Hi All, >> >>First, I wasn''t sure whether to report this via bugzilla or the xen-devel >>list. Since this is against the current tip of xen-unstable, I went here >>first. I can move this to bugzilla if you want, just let me know. >> >>Summary is --> the "network-bridge start" script breaks all network >>connectivity. ICMP broken, DHCP fails, etc. I am running current FC5 >>EM64T x86_64 VT-x with the latest xen-unstable. Running "network-bridge >>stop" restores network functionality. >> >>Below is the relevant data -- before and after dumps, config files, and a >>trace of the network-bridge script itself. Any help is >>appreciated. Thanks... > >What does your /etc/resolv.conf look like before/after network-bridge start? >Does ping with an IP address work? >You say that DHCP fails but the log looks like it succeeds and even >ping of your gateway address seems to work. > > christian > >_______________________________________________ >Xen-devel mailing list >Xen-devel@lists.xensource.com >http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Mike Freemon
2006-Jul-11 02:41 UTC
[Xen-devel] [PATCH] Re: network-bridge script breaks network connectivity
This patch configures the bridge to *not* apply iptables filtering. This makes the virtual bridge more like a real bridge (in that ip-layer filter does not happen) and it makes the installation/configuration of xen from sources easier (at least on FC5). Submitted for your consideration... - Mike # HG changeset patch # User root@shark.ncsa.uiuc.edu # Node ID f0fa1126dae5f897eac9a162a6ccbb6ceca7f9b9 # Parent a1c2cede77c78d2af99088d7dece8f74f2a27260 Disable iptables filtering of bridge traffic Signed-off-by: Mike Freemon mfreemon@ncsa.uiuc.edu diff -r a1c2cede77c7 -r f0fa1126dae5 tools/examples/xen-network-common.sh --- a/tools/examples/xen-network-common.sh Mon Jul 10 15:01:49 2006 +0100 +++ b/tools/examples/xen-network-common.sh Mon Jul 10 15:39:56 2006 -0500 @@ -127,6 +127,12 @@ create_bridge () { # Don''t create the bridge if it already exists. if [ ! -e "/sys/class/net/${bridge}/bridge" ]; then + # use brctl to force initialization of bridge-nf + brctl show >/dev/null 2>&1 + # disable iptables filtering in bridge + sysctl -w "net.bridge.bridge-nf-call-arptables=0" + sysctl -w "net.bridge.bridge-nf-call-ip6tables=0" + sysctl -w "net.bridge.bridge-nf-call-iptables=0" brctl addbr ${bridge} brctl stp ${bridge} off brctl setfd ${bridge} 0 At 7/8/2006 05:28 PM Saturday, Mike Freemon wrote:>You are correct -- My short summary was technically accurate in only the >most abstract of ways :-) > >After some more digging, I found that the iptables rules were blocking >traffic passing across the xenbr0 bridge (bridge-nf). I am using the same >"fedora default" iptables rules as my other xen machines (dumped below), >so I was confused as to why this machine was different. This happens to >be the first machine I have compiled Xen from hg sources (to pull in the >latest vt-x vmx stuff). > >What I found was that the fedora distro of Xen contains the following >lines in the create_bridge() method of /etc/xen/scripts/network-bridge: > >sysctl -w "net.bridge.bridge-nf-call-arptables=0" >sysctl -w "net.bridge.bridge-nf-call-ip6tables=0" >sysctl -w "net.bridge.bridge-nf-call-iptables=0" > >This disables the iptables filtering on the bridge. > >This seems like a reasonable default since bridges don''t normally do >IP-layer filtering. > >What is the view of the Xen team on this? Are there reasons why this >could not be included in the xen sources as well? > >- Mike > > >:INPUT ACCEPT [0:0] >:FORWARD ACCEPT [0:0] >:OUTPUT ACCEPT [8335:620449] >:RH-Firewall-1-INPUT - [0:0] >-A INPUT -j RH-Firewall-1-INPUT >-A FORWARD -j RH-Firewall-1-INPUT >-A RH-Firewall-1-INPUT -i lo -j ACCEPT >-A RH-Firewall-1-INPUT -p icmp -m icmp --icmp-type any -j ACCEPT >-A RH-Firewall-1-INPUT -p ipv6-crypt -j ACCEPT >-A RH-Firewall-1-INPUT -p ipv6-auth -j ACCEPT >-A RH-Firewall-1-INPUT -d 224.0.0.251 -p udp -m udp --dport 5353 -j ACCEPT >-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT >-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT >-A RH-Firewall-1-INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT >-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT >-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited >COMMIT > > > > >At 7/8/2006 10:47 AM Saturday, Christian Limpach wrote: >>On 7/7/06, Mike Freemon <mfreemon@ncsa.uiuc.edu> wrote: >>>Hi All, >>> >>>First, I wasn''t sure whether to report this via bugzilla or the xen-devel >>>list. Since this is against the current tip of xen-unstable, I went here >>>first. I can move this to bugzilla if you want, just let me know. >>> >>>Summary is --> the "network-bridge start" script breaks all network >>>connectivity. ICMP broken, DHCP fails, etc. I am running current FC5 >>>EM64T x86_64 VT-x with the latest xen-unstable. Running "network-bridge >>>stop" restores network functionality. >>> >>>Below is the relevant data -- before and after dumps, config files, and a >>>trace of the network-bridge script itself. Any help is >>>appreciated. Thanks... >> >>What does your /etc/resolv.conf look like before/after network-bridge start? >>Does ping with an IP address work? >>You say that DHCP fails but the log looks like it succeeds and even >>ping of your gateway address seems to work. >> >> christian >> >>_______________________________________________ >>Xen-devel mailing list >>Xen-devel@lists.xensource.com >>http://lists.xensource.com/xen-devel > > >_______________________________________________ >Xen-devel mailing list >Xen-devel@lists.xensource.com >http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel