[Freeswitch-users] Is MySQL OK to use?
Anthony Minessale
anthony.minessale at gmail.com
Wed Apr 6 20:32:00 MSD 2016
There is no room for non-threadsafe code in the future of computers with
the number of cores only going up.
If they don't still have the "thread safe" version of mysql (with the _r
at the end), then all versions should be probably considered ok in threaded
env and it would indeed be a bug unless there is some documentation to
suggest they gave up on being thread safe in which case, you may want to
use postgres rather than fight the hard battle with mysql.
On Wed, Apr 6, 2016 at 11:20 AM, Michael Jerris <mike at jerris.com> wrote:
> This sounds like a bug in the mysql driver then right? If those are not
> threadsafe then the driver should protect against use where it is not safe.
>
> On Apr 6, 2016, at 5:44 AM, Steven Ayre <steveayre at gmail.com> wrote:
>
> I've been doing some debugging on this this week as we're currently seeing
> regular crashes on our production servers. This happens with both
> Threading=0 and Threading=2.
>
> It appears it's a bug in MyODBC triggered because FreeSWITCH uses a new
> ODBC environment handle every time it creates a connection.
>
> When a environment handle is created myodbc_init is called and when it's
> freed it calls myodbc_end. Those functions are not thread-safe. They're
> protected by a reference counter but they aren't wrapped in a mutex so if
> the server is busy and they're both called at the same time you can result
> in some global variables being used after they're freed.
>
> Rebuilding MyODBC with an empty myodbc_end appears to stop the crashes,
> but I'm not saying that's a good solution. Still looking at it.
>
> On 22 November 2013 at 20:31, Anthony Minessale <
> anthony.minessale at gmail.com> wrote:
>
>> I've always seen Threading=0 as the solution to stability probs.
>> Basically if the driver already uses mutexing, its better to disable the
>> arbitrary ones in the core of odbc.
>> For postgres 0 is basically mandatory.
>>
>>
>>
>> On Fri, Nov 22, 2013 at 2:12 AM, Steven Ayre <steveayre at gmail.com> wrote:
>>
>>> No such thing in the latest versions, they're all threadsafe now (_r is
>>> a symlink to the other).
>>>
>>> I use it with success. I did find stability problems in libmyodbc when
>>> upgrading from 5.0 to 5.5. My solution was to add these to odbc.ini
>>>
>>> Option = 67108864
>>> Threading = 2
>>>
>>> The Threading setting is what stopped the crashes. There's a Jira on the
>>> subject and someone else said manually upgrading to a newer version of
>>> unixodbc+myodbc also fixed it.
>>>
>>> -Steve
>>>
>>>
>>>
>>> On 21 November 2013 18:23, Jeff Leung <jleung at v10networks.ca> wrote:
>>>
>>>> Try the non-thread safe MySQL library instead of the thread safe one.
>>>>
>>>>
>>>>
>>>> *From:* freeswitch-users-bounces at lists.freeswitch.org [mailto:
>>>> freeswitch-users-bounces at lists.freeswitch.org] *On Behalf Of *Vik Killa
>>>> *Sent:* Thursday, November 21, 2013 10:22 AM
>>>> *To:* FreeSWITCH Users Help
>>>> *Subject:* Re: [Freeswitch-users] Is MySQL OK to use?
>>>>
>>>>
>>>>
>>>> short answer no.
>>>>
>>>> use postgres
>>>>
>>>>
>>>>
>>>> On Thu, Nov 21, 2013 at 12:41 PM, Alex Lake <alex at digitalmail.com>
>>>> wrote:
>>>>
>>>> I find these "Error in my_thread_global_end()" messages somewhat
>>>> annoying in my fs1.2stable on Ubuntu12.04 box. Is there any advice
>>>> (other than "don't use MySQL") for how to install it better? Might it be
>>>> something to do with thread-safe libraries (I'm using libmyodbc_r.so at
>>>> the moment)
>>>>
>>>>
>>>> _________________________________________________________________________
>>>> Professional FreeSWITCH Consulting Services:
>>>> consulting at freeswitch.org
>>>> http://www.freeswitchsolutions.com
>>>>
>>>> FreeSWITCH-powered IP PBX: The CudaTel Communication Server
>>>> http://www.cudatel.com
>>>>
>>>> Official FreeSWITCH Sites
>>>> http://www.freeswitch.org
>>>> http://wiki.freeswitch.org
>>>> http://www.cluecon.com
>>>>
>>>> FreeSWITCH-users mailing list
>>>> FreeSWITCH-users at lists.freeswitch.org
>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>> UNSUBSCRIBE:
>>>> http://lists.freeswitch.org/mailman/options/freeswitch-users
>>>> http://www.freeswitch.org
>>>>
>>>>
>>>>
>>>>
>>>> _________________________________________________________________________
>>>> Professional FreeSWITCH Consulting Services:
>>>> consulting at freeswitch.org
>>>> http://www.freeswitchsolutions.com
>>>>
>>>> FreeSWITCH-powered IP PBX: The CudaTel Communication Server
>>>> http://www.cudatel.com
>>>>
>>>> Official FreeSWITCH Sites
>>>> http://www.freeswitch.org
>>>> http://wiki.freeswitch.org
>>>> http://www.cluecon.com
>>>>
>>>> FreeSWITCH-users mailing list
>>>> FreeSWITCH-users at lists.freeswitch.org
>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>> UNSUBSCRIBE:
>>>> http://lists.freeswitch.org/mailman/options/freeswitch-users
>>>> http://www.freeswitch.org
>>>>
>>>>
>>>
>>> _________________________________________________________________________
>>> Professional FreeSWITCH Consulting Services:
>>> consulting at freeswitch.org
>>> http://www.freeswitchsolutions.com
>>>
>>> FreeSWITCH-powered IP PBX: The CudaTel Communication Server
>>> http://www.cudatel.com
>>>
>>> Official FreeSWITCH Sites
>>> http://www.freeswitch.org
>>> http://wiki.freeswitch.org
>>> http://www.cluecon.com
>>>
>>> FreeSWITCH-users mailing list
>>> FreeSWITCH-users at lists.freeswitch.org
>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>> http://www.freeswitch.org
>>>
>>>
>>
>>
>> --
>> Anthony Minessale II
>>
>> FreeSWITCH http://www.freeswitch.org/
>> ClueCon http://www.cluecon.com/
>> Twitter: http://twitter.com/FreeSWITCH_wire
>>
>> AIM: anthm
>> MSN:anthony_minessale at hotmail.com
>> GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
>> IRC: irc.freenode.net #freeswitch
>>
>> FreeSWITCH Developer Conference
>> sip:888 at conference.freeswitch.org
>> googletalk:conf+888 at conference.freeswitch.org
>> pstn:+19193869900
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> FreeSWITCH-powered IP PBX: The CudaTel Communication Server
>> http://www.cudatel.com
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://wiki.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
--
Anthony Minessale II ♬ @anthmfs ♬ @FreeSWITCH ♬
☞ http://freeswitch.org/ ☞ http://cluecon.com/ ☞
http://twitter.com/FreeSWITCH
☞ irc.freenode.net #freeswitch ☞ *http://freeswitch.org/g+
<http://freeswitch.org/g+>*
ClueCon Weekly Development Call
☎ sip:888 at conference.freeswitch.org ☎ +19193869900
https://www.youtube.com/watch?v=9XXgW34t40s
https://www.youtube.com/watch?v=NLaDpGQuZDA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20160406/ec121db5/attachment.html
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list