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

Data race in TestRelated and TestPermalinkExpansionSectionsRepeated on Windows #10768

Closed
alexandear opened this issue Mar 1, 2023 · 1 comment
Assignees
Milestone

Comments

@alexandear
Copy link
Contributor

The following data race occurred during the CI run on Go 1.19, Windows:

The full log

==================
WARNING: DATA RACE
Write at 0x000142582750 by goroutine 103:
  github.com/gohugoio/hugo/related.(*IndexConfig).incrNumDocs()
      D:/a/hugo/hugo/related/inverted_index.go:152 +0x484
  github.com/gohugoio/hugo/related.(*InvertedIndex).Add()
      D:/a/hugo/hugo/related/inverted_index.go:255 +0x43d
  github.com/gohugoio/hugo/resources/page.(*RelatedDocsHandler).getOrCreateIndex()
      D:/a/hugo/hugo/resources/page/pages_related.go:232 +0xa1d
  github.com/gohugoio/hugo/resources/page.Pages.withInvertedIndex()
      D:/a/hugo/hugo/resources/page/pages_related.go:136 +0xe5
  github.com/gohugoio/hugo/resources/page.Pages.search()
      D:/a/hugo/hugo/resources/page/pages_related.go:119 +0xfa
  github.com/gohugoio/hugo/resources/page.Pages.Related()
      D:/a/hugo/hugo/resources/page/pages_related.go:73 +0x384
  github.com/gohugoio/hugo/resources/page.TestRelated()
      D:/a/hugo/hugo/resources/page/pages_related_test.go:59 +0xc97
  testing.tRunner()
      C:/hostedtoolcache/windows/go/1.19.6/x64/src/testing/testing.go:1446 +0x216
  testing.(*T).Run.func1()
      C:/hostedtoolcache/windows/go/1.19.6/x64/src/testing/testing.go:1493 +0x47

Previous read at 0x000142582750 by goroutine 20:
  [failed to restore the stack]

Goroutine 103 (running) created at:
  testing.(*T).Run()
      C:/hostedtoolcache/windows/go/1.19.6/x64/src/testing/testing.go:1493 +0x75d
  testing.runTests.func1()
      C:/hostedtoolcache/windows/go/1.19.6/x64/src/testing/testing.go:1846 +0x99
  testing.tRunner()
      C:/hostedtoolcache/windows/go/1.19.6/x64/src/testing/testing.go:1446 +0x216
  testing.runTests()
      C:/hostedtoolcache/windows/go/1.19.6/x64/src/testing/testing.go:1844 +0x7ec
  testing.(*M).Run()
      C:/hostedtoolcache/windows/go/1.19.6/x64/src/testing/testing.go:1726 +0xa84
  main.main()
      _testmain.go:177 +0x2e9

Goroutine 20 (running) created at:
  testing.(*T).Run()
      C:/hostedtoolcache/windows/go/1.19.6/x64/src/testing/testing.go:1493 +0x75d
  testing.runTests.func1()
      C:/hostedtoolcache/windows/go/1.19.6/x64/src/testing/testing.go:1846 +0x99
  testing.tRunner()
      C:/hostedtoolcache/windows/go/1.19.6/x64/src/testing/testing.go:1446 +0x216
  testing.runTests()
      C:/hostedtoolcache/windows/go/1.19.6/x64/src/testing/testing.go:1844 +0x7ec
  testing.(*M).Run()
      C:/hostedtoolcache/windows/go/1.19.6/x64/src/testing/testing.go:1726 +0xa84
  main.main()
      _testmain.go:177 +0x2e9
==================
--- FAIL: TestRelated (0.01s)
    testing.go:1[319](https://github.com/gohugoio/hugo/actions/runs/4302554709/jobs/7501194890#step:17:320): race detected during execution of test
--- FAIL: TestPermalinkExpansionSectionsRepeated (0.40s)
    testing.go:1319: race detected during execution of test
FAIL
FAIL	github.com/gohugoio/hugo/resources/page	1.432s
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants