← Back to team overview

mysql-proxy-discuss team mailing list archive

Re: funnel - a multiplexer plugin for mysql-proxy

 

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! :)

I pushed the updates to my branch.

Expect some event-thread-based benchmarks as soon as we have some
plugin-internal statistics implemented.

Thanks guys for your help.

>
>> Cheers
>>
>
>
> cheers,
>  Jan
> --
>  jan: "Gee, Brain^WEric, what'd you wanna do tonight?"
> eric: Same thing we do everynight: Take over the HelloWorld!
>



-- 
Nick Loeve



Follow ups

References