-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
currentPinnedID is mutable state can be accessed from different threads, and there's no mutex or atomic to barrier the read/write race.
WARNING: DATA RACE
Read at 0x00c009c0d3c8 by goroutine 1721:
github.com/synadia-io/orbit.go/pcgroups.(*ElasticConsumerGroupConsumerInstance).processMembershipChange.func1()
external/com_github_synadia_io_orbit_go_pcgroups/elastic_stream_consumer_group.go:764 +0xb8
slices.IndexFunc[go.shape.[]github.com/nats-io/nats.go/jetstream.PriorityGroupState,go.shape.struct { Group string "json:\"group\""; PinnedClientID string "json:\"pinned_client_id,omitempty\""; PinnedTS time.Time "json:\"pinned_ts,omitempty\"" }]()
GOROOT/src/slices/slices.go:109 +0xdc
slices.ContainsFunc[go.shape.[]github.com/nats-io/nats.go/jetstream.PriorityGroupState,go.shape.struct { Group string "json:\"group\""; PinnedClientID string "json:\"pinned_client_id,omitempty\""; PinnedTS time.Time "json:\"pinned_ts,omitempty\"" }]()
GOROOT/src/slices/slices.go:124 +0x34
github.com/synadia-io/orbit.go/pcgroups.(*ElasticConsumerGroupConsumerInstance).processMembershipChange()
external/com_github_synadia_io_orbit_go_pcgroups/elastic_stream_consumer_group.go:763 +0xf8
github.com/synadia-io/orbit.go/pcgroups.(*ElasticConsumerGroupConsumerInstance).instanceRoutine()
external/com_github_synadia_io_orbit_go_pcgroups/elastic_stream_consumer_group.go:210 +0x68c
github.com/synadia-io/orbit.go/pcgroups.ElasticConsume.gowrap1()
external/com_github_synadia_io_orbit_go_pcgroups/elastic_stream_consumer_group.go:140 +0x4c
Previous write at 0x00c009c0d3c8 by goroutine 1782:
github.com/synadia-io/orbit.go/pcgroups.(*ElasticConsumerGroupConsumerInstance).consumerCallback()
external/com_github_synadia_io_orbit_go_pcgroups/elastic_stream_consumer_group.go:673 +0x160
github.com/synadia-io/orbit.go/pcgroups.(*ElasticConsumerGroupConsumerInstance).consumerCallback-fm()
<autogenerated>:1 +0x44
github.com/nats-io/nats.go/jetstream.(*pullConsumer).Consume.func1()
external/com_github_nats_io_nats_go/jetstream/pull.go:293 +0x398
github.com/nats-io/nats%2ego.(*Conn).waitForMsgs()
external/com_github_nats_io_nats_go/nats.go:3279 +0x50c
github.com/nats-io/nats%2ego.(*Conn).subscribeLocked.gowrap1()
external/com_github_nats_io_nats_go/nats.go:4546 +0x40
Metadata
Metadata
Assignees
Labels
No labels