[Mono-bugs] [Bug 436775] New: LDAP Connect throws: Connection.freeWriteSemaphore(-2): semaphore not owned by any thread
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Sun Oct 19 09:14:03 EDT 2008
https://bugzilla.novell.com/show_bug.cgi?id=436775
Summary: LDAP Connect throws: Connection.freeWriteSemaphore(-2):
semaphore not owned by any thread
Product: Mono: Class Libraries
Version: 1.9
Platform: x86-64
OS/Version: Ubuntu
Status: NEW
Severity: Normal
Priority: P5 - None
Component: CORLIB
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: jeroen-novel at asselman.com
QAContact: mono-bugs at lists.ximian.com
Found By: DeveloperNet
Created an attachment (id=246431)
--> (https://bugzilla.novell.com/attachment.cgi?id=246431)
Patch for the bug
When a connection is refused by an LDAP server the
Novell.Directory.Ldap.LdapConnection throws a System.Exception with "semaphore
not owned by any thread". This is unrelated to the real error, which should be
a connection refused.
Looking at the code in mono, it actually should throw an "LdapException",
however, the freeWriteSemaphore method is called twice in a row, once in the
catch block, and then afterwards again in the finally block. Which causes the
semaphore to be freed twice, which causes the unwanted "semaphore not owned by
any thread".
Unit test and patch attached. The duplicate freeWriteSempaphore call is removed
as the method is allready executed from within the finally block.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list