I am currently attempting to port a C# application from windows/.net/visual studio to Ubuntu/mono/monodevelop. My app is using Mysql with the .net connector. The application works in windows with the same setup.
In ubuntu, the application does manage to connect to the server, and performs some work. However at a later stage, the application hangs. On investigating the hang in Monodevelop, I see that the thread communicating with the mysql server is hung on a monitor wait. The call stack is as follows.
System.Threading.Monitor.TryEnter (obj={object}, millisecondsTimeout=-1, lockTaken=false) in
System.Threading.Monitor.Enter (obj={object}, lockTaken=false) in
System.Resources.ResourceManager.GetString (name="PerfMonCategoryName", culture={System.Globalization.CultureInfo}) in
MySql.Data.MySqlClient.Properties.Resources.get_PerfMonCategoryName () in
MySql.Data.MySqlClient.PerformanceMonitor..ctor (connection={MySql.Data.MySqlClient.MySqlConnection}) in
MySql.Data.MySqlClient.MySqlConnection.Open () in
Persistate.DbWorker.EnsureConnection (workItem={Persistate.DbWorkItem}
etc.
It seems that in the MySqlConnection.Open call, the connector is attempting to get a resource string for the performance monitor, and the resource manager is using a lock and hanging on that. There are no other threads which are anywhere within the connector or the resource manager. Anybody have any ideas here? Anybody seen anything like this?
Regards, Stuart
In ubuntu, the application does manage to connect to the server, and performs some work. However at a later stage, the application hangs. On investigating the hang in Monodevelop, I see that the thread communicating with the mysql server is hung on a monitor wait. The call stack is as follows.
System.Threading.Monitor.TryEnter (obj={object}, millisecondsTimeout=-1, lockTaken=false) in
System.Threading.Monitor.Enter (obj={object}, lockTaken=false) in
System.Resources.ResourceManager.GetString (name="PerfMonCategoryName", culture={System.Globalization.CultureInfo}) in
MySql.Data.MySqlClient.Properties.Resources.get_PerfMonCategoryName () in
MySql.Data.MySqlClient.PerformanceMonitor..ctor (connection={MySql.Data.MySqlClient.MySqlConnection}) in
MySql.Data.MySqlClient.MySqlConnection.Open () in
Persistate.DbWorker.EnsureConnection (workItem={Persistate.DbWorkItem}
etc.
It seems that in the MySqlConnection.Open call, the connector is attempting to get a resource string for the performance monitor, and the resource manager is using a lock and hanging on that. There are no other threads which are anywhere within the connector or the resource manager. Anybody have any ideas here? Anybody seen anything like this?
Regards, Stuart