DragonFly bugs List (threaded) for 2008-07
Re: panic: already on hash list
On Wed, Jul 23, 2008 at 9:14 PM, Nicolas Thery <firstname.lastname@example.org> wrote:
> 2008/7/23 Sepherosa Ziehau <email@example.com>:
>> 2) inpcb is on hash list (both the flag and the link fields prove that)
> tcp_connect_oncpu() first looks up the inpcb in the hash list then
mmm, the user program may try to connect to a different remote address?
> adds it if it is not already
> there. So if it is on the hash list when the os panics, could it mean
> that it was inserted by another thread after the failed look up?
I think all syscalls are under bgl and tcp protocol threads are under
bgl. Even if they are not under bgl, connection creation (e.g. link
inpcb into hash tabl) is serialized by the tcp thread on cpu0.
SS_ISCONNECTING checking in soconnect may be racy, but it probably is
not the cause of this panic, since so_state is 0.
Live Free or Die