Skip to content

[bench] data raceが検出される #1445

Open
@Nagarei

Description

#1428

↓これでは?


==================
WARNING: DATA RACE
Write at 0x00c000499030 by goroutine 31:
  runtime.closechan()
      /home/isucon/local/go/src/runtime/chan.go:355 +0x0
  github.com/isucon/isucandar/score.(*Score).Close()
      /home/isucon/go/pkg/mod/github.com/isucon/[email protected]/score/score.go:82 +0xa8
  github.com/isucon/isucandar/score.(*Score).collect.func1()
      /home/isucon/go/pkg/mod/github.com/isucon/[email protected]/score/score.go:56 +0x64

Previous read at 0x00c000499030 by goroutine 124:
  runtime.chansend()
      /home/isucon/local/go/src/runtime/chan.go:158 +0x0
  github.com/isucon/isucandar/score.(*Score).Add()
      /home/isucon/go/pkg/mod/github.com/isucon/[email protected]/score/score.go:74 +0xe5
  github.com/isucon/isucandar.(*BenchmarkStep).AddScore()
      /home/isucon/go/pkg/mod/github.com/isucon/[email protected]/benchmark_step.go:37 +0x1d2
  github.com/isucon/isucon11-qualify/bench/scenario.(*Scenario).postConditionNumReporter.func1()
      /home/isucon/bench_new/scenario/posting.go:72 +0x186
  github.com/isucon/isucon11-qualify/bench/scenario.(*Scenario).postConditionNumReporter()
      /home/isucon/bench_new/scenario/posting.go:90 +0xf0
  github.com/isucon/isucon11-qualify/bench/scenario.(*Scenario).Load.func2()
      /home/isucon/bench_new/scenario/load.go:92 +0x56

Goroutine 31 (running) created at:
  github.com/isucon/isucandar/score.(*Score).collect()
      /home/isucon/go/pkg/mod/github.com/isucon/[email protected]/score/score.go:54 +0x64

Goroutine 124 (running) created at:
  github.com/isucon/isucon11-qualify/bench/scenario.(*Scenario).Load()
      /home/isucon/bench_new/scenario/load.go:89 +0x49d
  github.com/isucon/isucandar.LoadScenario.Load-fm()
      /home/isucon/go/pkg/mod/github.com/isucon/[email protected]/benchmark_scenario.go:17 +0x79
  github.com/isucon/isucandar.(*Benchmark).Start.func3.1.1()
      /home/isucon/go/pkg/mod/github.com/isucon/[email protected]/benchmark.go:126 +0x5b
  github.com/isucon/isucandar.panicWrapper()
      /home/isucon/go/pkg/mod/github.com/isucon/[email protected]/benchmark.go:204 +0xd2
  github.com/isucon/isucandar.(*Benchmark).Start.func3.1()
      /home/isucon/go/pkg/mod/github.com/isucon/[email protected]/benchmark.go:126 +0xd2
  github.com/isucon/isucandar/parallel.(*Parallel).Do.func1()
      /home/isucon/go/pkg/mod/github.com/isucon/[email protected]/parallel/parallel.go:68 +0xa7
==================

Metadata

Assignees

No one assigned

    Labels

    benchmarkerbugSomething isn't workingwontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions