9fans archive / 1996 / 10 / 79 /    prev

From: Bodet Laurent bl@mim...
Subject: bug in dossrv need help...
Date: Tue, 29 Oct 1996 23:24:42 +0100 (MET)

Hi,

There is a problem with the the field vers of the Qid struct. The server
never touch this field... This cause a bug when you try to excute a binary
that you had already executed and modified. 

I think it's because the kernel caches text segments (function attachimage()
in segment.c call from sysexec()). It compares the qid struct of existing
images and the qid of new binary. So, if the vers field didn't change after a
modification the old image is used and in many case crash the execution. 

I have no good ideas to fix this problem :

	1) Create a Qid table in wich we increment the field versions of the 
	   modified file... and what happen when the table is full ???

	2) Do something like :
	
		static long version;
		.
		.
		.
		void 
		rwalk(){
		...
		f->qid.vers = ++version;
		...
		}
	
	This disable the kernel cache !!!!

	3) Use the modification time of the file for qid.vers. But what happen 
	   if the modification is done in less than 1 second ?


Any better ideas are welcome ... Thanks

Bodet Laurent.

E-Mail: bl@mim...