Bug #55345 | mysql_library_init causes segfault if executed after calling mysql_library_end | ||
---|---|---|---|
Submitted: | 18 Jul 2010 12:46 | Modified: | 2 Sep 2010 15:57 |
Reporter: | Oleg Sidorkin | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: C API (client library) | Severity: | S2 (Serious) |
Version: | 5.5.5-m3, 5.6.99 | OS: | Any (FreeBSD, Linux) |
Assigned to: | Christopher Powers | CPU Architecture: | Any |
Tags: | mysql_library_init, regression |
[18 Jul 2010 12:46]
Oleg Sidorkin
[19 Jul 2010 7:05]
Sveta Smirnova
Thank you for the report. I can not repeat described behavior on FreeBSD6. You wrote you use FreeBSD8. Which connector/C binaries do you use? If you compiled connector yourself please send us configure options you used.
[19 Jul 2010 7:05]
Susanne Ebrecht
Do you have similar problems by using MySQL server 5.1 instead 5.5?
[19 Jul 2010 9:10]
Oleg Sidorkin
Sorry. I've completely forgot about build flags. Both client and server were built with the following flags: WITH_XCHARSET=all BUILD_OPTIMIZED=yes WITHOUT_INNODB=no WITH_ARCHIEVE=yes WITH_FEDERATED=yes WITH_OPENSSL=yes WITH_CHARSET=koi8r WITH_FAST_MUTEXES=yes MySQL 5.1 worked with the same flags with no problems
[19 Jul 2010 9:17]
Sveta Smirnova
Thank you for the feedback. You opened bug in Connector/C category while speaking about compiling server and using server. Do you really use Connector/C or is is regular C API libraries bundled with server?
[19 Jul 2010 10:30]
Oleg Sidorkin
It is client library bug. Should I change the change the category of the bug?
[19 Jul 2010 11:20]
Sveta Smirnova
Thank you for the feedback. Verified as described. Connector/C is not affected.
[23 Aug 2010 1:43]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/116458 3190 Christopher Powers 2010-08-22 Bug #55345, "mysql_library_init causes segfault if executed after calling mysql_library_end" my_thread_global_end() now sets mysql_thread_basic_global_init_done= 0 to ensure destroyed mutexes are not reused. I verified that clearing this flag will not result in the redundant allocation of other resources allocated by my_thread_global_init() and my_thread_basic_global_init(). @ mysys/my_thr_init.c Clear mysql_thread_basic_global_init_done flag at the end of my_thread_global_end()
[25 Aug 2010 9:21]
Bugs System
Pushed into mysql-5.5 5.5.6-m3 (revid:alik@ibmvm-20100825092002-2yvkb3iwu43ycpnm) (version source revid:alik@ibmvm-20100825092002-2yvkb3iwu43ycpnm) (merge vers: 5.5.6-m3) (pib:20)
[27 Aug 2010 20:01]
Paul DuBois
Noted in 5.5.6 changelog. A call to mysql_library_init() following a call to mysql_library_end() caused a client crash. Setting report to Need Merge pending push to 5.6.x.
[30 Aug 2010 8:29]
Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alik@sun.com-20100830082732-n2eyijnv86exc5ci) (version source revid:alik@sun.com-20100830082732-n2eyijnv86exc5ci) (merge vers: 5.6.1-m4) (pib:21)
[30 Aug 2010 8:33]
Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100830082745-n6sh01wlwh3itasv) (version source revid:alik@sun.com-20100830082745-n6sh01wlwh3itasv) (pib:21)
[30 Aug 2010 15:07]
Paul DuBois
Noted in 5.6.1 changelog.