|
Subject: Trac 0.8 and #571 Newsgroups: gmane.comp.version-control.subversion.trac.general Date: 2005-03-11 16:46:56 GMT (4 years, 16 weeks, 3 days, 1 hour and 1 minute ago)
Hi
Internally we use Trac 0.8 under Windows 2000/XP configured to run as
CGI process. Current Apache2 version is 2.0.53. Our SVN repositories
use the BDB backend.
We had trouble with Trac page accesses causing SVN database locks.
One way to get the SVN DB corruption described in #571 may be
this event sequence:
- (web client) the user A clicks on the Trac 'TimeLine' link
- (httpd) spawns a new CGI Python.exe process for the TimeLine request.
The structure allocated for the new child process structure is
taken from the request pool and a cleanup gets registered with:
apr_pool_note_subprocess(p, procnew, APR_KILL_AFTER_TIMEOUT);
- (web client) ...web server is busy...
The user A clicks on the Trac 'Roadmap' link (or other).
The web browser cancels the pending TimeLine request by closing
the corresp. socket connection and opens a new one.
- (httpd) Detects the closed connection to user A and stops processing
the TimeLine request.
- (httpd) Quickly finishes all outstanding requests and invokes the
cleanup function 'mpm_recycle_completion_context'.
The APR pool for the TimeLine request gets destroyed and the cleanup
registered for the CGI process structure is invoked in
'free_proc_chain()'.
At this time the Trac python process is still running and gets
killed with TerminateProcess which may cause SVN database corruption.
The stacktrace when the CGI process gets killed looks like this:
libapr.dll!apr_proc_kill(apr_proc_t * proc=0x004bc660, int signal=4950896)
Line 38 C
(free_proc_chain)
libapr.dll!apr_pool_destroy(apr_pool_t * pool=0x004b4908) Line 737
libhttpd.dll!mpm_recycle_completion_context(CompContext * context=0x0042a340)
Line 84
libhttpd.dll!winnt_get_connection(CompContext * context=0x0042a340)
Line 649
libhttpd.dll!worker_main(long thread_num=4934152) Line 706
msvcrt.dll!__endthreadex() + 0xbc
KERNEL32.DLL!lstrcmpiW() + 0xb7
So I guess the cause for the corruption is not SVN/BDB itself
but the way Apache2 is treating CGI processes.
Roland
|
|
|