Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
We Upgraded to Mono 18.104.22.168 Stable today and then discovered our LDAP connection stopped working.
LdapConnection ldapConnection = new LdapConnection();
ldapConnection.Connect (host, port);
Which executes this line: Novell.Directory.Ldap.LdapConnection.cs
public virtual void Connect(System.String host, int port)
conn.connect(address, specifiedPort); // <--- Goes in here
That then calls this line: Novell.Directory.Ldap.Connection.cs
internal void connect(System.String host, int port)
connect(host, port, 0); // <-- Then here
private void connect(System.String host, int port, int semaphoreId)
this.startReader(); // <-- In here Line 823
internal void startReader()
// Start Reader Thread
Thread r = new Thread(new ThreadStart(new ReaderThread(this).Run));
r.IsBackground = true; // If the last thread running, allow exit.
waitForReader(r); // <-- There is a loop in here that it get stuck on.
It looks like it can't find the thread or something. It just gets stuck and then eventually the website times out.
Can't say much, it might be due to integrating a lot of library code from microsoft or other internal changes in mono.
If you manage to extract a test case that shows the behavior, we'll gladly take a look at it.
We ran into the same issue this morning.
We are using the same - more or like - logic inside some of our websites as well.
We have a library build around this one which gives the same issues when running inside a website logic (httpd on Centos 7) but this is not happening when the same library is used within a stand alone mono .exe which is used as a crontab daemon on the same machine !
Can you provide a test case of sorts on this issue?
A good way to do it, given this is a non-core assembly, what you could do is grab the source from here and build it as a regular part of your application. This should make it easy to understand the issue and figure out what's wrong.
I pulled the code down and ran a debugger through it.
It is stuck on Novell.Directory.Ldap.Connection.waitForReader(System.Threading.Thread thread)
Not sure how to UnitTest this as that is a private Method.
Here is part of the StackTrace:
Novell.Directory.Ldap.Connection.waitForReader(System.Threading.Thread thread) in /home/XXX/Development/Novell.Directory.Ldap/Novell.Directory.Ldap/Connection.cs:578
Novell.Directory.Ldap.Connection.startReader() in /home/XXX/Development/Novell.Directory.Ldap/Novell.Directory.Ldap/Connection.cs:1230
Novell.Directory.Ldap.Connection.connect(string host, int port, int semaphoreId) in /home/XXX/Development/Novell.Directory.Ldap/Novell.Directory.Ldap/Connection.cs:823
Novell.Directory.Ldap.Connection.connect(string host, int port) in /home/XXX/Development/Novell.Directory.Ldap/Novell.Directory.Ldap/Connection.cs:640
Novell.Directory.Ldap.LdapConnection.Connect(string host, int port) in /home/XXX/Development/Novell.Directory.Ldap/Novell.Directory.Ldap/LdapConnection.cs:179
It just keeps looping in that waitForReader.
Created attachment 14723 [details]
Unit Test for time out
Just need to enter an IP address and Port for your test LDAP server.
You can extend the timeout on the unit test and still won't work.
It looks like this issue has now been resolved in version 22.214.171.124. I have updated my mono and it started to work again all of a sudden.
I can only speculate that it might have had something to do with the threading stuff that got changed in the initial release of mono 4.2.