Bug 1069079
Summary: | crash when linking libgnutls and libmysqlclient | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Ken Dreyer <ktdreyer> | ||||
Component: | trousers | Assignee: | Steve Grubb <sgrubb> | ||||
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | rawhide | CC: | ejratl, hagberg, jorton, mschmidt, nmavrogi, sgrubb, tmraz, volker27, xjakub | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2014-03-18 21:00:00 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 1064300 | ||||||
Attachments: |
|
Description
Ken Dreyer
2014-02-24 05:56:43 UTC
The crash is on libtspi (which is used by gnutls). I can reproduce it as: gcc test.c -L/usr/lib64/mysql -lmysqlclient -ltspi Interesting enough if the test is compiled as: gcc test.c -ltspi -L/usr/lib64/mysql -lmysqlclient there is no crash. So the issue seems related to tspi's library destructor conflicting with something in libmysqlclient. As the crash is on the mutex, my guess would be some uninitialized mutex or something like that. I'm assigning the issue to trousers. Here is a backtrace with debugging symbols included: ==3836== Invalid read of size 4 ==3836== at 0x3942009FE0: pthread_mutex_lock (pthread_mutex_lock.c:66) ==3836== by 0x31CFE22BC3: host_table_final (hosttable.c:54) ==3836== by 0x394140F8E9: _dl_fini (dl-fini.c:252) ==3836== by 0x39418394C8: __run_exit_handlers (exit.c:82) ==3836== by 0x3941839514: exit (exit.c:104) ==3836== by 0x3941821D6B: (below main) (libc-start.c:319) ==3836== Address 0x18 is not stack'd, malloc'd or (recently) free'd ==3836== ==3836== ==3836== Process terminating with default action of signal 11 (SIGSEGV) ==3836== Access not within mapped region at address 0x18 ==3836== at 0x3942009FE0: pthread_mutex_lock (pthread_mutex_lock.c:66) ==3836== by 0x31CFE22BC3: host_table_final (hosttable.c:54) ==3836== by 0x394140F8E9: _dl_fini (dl-fini.c:252) ==3836== by 0x39418394C8: __run_exit_handlers (exit.c:82) ==3836== by 0x3941839514: exit (exit.c:104) ==3836== by 0x3941821D6B: (below main) (libc-start.c:319) Created attachment 868989 [details]
Proposed fix
It seems that the issue is in the name of the constructors/destructors. Both mysqlclient and tspi use the name "my_init", and the one responsible for calling them, is probably confused and doesn't call both.
The attached patch marks the tspi's constructor and destructor as static, thus eliminating the issue.
Reported upstream as: https://sourceforge.net/p/trousers/bugs/172/ Thanks very much Nikos. Would you mind pushing a build to Fedora Rawhide (F21) and Fedora 20 with the patch? This should allow us to build XBMC. Patch applied in trousers-0.3.11.2-3.fc21. Thanks for reporting the issue and supplying a patch. Fedora 20 too, please! trousers-0.3.11.2-3.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/trousers-0.3.11.2-3.fc20 trousers-0.3.11.2-3.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report. |