You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2020/12/11 07:43:35 UTC

[GitHub] [rocketmq-client-go] oRookie opened a new issue #568: [master] DATA RACE

oRookie opened a new issue #568:
URL: https://github.com/apache/rocketmq-client-go/issues/568


   A race condition occurred when starting the consumer
   
   ==================
   WARNING: DATA RACE
   Write at 0x00c0003081e0 by goroutine 58:
     github.com/apache/rocketmq-client-go/v2/consumer.(*pushConsumer).pullMessage()
     github.com/apache/rocketmq-client-go/v2@v2.1.0-rc5/consumer/push_consumer.go:471 
     github.com/apache/rocketmq-client-go/v2@v2.1.0-rc5/consumer/push_consumer.go:156 
   
   Previous read at 0x00c00065a120 by goroutine 71:
     github.com/apache/rocketmq-client-go/v2/consumer.(*processQueue).isPullExpired()
       github.com/apache/rocketmq-client-go/v2@v2.0.0/consumer/process_queue.go:198 +0x6d
     github.com/apache/rocketmq-client-go/v2/consumer.(*defaultConsumer).updateProcessQueueTable.func1()
        github.com/apache/rocketmq-client-go/v2@v2.0.0/consumer/consumer.go:673 +0x28c
     sync.(*Map).Range()
         /usr/local/go/src/sync/map.go:345 +0x16b
     github.com/apache/rocketmq-client-go/v2/consumer.(*defaultConsumer).updateProcessQueueTable()
       github.com/apache/rocketmq-client-go/v2@v2.0.0/consumer/consumer.go:659 +0x1e6
     github.com/apache/rocketmq-client-go/v2/consumer.(*defaultConsumer).doBalance.func1()
         github.com/apache/rocketmq-client-go/v2@v2.0.0/consumer/consumer.go:409 +0x484
     sync.(*Map).Range()
         /usr/local/go/src/sync/map.go:345 +0x16b
     github.com/apache/rocketmq-client-go/v2/consumer.(*defaultConsumer).doBalance()
         github.com/apache/rocketmq-client-go/v2@v2.0.0/consumer/consumer.go:362 +0x64
     github.com/apache/rocketmq-client-go/v2/consumer.(*pushConsumer).Rebalance()
         github.com/apache/rocketmq-client-go/v2@v2.0.0/consumer/push_consumer.go:247 +0x4b
     github.com/apache/rocketmq-client-go/v2/internal.(*rmqClient).RebalanceImmediately.func1()
        github.com/apache/rocketmq-client-go/v2@v2.0.0/internal/client.go:680 +0x62
     sync.(*Map).Range()
         /usr/local/go/src/sync/map.go:345 +0x16b
     github.com/apache/rocketmq-client-go/v2/internal.(*rmqClient).RebalanceImmediately()
       github.com/apache/rocketmq-client-go/v2@v2.0.0/internal/client.go:678 +0x9a
     github.com/apache/rocketmq-client-go/v2/consumer.(*pushConsumer).Start()
        github.com/apache/rocketmq-client-go/v2@v2.0.0/consumer/push_consumer.go:206 +0x410
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-client-go] xxd763795151 commented on issue #568: [v2.2.0] DATA RACE

Posted by GitBox <gi...@apache.org>.
xxd763795151 commented on issue #568:
URL: https://github.com/apache/rocketmq-client-go/issues/568#issuecomment-753734273


   We also have a similar problem: 
   conditon:
   * one consumer group subscribe multi topic
   * message has accumulated a lot when starting the consumer client
   log info:
   > WARNING: DATA RACE
   > Read at 0x00c0006b6a88 by goroutine 272:
   >   github.com/apache/rocketmq-client-go/v2/consumer.(*pushConsumer).pullMessage()
   >       /data/ci_build/finance/sg-finance-ledger/f576b2dc_20201231191943/vendor/github.com/apache/rocketmq-client-go/v2/consumer/push_consumer.go:488 +0xac2
   >   github.com/apache/rocketmq-client-go/v2/consumer.(*pushConsumer).Start.func1.1.1()
   >       /data/ci_build/finance/sg-finance-ledger/f576b2dc_20201231191943/vendor/github.com/apache/rocketmq-client-go/v2/consumer/push_consumer.go:156 +0x42
   > 
   > Previous write at 0x00c0006b6a88 by goroutine 326:
   >   sync/atomic.AddInt64()
   >       /usr/local/go1.14.7/src/runtime/race_amd64.s:276 +0xb
   >   github.com/apache/rocketmq-client-go/v2/consumer.(*processQueue).removeMessage()
   >       /data/ci_build/finance/sg-finance-ledger/f576b2dc_20201231191943/vendor/github.com/apache/rocketmq-client-go/v2/consumer/process_queue.go:181 +0x2c1
   >   github.com/apache/rocketmq-client-go/v2/consumer.(*pushConsumer).consumeMessageCurrently.func1()
   >       /data/ci_build/finance/sg-finance-ledger/f576b2dc_20201231191943/vendor/github.com/apache/rocketmq-client-go/v2/consumer/push_consumer.go:941 +0xa35
   >   github.com/apache/rocketmq-client-go/v2/primitive.WithRecover()
   >       /data/ci_build/finance/sg-finance-ledger/f576b2dc_20201231191943/vendor/github.com/apache/rocketmq-client-go/v2/primitive/base.go:96 +0x5a
   > 
   > Goroutine 272 (running) created at:
   >   github.com/apache/rocketmq-client-go/v2/consumer.(*pushConsu mer).Start.func1.1()
   >       /data/ci_build/finance/sg-finance-ledger/f576b2dc_20201231191943/vendor/github.com/apache/rocketmq-client-go/v2/consumer/push_consumer.go:155 +0x6b
   > 
   > Goroutine 326 (running) created at:
   >   github.com/apache/rocketmq-client-go/v2/consumer.(*pushConsumer).consumeMessageCurrently()
   >       /data/ci_build/finance/sg-finance-ledger/f576b2dc_20201231191943/vendor/github.com/apache/rocketmq-client-go/v2/consumer/push_consumer.go:875 +0xe6
   >   github.com/apache/rocketmq-client-go/v2/consumer.(*pushConsumer).consumeMessageCurrently-fm()
   >       /data/ci_build/finance/sg-finance-ledger/f576b2dc_20201231191943/vendor/github.com/apache/rocketmq-client-go/v2/consumer/push_consumer.go:860 +0x55
   >   github.com/apache/rocketmq-client-go/v2/consumer.(*pushConsumer).pullMessage.func1()
   >       /data/ci_build/finance/sg-finance-ledger/f576b2dc_20201231191943/vendor/github.com/apache/rocketmq-client-go/v2/consumer/push_consumer.go:443 +0xbc
   >   github.com/apache/rocketmq-client-go/v2/primitive.WithRecover()
   >       /data/ci_build/finance/sg-finance-ledger/f576b2dc_20201231191943/vendor/github.com/apache/rocketmq-client-go/v2/primitive/base.go:96 +0x5a


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org