revid: data races

Issue #3 resolved
kortschak created an issue

It's pretty clear there are data races in the revid data flow from inspection. But here are concrete detections of them

==================
WARNING: DATA RACE
Write at 0x00c420248100 by main goroutine:
  bitbucket.org/ausocean/av/revid.(*Revid).Stop()
      /home/xxxx/src/bitbucket.org/ausocean/av/revid/revid.go:273 +0x9d
  main.stopRevid()
      /home/xxxx/src/bitbucket.org/ausocean/av/cmd/revid-cli/main.go:351 +0x4a
  main.updateRevid()
      /home/xxxx/src/bitbucket.org/ausocean/av/cmd/revid-cli/main.go:360 +0xfd3
  main.main()
      /home/xxxx/src/bitbucket.org/ausocean/av/cmd/revid-cli/main.go:293 +0xf09

Previous read at 0x00c420248100 by goroutine 34:
  bitbucket.org/ausocean/av/revid.(*Revid).packClips()
      /home/xxxx/src/bitbucket.org/ausocean/av/revid/revid.go:309 +0x5e

Goroutine 34 (running) created at:
  bitbucket.org/ausocean/av/revid.(*Revid).Start()
      /home/xxxx/src/bitbucket.org/ausocean/av/revid/revid.go:256 +0x1ce
  main.startRevid()
      /home/xxxx/src/bitbucket.org/ausocean/av/cmd/revid-cli/main.go:333 +0x4f
  main.main()
      /home/xxxx/src/bitbucket.org/ausocean/av/cmd/revid-cli/main.go:266 +0xf52
==================
==================
WARNING: DATA RACE
Write at 0x00c42017c279 by main goroutine:
  bitbucket.org/ausocean/av/generator.(*flvGenerator).Stop()
      /home/xxxx/src/bitbucket.org/ausocean/av/generator/flv_generator.go:99 +0x3c
  bitbucket.org/ausocean/av/revid.(*Revid).Stop()
      /home/xxxx/src/bitbucket.org/ausocean/av/revid/revid.go:277 +0x2c7
  main.stopRevid()
      /home/xxxx/src/bitbucket.org/ausocean/av/cmd/revid-cli/main.go:351 +0x4a
  main.updateRevid()
      /home/xxxx/src/bitbucket.org/ausocean/av/cmd/revid-cli/main.go:360 +0xfd3
  main.main()
      /home/xxxx/src/bitbucket.org/ausocean/av/cmd/revid-cli/main.go:293 +0xf09

Previous read at 0x00c42017c279 by goroutine 35:
  bitbucket.org/ausocean/av/generator.(*flvGenerator).generate()
      /home/xxxx/src/bitbucket.org/ausocean/av/generator/flv_generator.go:191 +0x37b

Goroutine 35 (running) created at:
  bitbucket.org/ausocean/av/generator.(*flvGenerator).Start()
      /home/xxxx/src/bitbucket.org/ausocean/av/generator/flv_generator.go:95 +0x62
  bitbucket.org/ausocean/av/revid.(*Revid).Start()
      /home/xxxx/src/bitbucket.org/ausocean/av/revid/revid.go:258 +0x238
  main.startRevid()
      /home/xxxx/src/bitbucket.org/ausocean/av/cmd/revid-cli/main.go:333 +0x4f
  main.main()
      /home/xxxx/src/bitbucket.org/ausocean/av/cmd/revid-cli/main.go:266 +0xf52
==================
==================
WARNING: DATA RACE
Write at 0x00c42021c098 by main goroutine:
  bitbucket.org/ausocean/av/parser.(*H264).Stop()
      /home/xxxx/src/bitbucket.org/ausocean/av/parser/h264.go:64 +0x3c
  bitbucket.org/ausocean/av/revid.(*Revid).Stop()
      /home/xxxx/src/bitbucket.org/ausocean/av/revid/revid.go:282 +0x292
  main.stopRevid()
      /home/xxxx/src/bitbucket.org/ausocean/av/cmd/revid-cli/main.go:351 +0x4a
  main.updateRevid()
      /home/xxxx/src/bitbucket.org/ausocean/av/cmd/revid-cli/main.go:360 +0xfd3
  main.main()
      /home/xxxx/src/bitbucket.org/ausocean/av/cmd/revid-cli/main.go:293 +0xf09

Previous read at 0x00c42021c098 by goroutine 36:
  bitbucket.org/ausocean/av/parser.(*H264).parse()
      /home/xxxx/src/bitbucket.org/ausocean/av/parser/h264.go:113 +0xcf

Goroutine 36 (running) created at:
  bitbucket.org/ausocean/av/parser.(*H264).Start()
      /home/xxxx/src/bitbucket.org/ausocean/av/parser/h264.go:70 +0x62
  bitbucket.org/ausocean/av/revid.(*Revid).Start()
      /home/xxxx/src/bitbucket.org/ausocean/av/revid/revid.go:260 +0x2a2
  main.startRevid()
      /home/xxxx/src/bitbucket.org/ausocean/av/cmd/revid-cli/main.go:333 +0x4f
  main.main()
      /home/xxxx/src/bitbucket.org/ausocean/av/cmd/revid-cli/main.go:266 +0xf52
==================
size: 9
too small
==================
WARNING: DATA RACE
Read at 0x00c4202484c0 by main goroutine:
  main.sendTo()
      /home/xxxx/src/bitbucket.org/ausocean/av/revid/revid.go:119 +0x1ed
  main.main()
      /home/xxxx/src/bitbucket.org/ausocean/av/cmd/revid-cli/main.go:271 +0xb6a

Previous write at 0x00c4202484c0 by goroutine 85:
  bitbucket.org/ausocean/av/revid.(*Revid).outputClips()
      /home/xxxx/src/bitbucket.org/ausocean/av/revid/revid.go:419 +0x42b

Goroutine 85 (running) created at:
  bitbucket.org/ausocean/av/revid.(*Revid).Start()
      /home/xxxx/src/bitbucket.org/ausocean/av/revid/revid.go:254 +0x174
  main.startRevid()
      /home/xxxx/src/bitbucket.org/ausocean/av/cmd/revid-cli/main.go:333 +0x4f
  main.updateRevid()
      /home/xxxx/src/bitbucket.org/ausocean/av/cmd/revid-cli/main.go:434 +0xfb9
  main.main()
      /home/xxxx/src/bitbucket.org/ausocean/av/cmd/revid-cli/main.go:293 +0xf09
==================

Comments (1)

  1. Log in to comment