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

Eddie Kohler kohler at cs.ucla.edu
Sat Mar 6 19:11:28 EST 2010


Hi Alessandro,

Well... it's been a while since you wrote; apologies.  If you're still 
experiencing a problem like this with newer code, do let us know.  The 
backtrace is surprising to me.  Normally I would *not* expect 
StatTable::insert_pre_stat to show up after FromDevice::got_skb, because 
got-skb does not push packets downwards through the configuration.  Of course 
Linux backtraces are often pretty iffy.

I assume that StatInfo didn't do anything crazy like send a packet or anything...

Eddie


Alessandro Erta wrote:
> 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
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click


More information about the click mailing list