[OpenAFS-devel] FreeBSD: rxk_ListenerPid not dying fixed(?)

Derrick Brashear shadow@gmail.com
Wed, 19 Jan 2011 22:34:29 -0500


On Wed, Jan 19, 2011 at 10:30 PM, Toby Burress <kurin@delete.org> wrote:
> I was wondering if I could trouble to have someone double check my
> diagnostic.
>
> So when dismounting /afs, the master branch hangs. =A0It looks like
> this is happening because osi_StopListener() in src/rx/FBSD/rx_knet.c
> calls osi_NetSend() telling the Listener to go away, and then
> afs_osi_Sleep().
>
> Then in src/rx/rx_kcommon.c, rxk_ListenerProc() gets the signal and
> calls osi_rxWakeup(), allowing osi_StopListener() to return and umount
> to exit.
>
> However, it looks like afs_osi_Sleep() is being called with
> rxk_ListenerPid as its argument, and osi_rxWakeup() with afs_termState.
> This causes afs_getevent to return the wrong event to osi_rxWakeup,
> and as a result wakeup() is never called and umount hangs.
>
> Editing rx_kcommon.c to use rxk_ListenerPid instead of afs_termState
> allows umount to exit cleanly (although afsd isn't able to restart after
> that;

it's not supposed to. unload the module, then reload it.

> it looks like after the restart afs_getevent is being called with
> something that just points to zeroed memory).
>
> Is this all wrong? =A0I spend most of my time in pythonland, so kernel
> debugging is, uh, new to me.

i'd have to look but that sounds correct

Derrick