mysql-proxy-discuss team mailing list archive
-
mysql-proxy-discuss team
-
Mailing list archive
-
Message #00098
Re: funnel - a multiplexer plugin for mysql-proxy
On Thu, Mar 5, 2009 at 2:58 PM, nick loeve <trickie@xxxxxxxxx> wrote:
> On Thu, Mar 5, 2009 at 12:29 PM, Jan Kneschke <jan@xxxxxxxxxxx> wrote:
>> nick loeve wrote:
>>> Hi Jan
>>>
>>> On Thu, Mar 5, 2009 at 12:01 PM, Jan Kneschke <jan@xxxxxxxxxxx> wrote:
>>>> nick loeve wrote:
>>>>> Hi again,
>>>> [...]
>>>>> Ok, well i found my issue finally. If I do not add the event when
>>>>> placing a backend connection back in the connection pool, then i get
>>>>> no crash :)
>>>> Did you use event_add() or chassis_event_add_local() ? As you run
>>>> against the 0.8 tree, that's the way network-conn-pool.c handles it.
>>>> chassis_event_add_local() is taking the event_base from the TLS compared
>>>> to chassis_event_add() which is handling it asynchronously (and may move
>>>> the connection to another thread).
>>>
>>> I was using the chassis_event_add_local function to queue the idle
>>> handler, but it seems that doing the event_del in another thread when
>>> i pull it out the connection pool touches the original thread's
>>> event_base or some such. Im going to experiment now that I know where
>>> the corruption is happening.
>>
>> Yep, the _op structure is prepared for a async delete too. It isn't
>> implemented yet.
>
> I implemented it and it seemed to have fixed my issue. Finally! :)
Hmmm, it seems i spoke too soon. I still see memory corruption when I
call event_del on the server's event struct, once I pull it out of the
connection pool. Im afraid the only safe way to delete the
idle/timeout event is to call event_del from the thread that called
event_add.
Cheers
--
Nick Loeve
Follow ups
References
-
funnel - a multiplexer plugin for mysql-proxy
From: nick loeve, 2009-02-05
-
Re: funnel - a multiplexer plugin for mysql-proxy
From: Jan Kneschke, 2009-02-24
-
Re: funnel - a multiplexer plugin for mysql-proxy
From: nick loeve, 2009-03-04
-
Re: funnel - a multiplexer plugin for mysql-proxy
From: Kay Röpke, 2009-03-05
-
Re: funnel - a multiplexer plugin for mysql-proxy
From: nick loeve, 2009-03-05
-
Re: funnel - a multiplexer plugin for mysql-proxy
From: nick loeve, 2009-03-05
-
Re: funnel - a multiplexer plugin for mysql-proxy
From: Jan Kneschke, 2009-03-05
-
Re: funnel - a multiplexer plugin for mysql-proxy
From: nick loeve, 2009-03-05
-
Re: funnel - a multiplexer plugin for mysql-proxy
From: Jan Kneschke, 2009-03-05
-
Re: funnel - a multiplexer plugin for mysql-proxy
From: nick loeve, 2009-03-05