Bug #39464 | Error in my_thread_global_end(): 9 threads didn't exit | ||
---|---|---|---|
Submitted: | 15 Sep 2008 21:58 | Modified: | 30 Jul 2009 7:27 |
Reporter: | Roman Zolotarev | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | Connector / ODBC | Severity: | S3 (Non-critical) |
Version: | 5.0.67 | OS: | Linux (ODBC) |
Assigned to: | CPU Architecture: | Any |
[15 Sep 2008 21:58]
Roman Zolotarev
[16 Sep 2008 10:12]
Tonci Grgin
Roman, as I said before: Bug #32366: "ODBC Connection to MySQL using VBScript (WScript.exe)" Bug #32986: "MyODBC recordset returns bad data and causes error in my_thread_global_end" and master of all Bug #25621: "Error in my_thread_global_end(): 1 threads didn't exit" I think there might be two problems here: 1) "threads don't exit" in server. This should be patched in 5.0.70 afaik. 2) Wait for c/ODBC release to be linked against 5.0.70 libraries. So, this is a duplicate of abovementioned bugs and we are aware of the problem. I will not close the bug for now but rather discuss it during upcoming DevCon.
[16 Oct 2008 23:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".
[13 May 2009 14:57]
Cristian Suciu
Hi, I attached a simple application that prints the "Error in my_thread_global_end(): X threads didn't exit" message. The environmental handler is global and is created on main thread. The first connection is created on the main thread too and is closed after all working threads are finished. Creating the environmental handler and/or making a new connection will call my_thread_init() where THR_thread_count counter is incremented. The counter is decremented only when the SQLDisconnect() is called from main thread. When working threads are disconnecting there is no call to my_thread_end(), so the counter remains the same. Finally, when my_thread_global_end() will be called the counter value will be the same with the number of working threads created and the message is printed. Why SQLDisconnect() from working threads do not decrement the THR_thread_count counter? To compile: $ gcc -g -o gmodel_odbc gmodel_odbc.c -I<sql.h directory> -L<libodbc.so directory> -lodbc -lpthread To test: $ ./gmodel_odbc -d MySQL_rd_Essbase7 -u rnddb15 -p rnddb15 -n 2 Connected. Press any key to start threads! : 3086273024l WorkingThread: started : 3086269328l WorkingThread: started : 3073682320l WorkingThread: stopped : 3086269328l WorkingThread: stopped : 3073682320l Threads finished. Press any key to disconnect! : 3086273024l Error in my_thread_global_end(): 2 threads didn't exit Where: -d is the DSN, -u is the user name, -p is the password and -n is the number of working threads. Regards, Cristian
[13 May 2009 15:04]
Cristian Suciu
I forgot to mention that all test where done on RedHat52, 32bit, kernel 2.6.18-92.el5, MySQL Connector/ODBC 5.1.5 and 3.51.27 and unixODBC 2.2.14 as manager. Cristian
[30 Jul 2009 7:27]
Tonci Grgin
Sorry Roman, I missed this report... This is actually a duplicate of several bugs, primarily Bug#32366: The message you are seeing does not originate from the server, it comes from the client library used by the driver. There was an older bug where the server itself would print this message (to wherever it is that server output is set to go, not to client applications), but this bug was fixed in recent server versions (Bug#25261).
[26 Oct 2010 6:35]
Bogdan Degtyariov
The problem has not been solved for Unix/Linux systems. To be continued in bug #57727