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

Toby Burress kurin@delete.org
Wed, 19 Jan 2011 22:30:20 -0500


I was wondering if I could trouble to have someone double check my
diagnostic.

So when dismounting /afs, the master branch hangs.  It 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 looks like after the restart afs_getevent is being called with
something that just points to zeroed memory).

Is this all wrong?  I spend most of my time in pythonland, so kernel
debugging is, uh, new to me.