Subject: | speedy_backend dies with "temp file is corrupt" error |
speedy_backend intermittently gets "temp file is corrupt" error. It
looks like the control file is corrupted after the first error and any
backend which uses the corrupted slot dies with the same error. Killing
all backend processes and removing the control file is needed to clear
the error.
My guess is that this error is caused by either a race condition or
problem cleaning up after unexpected exit. Peter Keller at
http://twiki.org/cgi-bin/view/Codev/SpeedyCGI tracked it down to a
missing msync() in file_unlock. The problem is that the changes to the
mmap'ed file aren't written to disk before the file is unlocked and
visible to other processes.