Open alexey-milovidov opened 10 months ago
@ilejn found the probably cause for this datarace:
One thread gets counter in statistic callback, another thread sets this counter to zero because of rebalance.
Yeah, it should be solved by using the atomic rd_atomic32_set
instead of rd_atomic32_init
, as the source buffer isn't being used for the first time, it's either the rkb->rkb_waitresps
or rkb->rkb_outbufs
and those buffers are being concatenated to a temp buffer queue.
Yeah, it should be solved by using the atomic
rd_atomic32_set
instead ofrd_atomic32_init
, as the source buffer isn't being used for the first time, it's either therkb->rkb_waitresps
orrkb->rkb_outbufs
and those buffers are being concatenated to a temp buffer queue.
Yes, thanks @emasab , this is correct until the branch in rd_atomic32_set is
return ra->val = v; // FIXME
#endif
Fortunately we do have HAVE_ATOMICS_32_ATOMIC defined in ClickHouse :)
@ilejn Can this issue be closed?
@nhaq-confluent Can this issue be closed?
Hello @nhaq-confluent , the problem is fixed in ClickHouse librdkafka fork https://github.com/ClickHouse/librdkafka/pull/10 but as far as I can see it is not fixed in confluentinc/librdkafka master. Honestly I was sure that I had created a PR in confluentinc/librdkafka, but it seems that it is not true. Should I?
@ilejn if you can, that would be useful. We are in the process of closing out some of our issues and PR's. The PR would be easier for us to resolve as we go through everything.
Description
https://github.com/ClickHouse/ClickHouse/issues/56043
How to reproduce
Run ClickHouse integration tests with TSan until it reproduces.
Checklist
IMPORTANT: We will close issues where the checklist has not been completed.
Please provide the following information:
confluentinc/cp-kafka:5.2.0
<REPLACE with e.g., message.timeout.ms=123, auto.reset.offset=earliest, ..>
Linux Ubuntu 22.04
debug=..
as necessary) from librdkafka