[Click] BUG: warning at kernel/softirq.c:120/_local_bh_enable() with HashTable

Alessandro Erta alessandro.erta at gmail.com
Wed Dec 3 12:39:52 EST 2008


Hi all!

I have written two elements to collect statistics from wireless cards 
like e.g. link RSSI ecc. Specifically, one element periodically reads 
the statistics and sends packets to the other one which is just a table 
to store them implemented with a hashtable. Click is running in kernel 
mode with kernel 2.6.19.2 with two wireless cards and madwifi driver. 
The system is single-threaded and the kernel preemption is disabled. 
Everything works fine but sometimes I get kernel bugs like the following:

BUG: warning at kernel/softirq.c:120/_local_bh_enable()
 [<c0110ace>] _local_bh_enable+0x45/0xa4
 [<c0110bc9>] do_softirq+0x22/0x26
 [<c0104491>] do_IRQ+0x67/0x7a
 [<c0208bc6>] net_rx_action+0x5d/0xd8
 [<c0102b1a>] common_interrupt+0x1a/0x20
 [<c8d859c3>] 
_ZN9StatTable15insert_pre_statEP13pre_link_stat+0x2633/0x42a0 [click]
 [<c8913def>] zz02dc1763+0x18f/0x1bc [ath_hal]
 [<c88cc6b8>] ath_intr+0x500/0x68a [ath_pci]
 [<c0125897>] handle_IRQ_event+0x26/0x4e
 [<c0202956>] kfree_skbmem+0x70/0x74
 [<c8aad6ec>] _ZN10FromDevice7got_skbEP7sk_buff+0xcc/0x140 [click]
............

The bug shows up during the insertion function 
StatTable::insert_pre_stat. The funny thing is that if I comment the 
hashtable data insertion in StatTable::insert_pre_stat I cannot 
reproduce it. The way I do insertion in the table is as follows:

IPAddress ip = new_ip;
if ( _table_data.find( ip ) == _table_data.end() ) { // check if IP 
already present
    _table_data[ ip ] = StatInfo(ip);
}
_table_data[ ip ].par1 = par1;
_table_data[ ip ].par2 = par2;
...

I cannot see anything wrong in the above code, but commenting it 
prevents the bug from occuring. Any Ideas?

Thanks a lot!

Regards,
Alessandro


More information about the click mailing list