Skip to content

[v2.2.0] DATA RACE  #568

Closed
Closed
@oRookie

Description

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

Metadata

Assignees

No one assigned

    Labels

    discussSomething undering disscussinghelp wantedExtra attention is neededstale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions