[Xitami] File locking problems
Francis Turner
xitami@lists.xitami.org
Fri, 23 Nov 2001 16:05:40 +0100
I am creating a dynamic web system where html (and xml) files are
generated by perl cgi scripts and they are displayed using Xitami as
static objects once created.
Unfortunatley I think I've found a race condition, which causes Xitami
to crash. The condition occurs when a static XML file includes a second
file (using .xml from XXX or .literal from XXX) and the second file gets
deleted or renamed just as its being read.
The problem is I don't know how I can lock a file in order to delete it
(or rename it).
This doesn't happen very often and its very hard to make occur
frequently so this is speculation, but I can't think what else is
causing these occasional crashes. I'm wondering if it is something to do
with the fatc that the perl script that does the deletion is running as
a child of Xitami because it is called by CGI. Indeed it could be that
the problem is that the CGI script is inable to delete/rename the file
but I don't think so since I check the return codes - also the crash
reports from Xitami and mention xixxml .... (though I did get one crash
which just produced a dialog saying Microsoft Visual C++ has encountered
an unrecoverable error with no log)
The system is win2000 sp1 + many security fixes
The crash log reports look like this if anyone can explain them
23/Nov/2001:11:45:14 +0100 Xitami v2.5b5
Abort at xixxml:4: (2, 7)
23/Nov/2001:11:45:14 +0100 Xitami v2.5b5
Abort at xixxml:4: (2, 7)
23/Nov/2001:11:45:14 +0100 Xitami v2.5b5
Abort at xixxml:4: (2, 7)
23/Nov/2001:13:54:39 +0100 Xitami v2.5b5
Abort at xixxml:4: (2, 7)
If anyone has some bright ideas about how I might debug this further
and/or work around it I would appreciate it!
Francis
PS yes I know 2.5b5 is BETA code. but it has been remarkably stable
other than this issue and even this one seems to be RARE!
--
"Education is when you read the fine print;
experience is what you get when you don't." Pete Seeger