panic: already on hash list

Sepherosa Ziehau sepherosa at gmail.com
Wed Jul 23 08:28:37 PDT 2008


On Wed, Jul 23, 2008 at 9:14 PM, Nicolas Thery <nthery at gmail.com> wrote:
> 2008/7/23 Sepherosa Ziehau <sepherosa at gmail.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.

Best Regards,
sephe

-- 
Live Free or Die





More information about the Bugs mailing list