Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Nagarei opened this issue Aug 27, 2021 · 2 comments
Open

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

Nagarei opened this issue Aug 27, 2021 · 2 comments
Labels
benchmarker bug Something isn't working wontfix This will not be worked on

Comments

@Nagarei
Copy link
Contributor

Nagarei commented Aug 27, 2021

#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
==================
@Nagarei Nagarei added bug Something isn't working benchmarker labels Aug 27, 2021
@Nagarei
Copy link
Contributor Author

Nagarei commented Sep 6, 2021

close(s.queue)と、s.queue <- tagで競合している

@Nagarei
Copy link
Contributor Author

Nagarei commented Sep 6, 2021

困りはするけどCloseが呼ばれるのはmainのctxが終了したときなのでデッドロックとは関係が無さそうなのと、デバッグコードが影響していそう

@Nagarei Nagarei changed the title [bench] デッドロックする [bench] data raceが検出される Sep 6, 2021
@Nagarei Nagarei added the wontfix This will not be worked on label Sep 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
benchmarker bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant