DragonFly BSD
DragonFly bugs List (threaded) for 2012-11
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

[DragonFlyBSD - Bug #2458] ath: ran out of descriptors


From: Sepherosa Ziehau via Redmine <bugtracker-admin@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 28 Nov 2012 17:53:55 -0800

Issue #2458 has been updated by Sepherosa Ziehau.


On Thu, Nov 29, 2012 at 6:23 AM, Johannes Hofmann via Redmine
<bugtracker-admin@leaf.dragonflybsd.org> wrote:
>
> Issue #2458 has been updated by Johannes Hofmann.
>
>
> Thanks for looking into this! I tried to implement it as you suggested
> and simply doing:
>
> diff --git a/sys/netproto/802_11/wlan/ieee80211.c b/sys/netproto/802_11/wlan/ieee80211.c
> index c4084d4..d6be645 100644
> --- a/sys/netproto/802_11/wlan/ieee80211.c
> +++ b/sys/netproto/802_11/wlan/ieee80211.c
> @@ -304,7 +304,7 @@ ieee80211_ifattach(struct ieee80211com *ic,
>
>         ifp->if_addrlen = IEEE80211_ADDR_LEN;
>         ifp->if_hdrlen = 0;
> -       if_attach(ifp, NULL);
> +       if_attach(ifp, &wlan_global_serializer);
>         ifp->if_mtu = IEEE80211_MTU_MAX;
>         ifp->if_broadcastaddr = ieee80211broadcastaddr;
>         ifp->if_output = null_output;
> diff --git a/sys/netproto/802_11/wlan/ieee80211_ioctl.c
> b/sys/netproto/802_11/wlan/ieee80211_ioctl.c
> index a31dad7..d7f2d92 100644
> --- a/sys/netproto/802_11/wlan/ieee80211_ioctl.c
> +++ b/sys/netproto/802_11/wlan/ieee80211_ioctl.c
> @@ -3201,7 +3201,9 @@ ieee80211_ioctl_updatemulti(struct ieee80211com *ic)
>                 TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
>                         if (ifma->ifma_addr->sa_family != AF_LINK)
>                                 continue;
> +                       wlan_serialize_exit();
>                         (void) if_addmulti(parent, ifma->ifma_addr, NULL);
> +                       wlan_serialize_enter();
>                 }
>         }
>         parent->if_ioctl = ioctl;
>
>
> seems to work for ath so far. Do you have a better idea how to deal
> with the recursive call to if_addmulti()?

Hmm, not much, but I believe you should release the serializer at the
beginning of ieee80211_ioctl_updatemulti() (if_delallmulti will try
holding serializer too).  Since multicast address alteration/accessing
are serialized by netisr0, releasing serializer here probably will not
hurt.

Best Regards,
sephe

> Of course the other wlan drivers would also need to be adjusted. I
> can work on that if you confirm that this is the way to go.
>
> Best Regards,
> Johannes
>
> ----------------------------------------
> Bug #2458: ath: ran out of descriptors
> http://bugs.dragonflybsd.org/issues/2458
>
> Author: Johannes Hofmann
> Status: New
> Priority: Normal
> Assignee:
> Category:
> Target version:
>
>
> After running for a while in a WPA secured WLAN with an ath(4) card, I get:
>    ath: ran out of descriptors
> and the network stops working.
> Sometimes destroying wlan0 and kldunload if_ath; kldload if_ath
> restores network, but in some cases I get
>
>
>
> Nov 18 12:45:06 plop kernel: Trace beginning at frame 0xd6264ca8
> Nov 18 12:45:06 plop kernel: m_free(ffffffff,d47f1c00,0,d936dc00,d5a94400) at m_free+0xc6 0x
> c01f26ed
> Nov 18 12:45:06 plop kernel: m_free(d47f7800,d6264cfc,c09c8846,d47f7800,c47576f0) at m_free+
> 0xc6 0xc01f26ed
> Nov 18 12:45:06 plop kernel: m_freem(d47f7800,c47576f0,d6264cfc,c09e8e58,d5cf9f80) at m_free
> m+0x15 0xc01f29c6
> Nov 18 12:45:06 plop kernel: ieee80211_flush_ifq(d5a94400,d4c46500,ffffffff,d5e35478,c47576f
> 0) at ieee80211_flush_ifq+0x70 0xc09c8846
> Nov 18 12:45:06 plop kernel: ieee80211_newstate_task(d4c46500,1,c47576f4,1,c475770c) at ieee
> 80211_newstate_task+0x231 0xc09e74e3
> Nov 18 12:45:06 plop kernel: taskqueue_run(c47576f0,c475770c,0,c03d27b3,0) at taskqueue_run+
> 0x93 0xc01dd304
> Nov 18 12:45:06 plop kernel: taskqueue_thread_loop(d5e3544c,0,0,0,0) at taskqueue_thread_loo
> p+0x4b 0xc01dd5ed
> Nov 18 12:45:06 plop kernel: lwkt_exit() at lwkt_exit 0xc01bbab3
>
>
> and the system freezes on kldunload if_ath
>
>
> --
> You have received this notification because you have either subscribed to it, or are involved in it.
> To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account



--
Tomorrow Will Never Die
----------------------------------------
Bug #2458: ath: ran out of descriptors
http://bugs.dragonflybsd.org/issues/2458

Author: Johannes Hofmann
Status: New
Priority: Normal
Assignee: 
Category: 
Target version: 


After running for a while in a WPA secured WLAN with an ath(4) card, I get:
   ath: ran out of descriptors
and the network stops working.
Sometimes destroying wlan0 and kldunload if_ath; kldload if_ath
restores network, but in some cases I get 



Nov 18 12:45:06 plop kernel: Trace beginning at frame 0xd6264ca8
Nov 18 12:45:06 plop kernel: m_free(ffffffff,d47f1c00,0,d936dc00,d5a94400) at m_free+0xc6 0x
c01f26ed 
Nov 18 12:45:06 plop kernel: m_free(d47f7800,d6264cfc,c09c8846,d47f7800,c47576f0) at m_free+
0xc6 0xc01f26ed 
Nov 18 12:45:06 plop kernel: m_freem(d47f7800,c47576f0,d6264cfc,c09e8e58,d5cf9f80) at m_free
m+0x15 0xc01f29c6 
Nov 18 12:45:06 plop kernel: ieee80211_flush_ifq(d5a94400,d4c46500,ffffffff,d5e35478,c47576f
0) at ieee80211_flush_ifq+0x70 0xc09c8846 
Nov 18 12:45:06 plop kernel: ieee80211_newstate_task(d4c46500,1,c47576f4,1,c475770c) at ieee
80211_newstate_task+0x231 0xc09e74e3 
Nov 18 12:45:06 plop kernel: taskqueue_run(c47576f0,c475770c,0,c03d27b3,0) at taskqueue_run+
0x93 0xc01dd304 
Nov 18 12:45:06 plop kernel: taskqueue_thread_loop(d5e3544c,0,0,0,0) at taskqueue_thread_loo
p+0x4b 0xc01dd5ed 
Nov 18 12:45:06 plop kernel: lwkt_exit() at lwkt_exit 0xc01bbab3 


and the system freezes on kldunload if_ath


-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]