9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* bug in dossrv need help...
@ 1996-10-29 22:24 Bodet
  0 siblings, 0 replies; only message in thread
From: Bodet @ 1996-10-29 22:24 UTC (permalink / raw)


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@mime.univ-paris8.fr





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1996-10-29 22:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-10-29 22:24 bug in dossrv need help Bodet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).