[OpenAFS-devel] Kernel 2.4.0 Oops when afs is shutting down
Derek Atkins
warlord@MIT.EDU
17 Jan 2001 11:21:21 -0500
Michael Pronath <michael.pronath@gmx.de> writes:
> I think it was RxListener... but I'm not sure anymore. rx_socket is always
> != NULL here. I inserted an afs_warn before the sock_release giving me the
> address, and it was never 0.
Ahh, now I see what's going on... It's waking up the listener via the
kill (to interrupt the sock_recv() call) but then it's destroying the
socket in a different thread before the listener has a chance to exit
itself properly.
> if (rxk_ListenerPid) {
> (void) (*sys_killp)(rxk_ListenerPid, 9);
> afs_osi_Sleep(&rxk_ListenerPid); // <----
> }
> sock_release(rx_socket);
>
> and introduced a call to afs_osi_Wakeup(&rxk_ListenerPid) in rx_kcommon.c
> after rxk_ListenerPid=0. Is this ok with regard to the locks?
>
Yea, this will work, except that it will now cause problems on other
platforms that use the rxk_Listener() procedure (namely Sun). We can
fix this in two ways, either add the afs_osi_Sleep() to the Sun
platform, or only call the Wakeup routine under Linux. I would
recommend the latter solution at the moment.
-derek
--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord@MIT.EDU PGP key available