You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Ryan Schmitt <rs...@apache.org> on 2021/06/18 22:49:56 UTC

New race condition confirmed

I've finally found the race condition I've been looking for. Here's
the reproducer:

https://github.com/rschmitt/httpclient-benchmark/commit/master

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Re: New race condition confirmed

Posted by Kalnichevski Oleg <ol...@ok2consulting.com>.
Hi Ryan

I can reproduce the defect and I think I know the root cause of it. I am 
still unsure, though, of the best way of dealing with the problem.

Please take a look at

https://github.com/apache/httpcomponents-client/pull/309

This is not a final fix. This PR is presently just a demonstrator and a 
place where we could discuss alternative approaches.

Cheers

Oleg

On 6/19/2021 7:33 PM, Ryan Schmitt wrote:
> I'm not sure what the proper fix would be, since I don't currently
> understand the CancellableDependency logic. I did find that deleting
> the `throw` statement at InternalExecRuntime.java:109 allows the pool
> entry to be cleaned up if it is already allocated, without any other
> apparent regressions or changes in behavior.
> 
> On Sat, Jun 19, 2021 at 4:46 AM Oleg Kalnichevski <ol...@apache.org> wrote:
>>
>> Hi Ryan
>>
>> Do you want to look into it or do you have a fix in mind?
>>
>> Olegg
>>
>> On 6/19/2021 12:49 AM, Ryan Schmitt wrote:
>>> I've finally found the race condition I've been looking for. Here's
>>> the reproducer:
>>>
>>> https://github.com/rschmitt/httpclient-benchmark/commit/master
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
>>> For additional commands, e-mail: dev-help@hc.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
>> For additional commands, e-mail: dev-help@hc.apache.org
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Re: New race condition confirmed

Posted by Oleg Kalnichevski <ol...@apache.org>.
I will look into it and come up with a fix.

Oleg

On 6/19/2021 7:33 PM, Ryan Schmitt wrote:
> I'm not sure what the proper fix would be, since I don't currently
> understand the CancellableDependency logic. I did find that deleting
> the `throw` statement at InternalExecRuntime.java:109 allows the pool
> entry to be cleaned up if it is already allocated, without any other
> apparent regressions or changes in behavior.
> 
> On Sat, Jun 19, 2021 at 4:46 AM Oleg Kalnichevski <ol...@apache.org> wrote:
>>
>> Hi Ryan
>>
>> Do you want to look into it or do you have a fix in mind?
>>
>> Olegg
>>
>> On 6/19/2021 12:49 AM, Ryan Schmitt wrote:
>>> I've finally found the race condition I've been looking for. Here's
>>> the reproducer:
>>>
>>> https://github.com/rschmitt/httpclient-benchmark/commit/master
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
>>> For additional commands, e-mail: dev-help@hc.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
>> For additional commands, e-mail: dev-help@hc.apache.org
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Re: New race condition confirmed

Posted by Ryan Schmitt <rs...@apache.org>.
I'm not sure what the proper fix would be, since I don't currently
understand the CancellableDependency logic. I did find that deleting
the `throw` statement at InternalExecRuntime.java:109 allows the pool
entry to be cleaned up if it is already allocated, without any other
apparent regressions or changes in behavior.

On Sat, Jun 19, 2021 at 4:46 AM Oleg Kalnichevski <ol...@apache.org> wrote:
>
> Hi Ryan
>
> Do you want to look into it or do you have a fix in mind?
>
> Olegg
>
> On 6/19/2021 12:49 AM, Ryan Schmitt wrote:
> > I've finally found the race condition I've been looking for. Here's
> > the reproducer:
> >
> > https://github.com/rschmitt/httpclient-benchmark/commit/master
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> > For additional commands, e-mail: dev-help@hc.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Re: New race condition confirmed

Posted by Oleg Kalnichevski <ol...@apache.org>.
Hi Ryan

Do you want to look into it or do you have a fix in mind?

Olegg

On 6/19/2021 12:49 AM, Ryan Schmitt wrote:
> I've finally found the race condition I've been looking for. Here's
> the reproducer:
> 
> https://github.com/rschmitt/httpclient-benchmark/commit/master
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org