[Pvfs2-developers] question about server SM stuff

Sam Lang slang at mcs.anl.gov
Tue Sep 26 12:10:48 EDT 2006


On Sep 26, 2006, at 10:44 AM, Walter B. Ligon III wrote:

>
> Hey guys, Phil, riddle me this ...
>
> In pvfs2-server.c there is a function  
> "server_state_machine_start_noreq()" which is used to start state  
> machines that don't originate with a request message.  When it  
> starts the machine it passes a pointer to a local variable  
> "tmp_status" in as job_status_p - which later gets passed to job  
> functions in the state machine code ... which means that these  
> pointers are potentially pointing to random places on the stack, I  
> think.
>

We don't save those js_p variables anywhere in the job code.  The  
state action functions take js_p variables, but they are passed in  
from the server code.  The start_noreq calls are only used right now  
for perf updates and job timers.  Both of those server op structures  
get stored in the job context when we do the start_noreq, but the job  
status pointers only get filled in by the call to job_testcontext.

-sam

> I think this is a problem, and I intend to fix it ... just want to  
> be sure I'm not missing something.  I'm asking because I've  
> seriously changed that stuff anyway and I'm not sure if the reason  
> was obvious before, but not now, or what.
>
> So, this leads to the next question ... about job_status_p's passed  
> to job functions, I'm not entirely clear where is the best place to  
> allocate and free them - they end up getting stuck in arrays and  
> stuff int he job interface, and I'm finding it hard to follow their  
> path.  I assume the job interface will not tolerate a NULL pointer  
> here (right?).
> I think this is just an issue because these "noreq" SMs are for  
> things like timers that noone ever actually looks at the return  
> status, but I want to be sure.
>
> Comments appreciated.
> Walt
> -- 
> Dr. Walter B. Ligon III
> Associate Professor
> ECE Department
> Clemson University
> _______________________________________________
> Pvfs2-developers mailing list
> Pvfs2-developers at beowulf-underground.org
> http://www.beowulf-underground.org/mailman/listinfo/pvfs2-developers
>



More information about the Pvfs2-developers mailing list