Bryan Beaudreault created HBASE-28010:
-----------------------------------------
Summary: Connection attributes can become corrupted on the server
side
Key: HBASE-28010
URL: https://issues.apache.org/jira/browse/HBASE-28010
Project: HBase
Issue Type: Bug
Reporter: Bryan Beaudreault
In ServerRpcConnection.processOneRpc, it calls processConnectionHeader and then
immediately calls callCleanupIfNeeded. The parsing of the ByteBuff into the
ConnectionHeader does not copy the bytes. We keep a reference to
ConnectionHeader for later use, but since the underlying ByteBuff gets released
in callCleanupIfNeeded, later requests can override the memory locations that
the ConnectionHeader points at.
The unit tests we added dont catch this possibly because they don't send enough
requests to corrupt the buffers. It happens pretty quickly in a deployed
cluster.
We need to copy the List<NameBytesPair> from the ConnectionHeader into a Map
before the buffer is released. This probably means we should remove
getConnectionHeader from the RpcCall interface and instead add
getConnectionAttributes.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)