Bonding driver in linux-2.6.21-rc6-mm1
Subsystems (5)
Hi,
Summary :
Got this trace when one network interface come down or up in a 2
interfaces bonding. So far, system seems to survive to this problem
and works fine.
Full description
During testing of bonding of 2 interfaces, i have seen this from time to time in my log file ( the problem doesn't arrive each time but one in 3 or 4 try ).
SYSTEM : 2 NIC card bond on interface bond0 :
intel PRO/1000 (e1000 )
Broadcomm ( tg3 )
I have also try a 2.6.20 and 2.6.19 vanilla kernel ( identical problem but in onecase the system doesn't survive : that the reason the problem catch my attention )
Keywords ; network, bonding
Version : Linux version 2.6.21-rc6-mm1 (root@jupiter2) (gcc version 4.1.1 (Gentoo 4.1.1-r3)) #3 SMP Thu Apr 26 08:45:06 CEST 2007
Output of /var/log/messages
Apr 26 11:09:34 jupiter2 e1000: eth0: e1000_watchdog_task: NIC Link is Down Apr 26 11:09:34 jupiter2 bonding: bond0: link status definitely down for interface eth0, disabling it
Apr 26 11:09:34 jupiter2 bonding: bond0: making interface eth1 the new active one.
Apr 26 11:09:34 jupiter2 RTNL: assertion failed at net/ipv4/devinet.c (1055) Apr 26 11:09:34 jupiter2
Apr 26 11:09:34 jupiter2 Call Trace:
Apr 26 11:09:34 jupiter2 <IRQ> [<ffffffff8049b49e>]
inetdev_event+0x48/0x283 Apr 26 11:09:34 jupiter2 [<ffffffff804c8731>] _spin_lock_bh+0x9/0x19 Apr 26 11:09:34 jupiter2 [<ffffffff80473df1>] rt_run_flush+0x7e/0xaf Apr 26 11:09:34 jupiter2 [<ffffffff8022bdd0>] notifier_call_chain+0x29/0x56 Apr 26 11:09:34 jupiter2 [<ffffffff804560cc>] dev_set_mac_address+0x53/0x59 Apr 26 11:09:34 jupiter2 [<ffffffff88006d8d>] bonding:alb_set_slave_mac_addr+0x41/0x6c Apr 26 11:09:34 jupiter2 [<ffffffff88007215>] bonding:alb_swap_mac_addr+0x91/0x165 Apr 26 11:09:34 jupiter2 [<ffffffff88002029>] bonding:bond_change_active_slave+0x227/0x382 Apr 26 11:09:34 jupiter2 [<ffffffff880024c9>] bonding:bond_select_active_slave+0xb7/0xe5 Apr 26 11:09:34 jupiter2 [<ffffffff88004182>] bonding:bond_mii_monitor+0x3cd/0x41e Apr 26 11:09:34 jupiter2 [<ffffffff88003db5>] bonding:bond_mii_monitor+0x0/0x41e Apr 26 11:09:34 jupiter2 [<ffffffff80228714>] run_timer_softirq+0x130/0x19f Apr 26 11:09:34 jupiter2[<ffffffff8022618a>] __do_softirq+0x55/0xc4 Apr 26 11:09:34 jupiter2 [<ffffffff8020a5ac>] call_softirq+0x1c/0x28 Apr 26 11:09:34 jupiter2 [<ffffffff8020bead>] do_softirq+0x2c/0x7d Apr 26 11:09:34 jupiter2 [<ffffffff80213b2a>] smp_apic_timer_interrupt+0x49/0x5f Apr 26 11:09:34 jupiter2 [<ffffffff802088a3>] mwait_idle+0x0/0x45 Apr 26 11:09:34 jupiter2 [<ffffffff8020a056>] apic_timer_interrupt+0x66/0x70 Apr 26 11:09:34 jupiter2 <EOI> [<ffffffff802088e5>] mwait_idle+0x42/0x45 Apr 26 11:09:34 jupiter2 [<ffffffff8020883f>] cpu_idle+0x51/0x70 Apr 26 11:09:34 jupiter2 [<ffffffff806369bd>] start_kernel+0x242/0x24e Apr 26 11:09:34 jupiter2 [<ffffffff80636146>] _sinittext+0x146/0x14a
other informations (ver_linux, lspci, ... ) available at
http://mail1.vetienne.net/linux
I'm a bit worried by the message so any help will be greatly appreciated
Vincent
Quoted 6 lines · Vincent ETIENNE
Hi,
Summary :
Got this trace when one network interface come down or up in a 2
interfaces bonding. So far, system seems to survive to this problem
and works fine.
I'm investigating a similar/possibly identical bug. Do you experience packet loss or throughput stalls, beyond just the loss of the interface that went down, when this happens?
-- Chris
Quoted 66 lines
Full description
During testing of bonding of 2 interfaces, i have seen this from time to time in my log file ( the problem doesn't arrive each time but one in 3 or 4 try ).
SYSTEM : 2 NIC card bond on interface bond0 :
intel PRO/1000 (e1000 )
Broadcomm ( tg3 )
I have also try a 2.6.20 and 2.6.19 vanilla kernel ( identical problem but in onecase the system doesn't survive : that the reason the problem catch my attention )Keywords ; network, bonding
Version : Linux version 2.6.21-rc6-mm1 (root@jupiter2) (gcc version 4.1.1 (Gentoo 4.1.1-r3)) #3 SMP Thu Apr 26 08:45:06 CEST 2007
Output of
/var/log/messagesApr 26 11:09:34 jupiter2 e1000: eth0:
e1000_watchdog_task: NIC Link is Down Apr 26 11:09:34 jupiter2 bonding: bond0: link status definitely down for interface eth0, disabling it
Apr 26 11:09:34 jupiter2 bonding: bond0: making interface eth1 the new active one.
Apr 26 11:09:34 jupiter2 RTNL: assertion failed atnet/ipv4/devinet.c(1055) Apr 26 11:09:34 jupiter2
Apr 26 11:09:34 jupiter2 Call Trace:
Apr 26 11:09:34 jupiter2 <IRQ> [<ffffffff8049b49e>]inetdev_event+0x48/0x283 Apr 26 11:09:34 jupiter2 [<ffffffff804c8731>] _spin_lock_bh+0x9/0x19 Apr 26 11:09:34 jupiter2 [<ffffffff80473df1>] rt_run_flush+0x7e/0xaf Apr 26 11:09:34 jupiter2 [<ffffffff8022bdd0>] notifier_call_chain+0x29/0x56 Apr 26 11:09:34 jupiter2 [<ffffffff804560cc>] dev_set_mac_address+0x53/0x59 Apr 26 11:09:34 jupiter2 [<ffffffff88006d8d>] bonding:alb_set_slave_mac_addr+0x41/0x6c Apr 26 11:09:34 jupiter2 [<ffffffff88007215>] bonding:alb_swap_mac_addr+0x91/0x165 Apr 26 11:09:34 jupiter2 [<ffffffff88002029>] bonding:bond_change_active_slave+0x227/0x382 Apr 26 11:09:34 jupiter2 [<ffffffff880024c9>] bonding:bond_select_active_slave+0xb7/0xe5 Apr 26 11:09:34 jupiter2 [<ffffffff88004182>] bonding:bond_mii_monitor+0x3cd/0x41e Apr 26 11:09:34 jupiter2 [<ffffffff88003db5>] bonding:bond_mii_monitor+0x0/0x41e Apr 26 11:09:34 jupiter2 [<ffffffff80228714>] run_timer_softirq+0x130/0x19f Apr 26 11:09:34 jupiter2[<ffffffff8022618a>] __do_softirq+0x55/0xc4 Apr 26 11:09:34 jupiter2 [<ffffffff8020a5ac>] call_softirq+0x1c/0x28 Apr 26 11:09:34 jupiter2 [<ffffffff8020bead>] do_softirq+0x2c/0x7d Apr 26 11:09:34 jupiter2 [<ffffffff80213b2a>] smp_apic_timer_interrupt+0x49/0x5f Apr 26 11:09:34 jupiter2 [<ffffffff802088a3>] mwait_idle+0x0/0x45 Apr 26 11:09:34 jupiter2 [<ffffffff8020a056>] apic_timer_interrupt+0x66/0x70 Apr 26 11:09:34 jupiter2 <EOI> [<ffffffff802088e5>] mwait_idle+0x42/0x45 Apr 26 11:09:34 jupiter2 [<ffffffff8020883f>] cpu_idle+0x51/0x70 Apr 26 11:09:34 jupiter2 [<ffffffff806369bd>] start_kernel+0x242/0x24e Apr 26 11:09:34 jupiter2 [<ffffffff80636146>] _sinittext+0x146/0x14aother informations (
ver_linux, lspci, ... ) available at http://mail1.vetienne.net/linuxI'm a bit worried by the message so any help will be greatly appreciated
Vincent
Quoted 11 lines · Chris Snook
Quoted 6 lines · Vincent ETIENNE
Hi,
Summary :
Got this trace when one network interface come down or up in a 2
interfaces bonding. So far, system seems to survive to this problem
and works fine.I'm investigating a similar/possibly identical bug. Do you experience packet loss or throughput stalls, beyond just the loss of the interface that went down, when this happens?
This problem looks to be one of the known locking issues with
bonding.
Andy Gospodarek <[email protected]> and I have been working
offline on the locking issues in bonding over the last several weeks. At the moment, we have a generally stable (but ugly with debug fluff and other yuckies) patch that seems to resolve at least the majority of the various issues. I'm thinking to clean it up for general posting early next week, and address additional problems from there (since it's hopefully at least a big step forward).
-J
---
-Jay Vosburgh, IBM Linux Technology Center, [email protected]
Le Thursday 26 April 2007 22:44:59 Jay Vosburgh, vous avez écrit :
Quoted 26 lines
Quoted 11 lines · Chris Snook
Quoted 6 lines · Vincent ETIENNE
Hi,
Summary :
Got this trace when one network interface come down or up in a 2
interfaces bonding. So far, system seems to survive to this problem
and works fine.I'm investigating a similar/possibly identical bug. Do you experience packet loss or throughput stalls, beyond just the loss of the interface that went down, when this happens?
This problem looks to be one of the known locking issues with
bonding.Andy Gospodarek <[email protected]> and I have been working
offline on the locking issues in bonding over the last several weeks. At the moment, we have a generally stable (but ugly with debug fluff and other yuckies) patch that seems to resolve at least the majority of the various issues. I'm thinking to clean it up for general posting early next week, and address additional problems from there (since it's hopefully at least a big step forward).-J
Quoted 7 lines
---
-Jay Vosburgh, IBM Linux Technology Center, [email protected]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Will be more than happy to test it and report the result with the new patch.
Thanks for your work,
Le Thursday 26 April 2007 22:44:59 Jay Vosburgh, vous avez écrit :
Quoted 21 lines
Quoted 8 lines · Chris Snook
Quoted 6 lines · Vincent ETIENNE
Hi,
Summary :
Got this trace when one network interface come down or up in a 2
interfaces bonding. So far, system seems to survive to this problem
and works fine.This problem looks to be one of the known locking issues with
bonding.Andy Gospodarek <[email protected]> and I have been working
offline on the locking issues in bonding over the last several weeks. At the moment, we have a generally stable (but ugly with debug fluff and other yuckies) patch that seems to resolve at least the majority of the various issues. I'm thinking to clean it up for general posting early next week, and address additional problems from there (since it's hopefully at least a big step forward).
Quoted 1 line
-J
Any news and/or patch concerning this problem ?. Not intended to stress you but time goes on... Do you think a solution could be found in a relatively short timeframe (and i will delay a bit final installation) or is it better to go without bonding and do an upgrade later ?.
Vincent
Quoted 3 lines
---
-Jay Vosburgh, IBM Linux Technology Center, [email protected]
Quoted 4 lines · Vincent ETIENNE
Any news and/or patch concerning this problem ?. Not intended to stress you but time goes on... Do you think a solution could be found in a relatively short timeframe (and i will delay a bit final installation) or is it better to go without bonding and do an upgrade later ?.
Our working patch is appended; I'm getting a bunch of warnings
from the lockdep stuff that I'm sorting through. I'm not sure if they're real concerns or just misconfiguration of lockdep itself. This doesn't fix everything (e.g., enslaving a VLAN device), but covers most of the usual trouble cases.
-J
---
-Jay Vosburgh, IBM Linux Technology Center, [email protected]
drivers/net/bonding/bond_3ad.c +4 -2
@@ -2097,8 +2097,10 @@ void bond_3ad_unbind_slave(struct slave *slave)* times out, and it selects an aggregator for the ports that are yet not * related to any aggregator, and selects the active aggregator for a bond. */ -void bond_3ad_state_machine_handler (struct bonding *bond) +void bond_3ad_state_machine_handler (struct work_struct *work) { + struct bonding *bond = container_of(work, struct bonding, + ad_work.work);struct port *port;struct aggregator *aggregator;
@@ -2149,7 +2151,7 @@ void bond_3ad_state_machine_handler(struct bonding *bond) } re_arm: -mod_timer (&(BOND_AD_INFO (bond).ad_timer), jiffies + ad_delta_in_ticks); +queue_delayed_work (bond->wq, &bond->ad_work, ad_delta_in_ticks); out:read_unlock (&bond->lock); }
drivers/net/bonding/bond_3ad.h +1 -1
@@ -276,7 +276,7 @@ struct ad_slave_info {void bond_3ad_initialize (struct bonding *bond,u16 tick_resolution,int lacp_fast);int bond_3ad_bind_slave (struct slave *slave);void bond_3ad_unbind_slave (struct slave *slave); -void bond_3ad_state_machine_handler (struct bonding *bond); +void bond_3ad_state_machine_handler (struct work_struct *);void bond_3ad_adapter_speed_changed (struct slave *slave);void bond_3ad_adapter_duplex_changed (struct slave *slave);void bond_3ad_handle_link_change (struct slave *slave,char link);
drivers/net/bonding/bond_alb.c +57 -17
169 lines not on this page · raw message
drivers/net/bonding/bond_alb.h +1 -1
@@ -125,7 +125,7 @@ void bond_alb_deinit_slave(struct bonding *bond, struct slave *slave);void bond_alb_handle_link_change (struct bonding *bond,struct slave *slave,char link);void bond_alb_handle_active_change (struct bonding *bond,struct slave *new_slave);int bond_alb_xmit (struct sk_buff *skb,struct net_device *bond_dev); -void bond_alb_monitor (struct bonding *bond); +void bond_alb_monitor (struct work_struct *);int bond_alb_set_mac_address (struct net_device *bond_dev,void *addr);void bond_alb_clear_vlan (struct bonding *bond,unsigned short vlan_id);#endif /* __BOND_ALB_H__ */
drivers/net/bonding/bond_main.c +196 -111
610 lines not on this page · raw message
drivers/net/bonding/bond_sysfs.c +31 -43
152 lines not on this page · raw message
drivers/net/bonding/bonding.h +11 -5
@@ -182,9 +182,8 @@ struct bonding {s32 slave_cnt;/* never change this value outside the attach/detach wrappers */ rwlock_t lock;rwlock_t curr_slave_lock; -struct timer_list mii_timer; -struct timer_list arp_timer;s8 kill_timers; +u16 rr_tx_counter;struct net_device_stats stats;#ifdef CONFIG_PROC_FS struct proc_dir_entry *proc_entry;
@@ -201,6 +200,11 @@ struct bonding {struct list_head vlan_list;struct vlan_group *vlgrp;struct packet_type arp_mon_pt; +struct workqueue_struct *wq; +struct delayed_work mii_work; +struct delayed_work arp_work; +struct delayed_work alb_work; +struct delayed_work ad_work; };/**
@@ -302,9 +306,9 @@ void bond_destroy_slave_symlinks(struct net_device *master, struct net_device *sint bond_enslave (struct net_device *bond_dev,struct net_device *slave_dev);int bond_release (struct net_device *bond_dev,struct net_device *slave_dev);int bond_sethwaddr (struct net_device *bond_dev,struct net_device *slave_dev); -void bond_mii_monitor (struct net_device *bond_dev); -void bond_loadbalance_arp_mon (struct net_device *bond_dev); -void bond_activebackup_arp_mon (struct net_device *bond_dev); +void bond_mii_monitor (struct work_struct *); +void bond_loadbalance_arp_mon (struct work_struct *); +void bond_activebackup_arp_mon (struct work_struct *);void bond_set_mode_ops (struct bonding *bond,int mode);int bond_parse_parm (char *mode_arg,struct bond_parm_tbl *tbl);const char *bond_mode_name (int mode);
@@ -312,6 +316,8 @@ void bond_select_active_slave(struct bonding *bond);void bond_change_active_slave (struct bonding *bond,struct slave *new_active);void bond_register_arp (struct bonding *);void bond_unregister_arp (struct bonding *); +void bond_wq_destroy (struct net_device *bond_dev); +#endif /* _LINUX_BONDING_H */
Quoted 11 lines · On Thu, 26 Apr 2007 20:58:32 +0200 Vincent ETIENNE <[email protected]> wrote:
Apr 26 11:09:34 jupiter2 RTNL: assertion failed at net/ipv4/devinet.c (1055) Apr 26 11:09:34 jupiter2 Apr 26 11:09:34 jupiter2 Call Trace: Apr 26 11:09:34 jupiter2 <IRQ> [<ffffffff8049b49e>] inetdev_event+0x48/0x283 Apr 26 11:09:34 jupiter2 [<ffffffff804c8731>] _spin_lock_bh+0x9/0x19 Apr 26 11:09:34 jupiter2 [<ffffffff80473df1>] rt_run_flush+0x7e/0xaf Apr 26 11:09:34 jupiter2 [<ffffffff8022bdd0>] notifier_call_chain+0x29/0x56 Apr 26 11:09:34 jupiter2 [<ffffffff804560cc>] dev_set_mac_address+0x53/0x59 Apr 26 11:09:34 jupiter2 [<ffffffff88006d8d>]bo
This was due to locking bustage in the net tree. It should be fixed in 2.6.21-rc7-mm2.
Quoted 6 lines · Andrew Morton
On Thu, 26 Apr 2007 20:58:32 +0200 Vincent ETIENNE <[email protected]> wrote:
This was due to locking bustage in the net tree. It should be fixed in 2.6.21-rc7-mm2.
I have tried this version. Same problem ( see http://mail1.vetienne.net/linux/dmesg-2.6.21-rc7-mm2.log ) But also a new problem with USB keyboard/mouse
BUG: at drivers/hid/usbhid/hid-quirks.c:480 usbhid_exists_dquirk() Call Trace: [<ffffffff8044bbcb>] usbhid_lookup_quirk+0x63/0xea [<ffffffff8044ab12>] hid_probe+0x4d/0xbad [<ffffffff8021d7cd>] default_wake_function+0x0/0xe [<ffffffff8029d0b6>] sysfs_new_dirent+0x79/0xaa [<ffffffff80403411>] usb_match_one_id+0x26/0x82 [<ffffffff80403fe6>] usb_probe_interface+0x7d/0xa5 [<ffffffff80391cb9>] driver_probe_device+0xf6/0x17f [<ffffffff80391de4>] __driver_attach+0x0/0x93 [<ffffffff80391e3e>] __driver_attach+0x5a/0x93 [<ffffffff8039110c>] bus_for_each_dev+0x43/0x6e [<ffffffff80391433>] bus_add_driver+0x7b/0x19d [<ffffffff80403b06>] usb_register_driver+0x7e/0xe1 [<ffffffff8064d2d3>] hid_init+0x28/0x4e [<ffffffff8063460b>] kernel_init+0x162/0x2d2 [<ffffffff8020a338>] child_rip+0xa/0x12 [<ffffffff80343d5c>] acpi_ds_init_one_object+0x0/0x7c [<ffffffff806344a9>] kernel_init+0x0/0x2d2 [<ffffffff8020a32e>] child_rip+0x0/0x12
input: ServerEngines SE USB Device as /devices/pci0000:00/0000:00:1d.2/usb4/4-2/4-2:1.0/input/input2
input: USB HID v1.11 Keyboard [ServerEngines SE USB Device] on usb-0000:00:1d.2-2
BUG: at drivers/hid/usbhid/hid-quirks.c:480 usbhid_exists_dquirk() Call Trace: [<ffffffff8044bbcb>] usbhid_lookup_quirk+0x63/0xea [<ffffffff8044ab12>] hid_probe+0x4d/0xbad [<ffffffff8029d0b6>] sysfs_new_dirent+0x79/0xaa [<ffffffff80403411>] usb_match_one_id+0x26/0x82 [<ffffffff80403fe6>] usb_probe_interface+0x7d/0xa5 [<ffffffff80391cb9>] driver_probe_device+0xf6/0x17f [<ffffffff80391de4>] __driver_attach+0x0/0x93 [<ffffffff80391e3e>] __driver_attach+0x5a/0x93 [<ffffffff8039110c>] bus_for_each_dev+0x43/0x6e [<ffffffff80391433>] bus_add_driver+0x7b/0x19d [<ffffffff80403b06>] usb_register_driver+0x7e/0xe1 [<ffffffff8064d2d3>] hid_init+0x28/0x4e [<ffffffff8063460b>] kernel_init+0x162/0x2d2 [<ffffffff8020a338>] child_rip+0xa/0x12 [<ffffffff80343d5c>] acpi_ds_init_one_object+0x0/0x7c [<ffffffff806344a9>] kernel_init+0x0/0x2d2 [<ffffffff8020a32e>] child_rip+0x0/0x12
And also a strange problem : dhcp server and dns server was started before bond0 was completly up ( eth0 and eth1 was declared down at this time and up a few times later : was not the case with later 2.6.21-rc6-mm1 )
Vincent
Quoted 10 lines · On Fri, 27 Apr 2007 11:25:46 +0200 "VE \(HOME\)" <[email protected]> wrote:
Quoted 6 lines · Andrew Morton
On Thu, 26 Apr 2007 20:58:32 +0200 Vincent ETIENNE <[email protected]> wrote:
This was due to locking bustage in the net tree. It should be fixed in 2.6.21-rc7-mm2.
I have tried this version. Same problem ( see
http://mail1.vetienne.net/linux/dmesg-2.6.21-rc7-mm2.log )
That file has disappeared.
Quoted 2 lines
But also a new problem with USB keyboard/mouse
USB problem - let's handle that separately.
Quoted 5 lines
And also a strange problem : dhcp server and dns server was started before bond0 was completly up ( eth0 and eth1 was declared down at this time and up a few times later : was not the case with later 2.6.21-rc6-mm1 )
USB HID bug (was [PROBLEM] Bonding driver in linux-2.6.21-rc6-mm1)
In reply to VE (HOME)Quoted 50 lines · VE (HOME)
Quoted 6 lines · Andrew Morton
On Thu, 26 Apr 2007 20:58:32 +0200 Vincent ETIENNE <[email protected]> wrote:
This was due to locking bustage in the net tree. It should be fixed in 2.6.21-rc7-mm2.
I have tried this version. Same problem ( see
http://mail1.vetienne.net/linux/dmesg-2.6.21-rc7-mm2.log ) But also a new problem with USB keyboard/mouseBUG: at drivers/hid/usbhid/hid-quirks.c:480 usbhid_exists_dquirk() Call Trace: [<ffffffff8044bbcb>] usbhid_lookup_quirk+0x63/0xea [<ffffffff8044ab12>] hid_probe+0x4d/0xbad [<ffffffff8021d7cd>] default_wake_function+0x0/0xe [<ffffffff8029d0b6>] sysfs_new_dirent+0x79/0xaa [<ffffffff80403411>] usb_match_one_id+0x26/0x82 [<ffffffff80403fe6>] usb_probe_interface+0x7d/0xa5 [<ffffffff80391cb9>] driver_probe_device+0xf6/0x17f [<ffffffff80391de4>] __driver_attach+0x0/0x93 [<ffffffff80391e3e>] __driver_attach+0x5a/0x93 [<ffffffff8039110c>] bus_for_each_dev+0x43/0x6e [<ffffffff80391433>] bus_add_driver+0x7b/0x19d [<ffffffff80403b06>] usb_register_driver+0x7e/0xe1 [<ffffffff8064d2d3>] hid_init+0x28/0x4e [<ffffffff8063460b>] kernel_init+0x162/0x2d2 [<ffffffff8020a338>] child_rip+0xa/0x12 [<ffffffff80343d5c>] acpi_ds_init_one_object+0x0/0x7c [<ffffffff806344a9>] kernel_init+0x0/0x2d2 [<ffffffff8020a32e>] child_rip+0x0/0x12input: ServerEngines SE USB Device as /devices/pci0000:00/0000:00:1d.2/usb4/4-2/4-2:1.0/input/input2
input: USB HID v1.11 Keyboard [ServerEngines SE USB Device] on usb-0000:00:1d.2-2BUG: at drivers/hid/usbhid/hid-quirks.c:480 usbhid_exists_dquirk() Call Trace: [<ffffffff8044bbcb>] usbhid_lookup_quirk+0x63/0xea [<ffffffff8044ab12>] hid_probe+0x4d/0xbad [<ffffffff8029d0b6>] sysfs_new_dirent+0x79/0xaa [<ffffffff80403411>] usb_match_one_id+0x26/0x82 [<ffffffff80403fe6>] usb_probe_interface+0x7d/0xa5 [<ffffffff80391cb9>] driver_probe_device+0xf6/0x17f [<ffffffff80391de4>] __driver_attach+0x0/0x93 [<ffffffff80391e3e>] __driver_attach+0x5a/0x93 [<ffffffff8039110c>] bus_for_each_dev+0x43/0x6e
Quoted 8 lines
[<ffffffff80391433>] bus_add_driver+0x7b/0x19d [<ffffffff80403b06>] usb_register_driver+0x7e/0xe1 [<ffffffff8064d2d3>] hid_init+0x28/0x4e [<ffffffff8063460b>] kernel_init+0x162/0x2d2 [<ffffffff8020a338>] child_rip+0xa/0x12 [<ffffffff80343d5c>] acpi_ds_init_one_object+0x0/0x7c [<ffffffff806344a9>] kernel_init+0x0/0x2d2 [<ffffffff8020a32e>] child_rip+0x0/0x12
Jiri, any thoughts about this? This looks like it comes from your tree as 2.6.21 doesn't have the drivers/hid/usbhid/ directory...
thanks,
greg k-h
Re: USB HID bug (was [PROBLEM] Bonding driver in linux-2.6.21-rc6-mm1)
Quoted 1 line · Greg KH
Quoted 1 line
BUG: at drivers/hid/usbhid/hid-quirks.c:480 usbhid_exists_dquirk()
[ .. stacktraces stripped .. ]
Quoted 2 lines
Jiri, any thoughts about this? This looks like it comes from your tree as 2.6.21 doesn't have the
drivers/hid/usbhid/directory...
Paul (author of the corresponding patch) added to CC.
This BUG (it's in fact a warning) is this one:
WARN_ON(idVendor == 0);
I now don't immediately see how this could happen - the vendor ID seems to be propagated properly from hid_probe() (nothing has been changed in this codepath), so this would mean that hid_probe() has been passed usb_interface for which le16_to_cpu(interface_to_usbdev(intf).dev->descriptor.idVendor) is equal to zero ... and this definitely shouldn't happen for any sane device (could the original poster please verify with lsusb, just to be 100% sure?).
It would also help if the original poster, who is able to reproduce this WARN_ON, would verify whether hid_probe() is really being passed such strange usb_interface from upper USB layer ... please see the patch below, and send me the output if possible.
Paul, do you have any idea? In fact, what was your reason for putting this WARN_ON() there? Did you ever meet any condition when idVendor == 0 appears there?
Thanks.
drivers/hid/usbhid/hid-core.c +2 -0
@@ -984,6 +984,8 @@ static int hid_probe(struct usb_interfacdbg ("HID probe called for ifnum %d" , intf->altsetting->desc.bInterfaceNumber); +printk (KERN_DEBUG "DEBUG - hid_probe: idVendor: %x\n" , +le16_to_cpu (interface_to_usbdev (intf)->descriptor.idVendor));if (!(hid =usb_hid_configure (intf)))return -ENODEV ;
Re: USB HID bug (was [PROBLEM] Bonding driver in linux-2.6.21-rc6-mm1)
Quoted 10 lines · Jiri Kosina
This BUG (it's in fact a warning) is this one:
WARN_ON(idVendor == 0);I now don't immediately see how this could happen - the vendor ID seems to be propagated properly from
hid_probe()(nothing has been changed in this codepath), so this would mean thathid_probe()has been passedusb_interfacefor which le16_to_cpu(interface_to_usbdev(intf).dev->descriptor.idVendor) is equal to zero ... and this definitely shouldn't happen for any sane device (could the original poster please verify with lsusb, just to be 100% sure?).
BTW do I guess correctly that your keyboard is useful without problems after that, you only see this BUG and stacktraces in your logs, right?
Thanks,
Signature · 2 lines
Jiri Kosina SUSE Labs
Re: USB HID bug (was [PROBLEM] Bonding driver in linux-2.6.21-rc6-mm1)
In reply to Jiri KosinaHi Jiri,
Quoted 2 lines · Jiri Kosina
Paul, do you have any idea? In fact, what was your reason for putting this
WARN_ON()there?
The static quirk list uses idVendor == 0 to mark the end of hid_blacklist[], so we don't expect any device to have idVendor == 0. If a device is correctly presenting with idVendor == 0, we need a different way to terminate that blacklist. Either that or there's an upper-layer bug, as you write.
Regarding its placement: that WARN_ON() belongs in the static quirk lookup code, rather than where it is now. Its current location must be a relic of an earlier patchset.
Quoted 1 line
Did you ever meet any condition when idVendor == 0 appears there?
No. There shouldn't be any functional problem with removing that WARN_ON(), and also removing the initial if() in usbhid_lookup_dquirk().
- Paul
Re: USB HID bug (was [PROBLEM] Bonding driver in linux-2.6.21-rc6-mm1)
In reply to Jiri KosinaLe Saturday 28 April 2007 00:42:45 Jiri Kosina, vous avez écrit :
Quoted 14 lines · Greg KH
Quoted 1 line
Quoted 1 line
BUG: at drivers/hid/usbhid/hid-quirks.c:480 usbhid_exists_dquirk()[ .. stacktraces stripped .. ]
Quoted 2 lines
Jiri, any thoughts about this? This looks like it comes from your tree as 2.6.21 doesn't have the
drivers/hid/usbhid/directory...Paul (author of the corresponding patch) added to CC.
This BUG (it's in fact a warning) is this one:
WARN_ON(idVendor == 0);
Quoted 8 lines
I now don't immediately see how this could happen - the vendor ID seems to be propagated properly from
hid_probe()(nothing has been changed in this codepath), so this would mean thathid_probe()has been passedusb_interfacefor which le16_to_cpu(interface_to_usbdev(intf).dev->descriptor.idVendor) is equal to zero ... and this definitely shouldn't happen for any sane device (could the original poster please verify with lsusb, just to be 100% sure?).
You could download the result of lsusb -vvv from
http://mail1.vetienne.net/linux/lsusb.log
Quoted 17 lines
It would also help if the original poster, who is able to reproduce this
WARN_ON, would verify whetherhid_probe()is really being passed such strangeusb_interfacefrom upper USB layer ... please see the patch below, and send me the output if possible.Paul, do you have any idea? In fact, what was your reason for putting this
WARN_ON()there? Did you ever meet any condition when idVendor == 0 appears there?Thanks.
drivers/hid/usbhid/hid-core.c +0
-0
drivers/hid/usbhid/hid-core.c static int hid_probe(struct usb_interfac · line 990
Quoted 7 lines
drivers/hid/usbhid/hid-core.c +2
-0@@ -984,6 +984,8 @@ static int hid_probe(struct usb_interfacdbg ("HID probe called for ifnum %d" , intf->altsetting->desc.bInterfaceNumber); +printk (KERN_DEBUG "DEBUG - hid_probe: idVendor: %x\n" , +le16_to_cpu (interface_to_usbdev (intf)->descriptor.idVendor));if (!(hid =usb_hid_configure (intf)))return -ENODEV ;
With your patch it seems like idVendor passed is 0. You could see it there ;
http://mail1.vetienne.net/linux/dmesg.2.6.21-rc7-mm2+patch-usbhid
I could confirm that the keyboard is working ( yesterday i was just behind the box due to test on the network ). But i don't remember if the keyboard is USB or PS2 (i only have ssh access to the box for the next 3/4 days)
Vincent
Re: USB HID bug (was [PROBLEM] Bonding driver in linux-2.6.21-rc6-mm1)
Quoted 7 lines · Vincent ETIENNE
With your patch it seems like idVendor passed is 0. You could see it there ;
http://mail1.vetienne.net/linux/dmesg.2.6.21-rc7-mm2+patch-usbhid
I could confirm that the keyboard is working ( yesterday i was just behind the box due to test on the network ). But i don't remember if the keyboard is USB or PS2 (i only have ssh access to the box for the next 3/4 days)
It seems that OpenBSD users are reporting similar problems:
http://article.gmane.org/gmane.os.openbsd.misc/122526
http://www.mail-archive.com/[email protected]/msg38200.html
- Paul
Re: USB HID bug (was [PROBLEM] Bonding driver in linux-2.6.21-rc6-mm1)
In reply to Vincent ETIENNEQuoted 10 lines · Vincent ETIENNE
Quoted 8 lines
I now don't immediately see how this could happen - the vendor ID seems to be propagated properly from
hid_probe()(nothing has been changed in this codepath), so this would mean thathid_probe()has been passedusb_interfacefor which le16_to_cpu(interface_to_usbdev(intf).dev->descriptor.idVendor) is equal to zero ... and this definitely shouldn't happen for any sane device (could the original poster please verify with lsusb, just to be 100% sure?).You could download the result of lsusb -vvv from
http://mail1.vetienne.net/linux/lsusb.log
Hi Vincent,
thanks for the report. It's pretty awesome though - all the USB devices seem to have vendor and product id set to 0x0000. Greg, have you ever met this?
linux-usb-devel added to CC (full thread here:
http://lkml.org/lkml/2007/4/27/496)
So this definitely isn't a HID-specific problem, something is confusing the USB VID/PIDs.
Signature · 2 lines
Jiri Kosina SUSE Labs
Re: [linux-usb-devel] USB HID bug (was [PROBLEM] Bonding driver in linux-2.6.21-rc6-mm1)
Quoted 19 lines · Jiri Kosina
Quoted 10 lines · Vincent ETIENNE
Quoted 8 lines
I now don't immediately see how this could happen - the vendor ID seems to be propagated properly from
hid_probe()(nothing has been changed in this codepath), so this would mean thathid_probe()has been passedusb_interfacefor which le16_to_cpu(interface_to_usbdev(intf).dev->descriptor.idVendor) is equal to zero ... and this definitely shouldn't happen for any sane device (could the original poster please verify with lsusb, just to be 100% sure?).You could download the result of lsusb -vvv from
http://mail1.vetienne.net/linux/lsusb.logHi Vincent,
thanks for the report. It's pretty awesome though - all the USB devices seem to have vendor and product id set to
0x0000. Greg, have you ever met this?
Quoted 5 lines
linux-usb-devel added to CC (full thread here:
http://lkml.org/lkml/2007/4/27/496)So this definitely isn't a HID-specific problem, something is confusing the USB VID/PIDs.
No, it isn't a problem in the USB core. The device itself is messed up; it really does report idVendor and idProduct both equal to 0.
Jiri, don't worry about all those other devices in the listing that also have idVendor and idProduct set to 0. They aren't real devices at all; they are virtual root hubs. You'll see what I mean if you look at their iManufacturer, iProduct, and iSerial strings.
Alan Stern
Re: [linux-usb-devel] USB HID bug (was [PROBLEM] Bonding driver in linux-2.6.21-rc6-mm1)
Le Saturday 28 April 2007 21:50:30 Alan Stern, vous avez écrit :
Quoted 9 lines
No, it isn't a problem in the USB core. The device itself is messed up; it really does report idVendor and idProduct both equal to 0.
Jiri, don't worry about all those other devices in the listing that also have idVendor and idProduct set to 0. They aren't real devices at all; they are virtual root hubs. You'll see what I mean if you look at their iManufacturer, iProduct, and iSerial strings.
Alan Stern
So is it just a scary trace but without consequence that i could ignored ? May i ask you what is the device which is messed up ? ( Maybe should i change it ? )
Re: [linux-usb-devel] USB HID bug (was [PROBLEM] Bonding driver in linux-2.6.21-rc6-mm1)
Quoted 5 lines · Vincent ETIENNE
Quoted 2 lines
No, it isn't a problem in the USB core. The device itself is messed up; it really does report idVendor and idProduct both equal to 0.
So is it just a scary trace but without consequence that i could ignored ? May i ask you what is the device which is messed up ? ( Maybe should i change it ? )
Hi Vincent,
yes, the device is messed up, but it shouldn't have any consequences for you - the HID driver is able to correctly handle that, so as soon as we don't need to add any extra quirks for such device, everything should be fine. I have removed the WARN_ON from the code in my tree. I think we still don't want users to add quirks for such broken devices (as it would collide with hid_blakclist[] terminator), so I have left the initial condition in usbhid_modify_dquirk() untouched.
From: Jiri Kosina <[email protected]>
USB HID: don't warn on idVendor == 0
It turns out that there are broken devices out there that incorrectly report VID/PID as 0x000, see http://lkml.org/lkml/2007/4/27/496
Therefore we should not confuse users by dumping warnings and stacktraces in such situation. It is not possible to add quirks for such horribly broken devices, but currently that's not needed.
drivers/hid/usbhid/hid-quirks.c +0 -2
@@ -477,8 +477,6 @@ static struct hid_blacklist *usbhid_exisstruct quirks_list_struct *q;struct hid_blacklist *bl_entry =NULL ; -WARN_ON (idVendor ==0 ); -list_for_each_entry (q, &dquirks_list, node) {if (q->hid_bl_item.idVendor == idVendor && q->hid_bl_item.idProduct == idProduct) {
Re: [linux-usb-devel] USB HID bug (was [PROBLEM] Bonding driver in linux-2.6.21-rc6-mm1)
Le Sunday 29 April 2007 13:18:31 Jiri Kosina, vous avez écrit :
Quoted 2 lines
Hi Vincent,
Hi Jiri,
Quoted 9 lines
yes, the device is messed up, but it shouldn't have any consequences for you - the HID driver is able to correctly handle that, so as soon as we don't need to add any extra quirks for such device, everything should be fine. I have removed the
WARN_ONfrom the code in my tree. I think we still don't want users to add quirks for such broken devices (as it would collide with hid_blakclist[] terminator), so I have left the initial condition inusbhid_modify_dquirk()untouched.
Thanks a lot for the explanation and the patch, now i better understand the "problem". Sorry to have bother you with just noise. The patch will certainly be of some help with dumb user (who have dump hardware ) like me.
I have very appreciate the attention you ( and all other from this feed ) have take with me. So a big thanks for your work and the next time (if any), i will try to better analyse the problem to avoid unnecessary work.
Vincent
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 10 lines · On Fri, 27 Apr 2007 22:05:28 +0200 Vincent ETIENNE <[email protected]> wrote:
Le Friday 27 April 2007 21:20:39, vous avez
__crit__:Quoted 9 lines · On Fri, 27 Apr 2007 11:25:46 +0200 "VE \(HOME\)" <[email protected]> wrote:
Quoted 8 lines
Quoted 6 lines · Andrew Morton
On Thu, 26 Apr 2007 20:58:32 +0200 Vincent ETIENNE <[email protected]> wrote:
This was due to locking bustage in the net tree. It should be fixed in 2.6.21-rc7-mm2.
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
I have tried this version. Same problem ( see
http://mail1.vetienne.net/linux/dmesg-2.6.21-rc7-mm2.log )That file has disappeared.
Sorry wrong right on the file. Should be ok now
Please don't go off-list. Now the people who work on this code don't know that the log is available. I've reestablished a few cc's.
The troublesome part is here:
e1000: eth0: e1000_watchdog_task: NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX
e1000: eth0: e1000_watchdog_task: 10/100 speed: disabling TSO
bonding: bond0: link status definitely up for interface eth0.
bonding: bond0: making interface eth0 the new active one.
RTNL: assertion failed at net/ipv4/devinet.c (1055)
Call Trace: <IRQ> [<ffffffff8049b9a1>] inetdev_event+0x48/0x283 [<ffffffff804c85d1>] _spin_lock_bh+0x9/0x19 [<ffffffff804753d7>] rt_run_flush+0x7e/0xaf [<ffffffff8022d388>] notifier_call_chain+0x29/0x56 [<ffffffff80457994>] dev_set_mac_address+0x53/0x59 [<ffffffff88006d6d>] :bonding:alb_set_slave_mac_addr+0x41/0x6c [<ffffffff880071e9>] :bonding:alb_swap_mac_addr+0x91/0x165 [<ffffffff88002022>] :bonding:bond_change_active_slave+0x227/0x382 [<ffffffff880024c2>] :bonding:bond_select_active_slave+0xb7/0xe5 [<ffffffff88004172>] :bonding:bond_mii_monitor+0x3cd/0x41e [<ffffffff88003da5>] :bonding:bond_mii_monitor+0x0/0x41e [<ffffffff802299a0>] run_timer_softirq+0x130/0x19f [<ffffffff80226b64>] __do_softirq+0x55/0xc4 [<ffffffff8020a6ac>] call_softirq+0x1c/0x28 [<ffffffff8020bfb9>] do_softirq+0x2c/0x7d [<ffffffff802145a7>] smp_apic_timer_interrupt+0x49/0x5e [<ffffffff80208989>] mwait_idle+0x0/0x47 [<ffffffff8020a156>] apic_timer_interrupt+0x66/0x70 <EOI> [<ffffffff802089cb>] mwait_idle+0x42/0x47 [<ffffffff80208921>] cpu_idle+0x7f/0xa2 [<ffffffff806349bd>] start_kernel+0x242/0x24e [<ffffffff80634146>] _sinittext+0x146/0x14a
because we thought we'd fixed the rtnl_lock() problems in 2.6.21-rc7-mm2. Are you sure that log is from 2.6.21-rc7-mm2?
Le Saturday 28 April 2007 00:32:37 Andrew Morton, vous avez écrit :
Quoted 5 lines
On Fri, 27 Apr 2007 22:05:28 +0200
because we thought we'd fixed the
rtnl_lock()problems in 2.6.21-rc7-mm2. Are you sure that log is from 2.6.21-rc7-mm2?
Yes. I have retested it another time ( for adding the small usb debug message ) and get the same message a new time.
Maybe a tiny difference : only eth0 was setup during boot ( bond0 and eth1 was not setup - volontary - to avoid problem that could interfere with usb ). Ony after having done my usb test, i have stopped the eth0, setup bond interface and restart bond interface and got the same problem with the same back trace.
Is there anything i can do to get you more precise information ?
Quoted 8 lines · On Sat, 28 Apr 2007 22:37:42 +0200 Vincent ETIENNE <[email protected]> wrote:
Le Saturday 28 April 2007 00:32:37 Andrew Morton, vous avez écrit :
Quoted 5 lines
On Fri, 27 Apr 2007 22:05:28 +0200
because we thought we'd fixed the
rtnl_lock()problems in 2.6.21-rc7-mm2. Are you sure that log is from 2.6.21-rc7-mm2?
Quoted 8 lines
Yes. I have retested it another time ( for adding the small usb debug message ) and get the same message a new time.
Maybe a tiny difference : only eth0 was setup during boot ( bond0 and eth1 was not setup - volontary - to avoid problem that could interfere with usb ). Ony after having done my usb test, i have stopped the eth0, setup bond interface and restart bond interface and got the same problem with the same back trace.
OK, thanks.
Quoted 1 line
Is there anything i can do to get you more precise information ?
I guess if you could provide us with your .config and a step-by-step recipe which developers should use to reproduce the problem then we should be able to fix this pretty easily when someone finds the time to do so.
Quoted 9 lines · Andrew Morton
Quoted 7 lines · On Sat, 28 Apr 2007 22:37:42 +0200 Vincent ETIENNE <[email protected]> wrote:
Quoted 2 lines
because we thought we'd fixed the
rtnl_lock()problems in 2.6.21-rc7-mm2. Are you sure that log is from 2.6.21-rc7-mm2?Yes. I have retested it another time ( for adding the small usb debug message ) and get the same message a new time.
Quoted 8 lines
Quoted 5 lines
Maybe a tiny difference : only eth0 was setup during boot ( bond0 and eth1 was not setup - volontary - to avoid problem that could interfere with usb ). Ony after having done my usb test, i have stopped the eth0, setup bond interface and restart bond interface and got the same problem with the same back trace.
OK, thanks.
The failed RTNL assertion here is unrelated to the mutex initialization bug in 2.6.1-rc7-mm1. The bonding driver is not holding the rtnl_mutex while calling dev_set_mac_address (and can not since its called from a timer). I believe this is a known problem to the bonding maintainers.
Le Saturday 28 April 2007 23:31:02 Andrew Morton, vous avez écrit :
Quoted 6 lines
Quoted 2 lines
Is there anything i can do to get you more precise information ?
I guess if you could provide us with your .config and a step-by-step recipe which developers should use to reproduce the problem then we should be able to fix this pretty easily when someone finds the time to do so.
For the config, i have uploaded it to
http://mail1.vetienne.net/linux/config-2.6.21-rc7-mm2.
For reproducing the problem, it 's simple (for me at least) :
- setup a bonding interface ( IP 192.168.1.5/255.255.255.0 so nothing
fancy ) bond (mode 6 : alb ) on two NIC card (in my case E1000 and TG3 ). Don't know if it's important or not but the two cards are connected to the same cheap 100Mb switch ( So no gigabit )
- Reboot : when the bond interface went up ( after the two physical slaves )
the bug is triggered ( for the moment always, but i have only rebooted 2 or 3 times with 2.6.21-rc7-mm2 ).
- You could also play with networks cable and put down/up one interface or
another during normal work : it would often triggered the same trace ( not always although ). You don't need to have load on the network. The interface that went down or up doesn't seem to be important as far as i can see.
- No lockup of the kernel, network still work fine after the problem
Le Saturday 28 April 2007 00:32:37 Andrew Morton, vous avez écrit :
Quoted 5 lines
On Fri, 27 Apr 2007 22:05:28 +0200
because we thought we'd fixed the
rtnl_lock()problems in 2.6.21-rc7-mm2. Are you sure that log is from 2.6.21-rc7-mm2?
Yes. I have retested it another time ( for adding the small usb debug message ) and get the same message a new time.
Maybe a tiny difference : only eth0 was setup during boot ( bond0 and eth1 was not setup - volontary - to avoid problem that could interfere with usb ). Ony after having done my usb test, i have stopped the eth0, setup bond interface and restart bond interface and got the same problem with the same back trace.
Is there anything i can do to get you more precise information ?
Resend to the list : i have stripped lklm from the recipients......