[OpenAFS-devel] Incorrect behavior in osi_TimedSleep and ppc_darwin_14

Chaskiel M Grundman cg2v+@andrew.cmu.edu
Fri, 9 Nov 2001 23:33:13 -0500 (EST)


Excerpts from internet.computing.openafs.devel: 8-Nov-101
[OpenAFS-devel] Incorrect b.. by Patrick Sodre Carlos@wam 
> I believe I have been able to track down the source of "shutdown" problem
> for darwin_14. For some weird reason, rx_event goes into the
> afs_osi_Wait(500,0,0) and never comes out of the
> osi_TimedSleep::thread_block(0) - from osi_sleep.c. 
I discovered the same thing. once the shutdown process starts,
afs_osi_Wait only works once (and then blocks forever). 
I was able to correct this by altering osi_sleep.c to use the bsd sleep
functions (sleep/tsleep/wakeup) instead of the underlying mach functions
(assert_wait/thread_set_timer/thread_block/thread_wakeup).
I will be posting a comprehensive darwin 1.4 patch to the port-darwin
list shortly that includes this change. (note that anyone else's darwin
1.4 patches are unlikely to hold up to a 'find .' run in a large
directory tree. You really want to use mine)

> I believe that the
> rx_event should work more like the AFSDB thread, from my understanding
> rx_event spins checking for the events which does not sound like
> optimal and is causing problems like the current one. 
The AFSDB handler is synchronously responding to a request from a thread.
The rxevent interface is explictitly asynchronous. The rxevent daemon
runs twice a second and processes all rx events that were posted since
it last ran.