Skip to content
This repository was archived by the owner on Aug 23, 2023. It is now read-only.

idx data race #1152

Closed
Dieterbe opened this issue Nov 26, 2018 · 5 comments
Closed

idx data race #1152

Dieterbe opened this issue Nov 26, 2018 · 5 comments
Labels

Comments

@Dieterbe
Copy link
Contributor

Dieterbe commented Nov 26, 2018

WARNING: DATA RACE
Read at 0x00c0023a4070 by goroutine 65:
  github.com/grafana/metrictank/idx/memory.(*MemoryIdx).Get()
      /home/dieter/go/src/github.com/grafana/metrictank/idx/memory/memory.go:512 +0x1c7
  github.com/grafana/metrictank/idx/cassandra.(*CasIdx).Get()
      <autogenerated>:1 +0xf5
  github.com/grafana/metrictank/mdata/notifierKafka.(*NotifierKafka).flush()
      /home/dieter/go/src/github.com/grafana/metrictank/mdata/notifierKafka/notifierKafka.go:220 +0x487
  github.com/grafana/metrictank/mdata/notifierKafka.(*NotifierKafka).produce()
      /home/dieter/go/src/github.com/grafana/metrictank/mdata/notifierKafka/notifierKafka.go:198 +0x194

Previous write at 0x00c0023a4070 by goroutine 689:
  sync/atomic.SwapInt32()
      /usr/lib/go/src/runtime/race_amd64.s:249 +0xb
  github.com/grafana/metrictank/idx/memory.(*MemoryIdx).Update()
      /home/dieter/go/src/github.com/grafana/metrictank/idx/memory/memory.go:265 +0x1fc
  github.com/grafana/metrictank/idx/cassandra.(*CasIdx).Update()
      /home/dieter/go/src/github.com/grafana/metrictank/idx/cassandra/cassandra.go:267 +0x151
  github.com/grafana/metrictank/input.DefaultHandler.ProcessMetricPoint()
      /home/dieter/go/src/github.com/grafana/metrictank/input/input.go:74 +0x1f6
  github.com/grafana/metrictank/input.(*DefaultHandler).ProcessMetricPoint()
      <autogenerated>:1 +0x12e
  github.com/grafana/metrictank/input/kafkamdm.(*KafkaMdm).handleMsg()
      /home/dieter/go/src/github.com/grafana/metrictank/input/kafkamdm/kafkamdm.go:344 +0x26c
  github.com/grafana/metrictank/input/kafkamdm.(*KafkaMdm).consumePartition()
      /home/dieter/go/src/github.com/grafana/metrictank/input/kafkamdm/kafkamdm.go:310 +0x7da

Goroutine 65 (running) created at:
  github.com/grafana/metrictank/mdata/notifierKafka.New()
      /home/dieter/go/src/github.com/grafana/metrictank/mdata/notifierKafka/notifierKafka.go:66 +0x4f8
  main.main()
      /home/dieter/go/src/github.com/grafana/metrictank/cmd/metrictank/metrictank.go:394 +0x2824

Goroutine 689 (running) created at:
  github.com/grafana/metrictank/input/kafkamdm.(*KafkaMdm).Start()
      /home/dieter/go/src/github.com/grafana/metrictank/input/kafkamdm/kafkamdm.go:220 +0x171
  main.main()
      /home/dieter/go/src/github.com/grafana/metrictank/cmd/metrictank/metrictank.go:411 +0x1de1
==================

using chunk-4h-sparse-bugfix-longterm / 0.10.1-254-g1a3346d5 / 1a3346d566840a0863f4ec1c413485cd3f23394c

this one seems similar:

WARNING: DATA RACE
Read at 0x00c001c54070 by goroutine 65:
  github.com/grafana/metrictank/idx/memory.(*MemoryIdx).Get()
      /home/dieter/go/src/github.com/grafana/metrictank/idx/memory/memory.go:512 +0x1c7
  github.com/grafana/metrictank/idx/cassandra.(*CasIdx).Get()
      <autogenerated>:1 +0xf5
  github.com/grafana/metrictank/mdata/notifierKafka.(*NotifierKafka).flush()
      /home/dieter/go/src/github.com/grafana/metrictank/mdata/notifierKafka/notifierKafka.go:220 +0x487
  github.com/grafana/metrictank/mdata/notifierKafka.(*NotifierKafka).produce()
      /home/dieter/go/src/github.com/grafana/metrictank/mdata/notifierKafka/notifierKafka.go:198 +0x194

Previous write at 0x00c001c54070 by goroutine 691:
  [failed to restore the stack]

Goroutine 65 (running) created at:
  github.com/grafana/metrictank/mdata/notifierKafka.New()
      /home/dieter/go/src/github.com/grafana/metrictank/mdata/notifierKafka/notifierKafka.go:66 +0x4f8
  main.main()
      /home/dieter/go/src/github.com/grafana/metrictank/cmd/metrictank/metrictank.go:394 +0x2824

Goroutine 691 (running) created at:
  github.com/grafana/metrictank/input/kafkamdm.(*KafkaMdm).Start()
      /home/dieter/go/src/github.com/grafana/metrictank/input/kafkamdm/kafkamdm.go:220 +0x171
  main.main()
      /home/dieter/go/src/github.com/grafana/metrictank/cmd/metrictank/metrictank.go:411 +0x1de1
@Dieterbe
Copy link
Contributor Author

also:

WARNING: DATA RACE
Write at 0x00c0023a4068 by goroutine 689:
  sync/atomic.SwapInt64()
      /usr/lib/go/src/runtime/race_amd64.s:254 +0xb
  github.com/grafana/metrictank/idx/memory.bumpLastUpdate()
      /home/dieter/go/src/github.com/grafana/metrictank/idx/memory/memory.go:244 +0x42
  github.com/grafana/metrictank/idx/memory.(*MemoryIdx).Update()
      /home/dieter/go/src/github.com/grafana/metrictank/idx/memory/memory.go:263 +0x1df
  github.com/grafana/metrictank/idx/cassandra.(*CasIdx).Update()
      /home/dieter/go/src/github.com/grafana/metrictank/idx/cassandra/cassandra.go:267 +0x151
  github.com/grafana/metrictank/input.DefaultHandler.ProcessMetricPoint()
      /home/dieter/go/src/github.com/grafana/metrictank/input/input.go:74 +0x1f6
  github.com/grafana/metrictank/input.(*DefaultHandler).ProcessMetricPoint()
      <autogenerated>:1 +0x12e
  github.com/grafana/metrictank/input/kafkamdm.(*KafkaMdm).handleMsg()
      /home/dieter/go/src/github.com/grafana/metrictank/input/kafkamdm/kafkamdm.go:344 +0x26c
  github.com/grafana/metrictank/input/kafkamdm.(*KafkaMdm).consumePartition()
      /home/dieter/go/src/github.com/grafana/metrictank/input/kafkamdm/kafkamdm.go:310 +0x7da

Previous read at 0x00c0023a4068 by goroutine 65:
  [failed to restore the stack]

Goroutine 689 (running) created at:
  github.com/grafana/metrictank/input/kafkamdm.(*KafkaMdm).Start()
      /home/dieter/go/src/github.com/grafana/metrictank/input/kafkamdm/kafkamdm.go:220 +0x171
  main.main()
      /home/dieter/go/src/github.com/grafana/metrictank/cmd/metrictank/metrictank.go:411 +0x1de1

Goroutine 65 (running) created at:
  github.com/grafana/metrictank/mdata/notifierKafka.New()
      /home/dieter/go/src/github.com/grafana/metrictank/mdata/notifierKafka/notifierKafka.go:66 +0x4f8
  main.main()
      /home/dieter/go/src/github.com/grafana/metrictank/cmd/metrictank/metrictank.go:394 +0x2824

@Dieterbe
Copy link
Contributor Author

WARNING: DATA RACE
Write at 0x00c00241c388 by goroutine 689:
  sync/atomic.SwapInt64()
      /usr/lib/go/src/runtime/race_amd64.s:254 +0xb
  github.com/grafana/metrictank/idx/memory.bumpLastUpdate()
      /home/dieter/go/src/github.com/grafana/metrictank/idx/memory/memory.go:244 +0x42
  github.com/grafana/metrictank/idx/memory.(*MemoryIdx).Update()
      /home/dieter/go/src/github.com/grafana/metrictank/idx/memory/memory.go:263 +0x1df
  github.com/grafana/metrictank/idx/cassandra.(*CasIdx).Update()
      /home/dieter/go/src/github.com/grafana/metrictank/idx/cassandra/cassandra.go:267 +0x151
  github.com/grafana/metrictank/input.DefaultHandler.ProcessMetricPoint()
      /home/dieter/go/src/github.com/grafana/metrictank/input/input.go:74 +0x1f6
  github.com/grafana/metrictank/input.(*DefaultHandler).ProcessMetricPoint()
      <autogenerated>:1 +0x12e
  github.com/grafana/metrictank/input/kafkamdm.(*KafkaMdm).handleMsg()
      /home/dieter/go/src/github.com/grafana/metrictank/input/kafkamdm/kafkamdm.go:344 +0x26c
  github.com/grafana/metrictank/input/kafkamdm.(*KafkaMdm).consumePartition()
      /home/dieter/go/src/github.com/grafana/metrictank/input/kafkamdm/kafkamdm.go:310 +0x7da

Previous read at 0x00c00241c388 by goroutine 65:
  github.com/grafana/metrictank/idx/memory.(*MemoryIdx).Get()
      /home/dieter/go/src/github.com/grafana/metrictank/idx/memory/memory.go:512 +0x1c7
  github.com/grafana/metrictank/idx/cassandra.(*CasIdx).Get()
      <autogenerated>:1 +0xf5
  github.com/grafana/metrictank/mdata/notifierKafka.(*NotifierKafka).flush()
      /home/dieter/go/src/github.com/grafana/metrictank/mdata/notifierKafka/notifierKafka.go:220 +0x487
  github.com/grafana/metrictank/mdata/notifierKafka.(*NotifierKafka).produce()
      /home/dieter/go/src/github.com/grafana/metrictank/mdata/notifierKafka/notifierKafka.go:198 +0x194

Goroutine 689 (running) created at:
  github.com/grafana/metrictank/input/kafkamdm.(*KafkaMdm).Start()
      /home/dieter/go/src/github.com/grafana/metrictank/input/kafkamdm/kafkamdm.go:220 +0x171
  main.main()
      /home/dieter/go/src/github.com/grafana/metrictank/cmd/metrictank/metrictank.go:411 +0x1de1

Goroutine 65 (running) created at:
  github.com/grafana/metrictank/mdata/notifierKafka.New()
      /home/dieter/go/src/github.com/grafana/metrictank/mdata/notifierKafka/notifierKafka.go:66 +0x4f8
  main.main()
      /home/dieter/go/src/github.com/grafana/metrictank/cmd/metrictank/metrictank.go:394 +0x2824

@Dieterbe
Copy link
Contributor Author

WARNING: DATA RACE
Write at 0x00c002483f10 by goroutine 96:
  sync/atomic.SwapInt32()
      /usr/lib/go/src/runtime/race_amd64.s:249 +0xb
  github.com/grafana/metrictank/idx/memory.(*MemoryIdx).Update()
      /home/dieter/go/src/github.com/grafana/metrictank/idx/memory/memory.go:265 +0x1fc
  github.com/grafana/metrictank/idx/cassandra.(*CasIdx).Update()
      /home/dieter/go/src/github.com/grafana/metrictank/idx/cassandra/cassandra.go:267 +0x151
  github.com/grafana/metrictank/input.DefaultHandler.ProcessMetricPoint()
      /home/dieter/go/src/github.com/grafana/metrictank/input/input.go:74 +0x1f6
  github.com/grafana/metrictank/input.(*DefaultHandler).ProcessMetricPoint()
      <autogenerated>:1 +0x12e
  github.com/grafana/metrictank/input/kafkamdm.(*KafkaMdm).handleMsg()
      /home/dieter/go/src/github.com/grafana/metrictank/input/kafkamdm/kafkamdm.go:344 +0x26c
  github.com/grafana/metrictank/input/kafkamdm.(*KafkaMdm).consumePartition()
      /home/dieter/go/src/github.com/grafana/metrictank/input/kafkamdm/kafkamdm.go:310 +0x7da

Previous read at 0x00c002483f10 by goroutine 65:
  [failed to restore the stack]

Goroutine 96 (running) created at:
  github.com/grafana/metrictank/input/kafkamdm.(*KafkaMdm).Start()
      /home/dieter/go/src/github.com/grafana/metrictank/input/kafkamdm/kafkamdm.go:220 +0x171
  main.main()
      /home/dieter/go/src/github.com/grafana/metrictank/cmd/metrictank/metrictank.go:411 +0x1de1

Goroutine 65 (running) created at:
  github.com/grafana/metrictank/mdata/notifierKafka.New()
      /home/dieter/go/src/github.com/grafana/metrictank/mdata/notifierKafka/notifierKafka.go:66 +0x4f8
  main.main()
      /home/dieter/go/src/github.com/grafana/metrictank/cmd/metrictank/metrictank.go:394 +0x2824

@Dieterbe
Copy link
Contributor Author

WARNING: DATA RACE
Read at 0x00c001e6a250 by goroutine 669:
  github.com/grafana/metrictank/idx/memory.(*MemoryIdx).Get()
      /home/dieter/go/src/github.com/grafana/metrictank/idx/memory/memory.go:512 +0x1c7
  github.com/grafana/metrictank/idx/cassandra.(*CasIdx).Get()
      <autogenerated>:1 +0xf5
  github.com/grafana/metrictank/mdata.Handle()
      /home/dieter/go/src/github.com/grafana/metrictank/mdata/notifier.go:69 +0x444
  github.com/grafana/metrictank/mdata/notifierKafka.(*NotifierKafka).consumePartition()
      /home/dieter/go/src/github.com/grafana/metrictank/mdata/notifierKafka/notifierKafka.go:140 +0xcb8

Previous write at 0x00c001e6a250 by goroutine 689:
  [failed to restore the stack]

Goroutine 669 (running) created at:
  github.com/grafana/metrictank/mdata/notifierKafka.(*NotifierKafka).start()
      /home/dieter/go/src/github.com/grafana/metrictank/mdata/notifierKafka/notifierKafka.go:95 +0x158
  github.com/grafana/metrictank/mdata/notifierKafka.New()
      /home/dieter/go/src/github.com/grafana/metrictank/mdata/notifierKafka/notifierKafka.go:65 +0x4d3
  main.main()
      /home/dieter/go/src/github.com/grafana/metrictank/cmd/metrictank/metrictank.go:394 +0x2824

Goroutine 689 (running) created at:
  github.com/grafana/metrictank/input/kafkamdm.(*KafkaMdm).Start()
      /home/dieter/go/src/github.com/grafana/metrictank/input/kafkamdm/kafkamdm.go:220 +0x171
  main.main()
      /home/dieter/go/src/github.com/grafana/metrictank/cmd/metrictank/metrictank.go:411 +0x1de1

@stale
Copy link

stale bot commented Apr 4, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 4, 2020
@stale stale bot closed this as completed Apr 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant