[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[TSVN] Re: 2870: TSVNCache deadlock

From: Norbert Unterberg <nepo_at_gmx.net>
Date: 2005-03-25 19:51:54 CET

SteveKing schrieb:

> As of revision 2915, I added some OutputDebugString() functions which
> you can catch with the Dbgview tool from sysinternals.

I was just goig to suggest just that (displaying the error code of any
failure). There must be a reason why creating and connecting the named
pipe server failed at first on multiprocrssor systems (you know, when
the overlay icons were broken). Your fix might just have hidden the real
cause.

Some comments on the pipe code:

* When creating the threads in TSVNCache, you should use
_beginthreadex() instead of CreateThread()? _beginthreadex() initializes
the C runtime library, and calls to the C lib are only allowed when you
created the thread with one of the beginthread() functions. You do call
runtime functions in TSVNCache, don't you (I have not checked)? I think
the risk of deadlocks is one possible result if you fail to do so (hint
hint ;-))

* In the shell extension part, you use blocking pipe access. That means
there may be situations where the ReadFile/WriteFile calls block
forever. Maybe you should switch to overlapped I/O there and let the
pipe transaction timeout after some time. This might prevent the
explorer deadlock if the cache is hanging.

* Is there a particular reason for not using TransactNamedPipe() on the
client side? Just curious...

Norbert

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Fri Mar 25 19:52:43 2005

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.