Failed to release the mutex using Vault command line client

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

daveronson
Posts: 6
Joined: Wed Jun 16, 2004 8:07 am

Failed to release the mutex using Vault command line client

Post by daveronson » Wed Jun 16, 2004 8:38 am

I often get the following error using the command line vault.exe client (v 2.0.1.2137 client):

Unhandled Exception: System.Exception: Failed to release the mutex. GetLastError returned 288.
at VaultLib.SystemMutexWin32.Release()
at VaultLib.SystemMutexWin32.Dispose()
at VaultClientOperationsLib.WorkingFolder.Finalize()

I have got this error:
- setting working folders
- moving files within the repository

The operation right before it always returns "success".

Any thoughts on what this could be?

sterwill
Posts: 256
Joined: Thu Nov 06, 2003 10:01 am
Location: SourceGear

Post by sterwill » Wed Jun 16, 2004 8:46 pm

Does this happen with every operation? Vault uses Windows system-wide mutexes to lock its disk data. It looks like this exception is being raised during garbage collection at the end of the process (when working folders are finalized), and may be harmless at this point (all the "real" work is done).

If this does happen all the time, are there other Vault clients running at the same time (Windows Forms, or Visual Studio IDE)?
Shaw Terwilliger
SourceGear LLC
`echo sterwill5sourcegear6com | tr 56 @.`

daveronson
Posts: 6
Joined: Wed Jun 16, 2004 8:07 am

Post by daveronson » Wed Jun 16, 2004 9:04 pm

It doesn't happen all the time but it is quite frequent. BTW, I just went through the logs and it also happened after a get latest version.

There are no other Vault clients running.

It may be harmless, but I want to be sure. It does create doubt that everything is working properly.

sterwill
Posts: 256
Joined: Thu Nov 06, 2003 10:01 am
Location: SourceGear

Post by sterwill » Thu Jun 17, 2004 8:15 am

My (somewhat limited) knowledge of the garbage collection process tells me it's happening after everything else (including the logout) has completed. You could turn on debug logging in the server to make sure the logout is completing, if you wanted to know.

Which version of the .NET framework are you using? You may want to try upgrading to Vault 2.0.3.
Shaw Terwilliger
SourceGear LLC
`echo sterwill5sourcegear6com | tr 56 @.`

daveronson
Posts: 6
Joined: Wed Jun 16, 2004 8:07 am

Post by daveronson » Thu Jun 17, 2004 10:55 am

I have debug logging on the server. What exactly am I looking for?

The client and server are both Windows 2003 servers running the v1.1.4322 framework.

sterwill
Posts: 256
Joined: Thu Nov 06, 2003 10:01 am
Location: SourceGear

Post by sterwill » Thu Jun 17, 2004 11:29 am

I was mistaken about debug logging being required to see logouts (you can set it back to quiet logging if you wish). The purpose was to see if a logout entry was logged when you saw the exception in the CLC. If the entry had been made, the client had most likely completed its task before the exception happened.
Shaw Terwilliger
SourceGear LLC
`echo sterwill5sourcegear6com | tr 56 @.`

kasti
Posts: 108
Joined: Tue Apr 20, 2004 4:21 am
Location: Austria

Post by kasti » Wed Jul 21, 2004 12:13 am

Any news on this issue? I have got the same problem with vault 2.0.3

Unhandled Exception: System.Exception: Failed to release the mutex. GetLastError returned 288.
at VaultLib.SystemMutexWin32.Release()
at VaultLib.SystemMutexWin32.Dispose()
at VaultClientOperationsLib.WorkingFolder.Finalize()

It mainly seems to happen with Setworkingfolder....

sterwill
Posts: 256
Joined: Thu Nov 06, 2003 10:01 am
Location: SourceGear

Post by sterwill » Thu Jul 22, 2004 10:52 am

I think I've tracked this down to a problem with our dispose pattern and mutex objects. I can provide you an updated DLL with the fixes if you're willing to test it out. Let me know through e-mail or in this thread if you're interested.
Shaw Terwilliger
SourceGear LLC
`echo sterwill5sourcegear6com | tr 56 @.`

jtrigger

I have same issue

Post by jtrigger » Mon Jul 26, 2004 2:59 pm

I am having the same issue. I am getting this very often when I run my build scripts that use the Vault command line utility and it causes my builds to crash. Any news on a fix for this?

sterwill
Posts: 256
Joined: Thu Nov 06, 2003 10:01 am
Location: SourceGear

Post by sterwill » Mon Jul 26, 2004 3:14 pm

Send me your e-mail address and I'll send you the URL for a 2.0.5 preview that addresses this issue. The build should be ready some time today.
Shaw Terwilliger
SourceGear LLC
`echo sterwill5sourcegear6com | tr 56 @.`

kevin_w_kraus
Posts: 3
Joined: Mon Jul 26, 2004 3:09 pm

Same problem here...

Post by kevin_w_kraus » Tue Jul 27, 2004 2:54 pm

I am having the same unhandled exception.

Can I get that link to the 2.0.5 preview bits?

thx

Kevin

sterwill
Posts: 256
Joined: Thu Nov 06, 2003 10:01 am
Location: SourceGear

Post by sterwill » Tue Jul 27, 2004 4:01 pm

You can get the 2.0.5 client preview 2198 (includes mutex fixes and client-side logging) here. This link may disappear as new builds are made.

[edited by sterwill: added build number to differentiate from other 2.0.5 previews]
Shaw Terwilliger
SourceGear LLC
`echo sterwill5sourcegear6com | tr 56 @.`

jmarken
Posts: 1
Joined: Thu Jul 22, 2004 8:20 am
Location: Atlanta
Contact:

Post by jmarken » Mon Aug 02, 2004 8:29 am

I see this all the time too when doing product builds:

<vault>
<!-- Label $/Services/IndexService.sln "IndexService.1.0.5" -->
<result success="yes" />
</vault>

Unhandled Exception: System.Exception: Failed to release the mutex. GetLastError returned 288.
at VaultLib.SystemMutexWin32.Release()
at VaultLib.SystemMutexWin32.Dispose()
at VaultClientOperationsLib.WorkingFolder.Finalize()

What's the latest status on this?
Jeff Marken

sterwill
Posts: 256
Joined: Thu Nov 06, 2003 10:01 am
Location: SourceGear

Post by sterwill » Mon Aug 02, 2004 1:26 pm

Did you try the 2.0.5 preview? It will be released (very) soon.
Shaw Terwilliger
SourceGear LLC
`echo sterwill5sourcegear6com | tr 56 @.`

Guest

Post by Guest » Mon Aug 02, 2004 2:18 pm

I have not. Does it require a database change, or is it just a client update?

Post Reply