Closed krconv closed 5 years ago
I believe that I've traced the issue down to this section of code in client.cpp:1976
. In the corruption case, the messages pushed onto consumedPartitionContent
end up getting overwritten when the next message is processed (i.e. when process_consumed
is called again during the same poll()
). I think a quick fix is to remove this optimization and always allocate a new space for the message, but I don't know how that would impact performance.
if (i == topicsCnt - 1 && k == partitionsCnt - 1) {
// optimization
consumedPartitionContent.push_back({clientReqId, topicName, partitionId, {consumptionList.data() + consumption_list_base, static_cast<unsigned int>(consumed_cnt)}, true, {next, lastPartialMsgMinFetchSize}});
} else {
...
}
I can provide the debugging information that I have if useful too.
Thank you for the report. There is a new TANK server and client release currently under testing which fixes this and other problems reported by other users. It will be a few more days before it’s ready for a public release but it’s worrh it believe. Many new features and performance improvements.
@krconv you can certainly explicitly disable that optimisation and it should work fine until the new release is pushed upstream
Thanks for the help!
When the client receives multiple consume messages during a single
poll()
period, there seems to be a problem where some of the messages' contents returned byconsumed()
are corrupted/bad pointers. This can cause errors due to the corruptedchar* data()
pointer orsize_t size()
forconsumed_msg
, such as aSEGFAULT
.I've created this branch to reproduce the issue: https://github.com/krconv/TANK/tree/client-tests
My output: