]
Will Burns reassigned ISPN-11885:
---------------------------------
Assignee: Will Burns
ChannelPool can get in inconsistent state with concurrent release and
close of a channel
----------------------------------------------------------------------------------------
Key: ISPN-11885
URL:
https://issues.redhat.com/browse/ISPN-11885
Project: Infinispan
Issue Type: Bug
Components: Hot Rod
Affects Versions: 10.1.8.Final
Reporter: Will Burns
Assignee: Will Burns
Priority: Major
Fix For: 11.0.0.CR1
While working on
https://github.com/infinispan/infinispan/pull/8358 I found that the
changes introduced allowed for a test failure to occur much more often. Upon investigation
the issue is that the channel pool can close a channel and then release it which gets it
in an inconsistent state.
Looking closer it appears to be a bug in the ChannelPool class when a connection is
closed before release completes.
{code}
23:42:12,203 TRACE (DistributionRetryTest-Client-Async-1-2:[]) [ChannelPool] Closed
channel [id: 0x27befd37, L:/127.0.0.1:37412 ! R:127.0.0.1/127.0.0.1:33943], created = 0,
idle = false, active = 0
23:42:12,203 TRACE (testng-DistributionRetryTest:[]) [ChannelPool] Released channel [id:
0x27befd37, L:/127.0.0.1:37412 ! R:127.0.0.1/127.0.0.1:33943], active = -1
{code}
Here is the trace of it working where is is released before being closed.
{code}
23:46:42,649 TRACE (testng-DistributionRetryTest:[]) [ChannelPool] Released channel [id:
0xeb9159ef, L:/127.0.0.1:39342 - R:127.0.0.1/127.0.0.1:41537], active = 0
23:46:42,792 TRACE (testng-DistributionRetryTest:[]) [ChannelPool] Activated record [id:
0x0b71d548, L:/127.0.0.1:51392 - R:127.0.0.1/127.0.0.1:37881], created = 1, active = 1
23:46:42,793 TRACE (DistributionRetryTest-Client-Async-1-3:[]) [ChannelPool] Closed
channel [id: 0xeb9159ef, L:/127.0.0.1:39342 ! R:127.0.0.1/127.0.0.1:41537], created = 0,
idle = true, active = 0
{code}