| Bug #32814 | Mono xsp2 web server randomly hangs when it uses Connector.Net | ||
|---|---|---|---|
| Submitted: | 28 Nov 2007 13:49 | Modified: | 21 Jul 8:47 |
| Reporter: | Dzugaru Darkness | ||
| Status: | Open | ||
| Category: | Connector/Net | Severity: | S1 (Critical) |
| Version: | 5.0.8.1, 5.1.3 | OS: | Linux (suse 10.3) |
| Assigned to: | Tonci Grgin | Target Version: | |
| Tags: | mono xsp mod_mono | ||
[28 Nov 2007 13:49]
Dzugaru Darkness
[29 Nov 2007 7:10]
Dzugaru Darkness
Guess I found where Connector.Net may use ThreadPool (conflicting with xsp web server thread pool as described here - http://www.mono-project.com/ThreadPool_DeadLocks) It's a place in code where executing command can timeout: // start a timeout timer if (connection.driver.Version.isAtLeast(5, 0, 0) && commandTimeout > 0) { TimerCallback timerDelegate = new TimerCallback(TimeoutExpired); timer = new Timer(timerDelegate, this, this.CommandTimeout * 1000, Timeout.Infinite); } So it uses System.Threading.Timer, but I don't know if Timer uses ThreadPool... But it hangs somewhere in ExecuteReader method, that's for sure.
[29 Nov 2007 9:12]
Dzugaru Darkness
As I thought, all hangs here:
public new MySqlDataReader ExecuteReader(CommandBehavior behavior)
{
....
finally
{
canCancel = false;
if (timer != null)
{
timer.Dispose(); // <<<< ---- here!
}
}
}
This is some kind of deadlock between xsp and Connector, that involves threading...
[21 Jul 8:47]
Tonci Grgin
Hi Dzugaru and thanks for your report. Please except my apologies for not responding for way too long. I do not think this is a problem in MySQL SW but rather in FW and/or WEB server. There are numerous reports like this one in BugsDB and on internet so I made my own test FW for such cases spawning multiple threads and doing all sorts of "horrible" things and I can't repeat it on properly configured WEB server. Maybe, in future, we'll have enough info to deal with this but, for now, there's nothing much we can do...
