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

db: TestCrashOpenCrashAfterWALCreation race #3961

Closed
jbowens opened this issue Sep 25, 2024 · 1 comment · Fixed by #3966
Closed

db: TestCrashOpenCrashAfterWALCreation race #3961

jbowens opened this issue Sep 25, 2024 · 1 comment · Fixed by #3966

Comments

@jbowens
Copy link
Collaborator

jbowens commented Sep 25, 2024

==================
WARNING: DATA RACE
Read at 0x00c0052ec258 by goroutine 54964:
  github.com/cockroachdb/pebble.TestCrashOpenCrashAfterWALCreation.func2()
      /home/runner/work/pebble/pebble/open_test.go:1001 +0x6d
  github.com/cockroachdb/pebble/vfs/errorfs.InjectorFunc.MaybeError()
      /home/runner/work/pebble/pebble/vfs/errorfs/errorfs.go:157 +0x56
  github.com/cockroachdb/pebble/vfs/errorfs.(*FS).Create()
      /home/runner/work/pebble/pebble/vfs/errorfs/errorfs.go:303 +0x8e
  github.com/cockroachdb/pebble.Open()
      /home/runner/work/pebble/pebble/open.go:575 +0x6772
  github.com/cockroachdb/pebble.TestCrashOpenCrashAfterWALCreation()
      /home/runner/work/pebble/pebble/open_test.go:998 +0xdc4
  testing.tRunner()
      /opt/hostedtoolcache/go/1.22.7/x64/src/testing/testing.go:1689 +0x21e
  testing.(*T).Run.gowrap1()
      /opt/hostedtoolcache/go/1.22.7/x64/src/testing/testing.go:1742 +0x44

Previous write at 0x00c0052ec258 by goroutine 54972:
  github.com/cockroachdb/pebble.TestCrashOpenCrashAfterWALCreation.func2()
      /home/runner/work/pebble/pebble/open_test.go:1002 +0xa4
  github.com/cockroachdb/pebble/vfs/errorfs.InjectorFunc.MaybeError()
      /home/runner/work/pebble/pebble/vfs/errorfs/errorfs.go:157 +0x56
  github.com/cockroachdb/pebble/vfs/errorfs.(*FS).Remove()
      /home/runner/work/pebble/pebble/vfs/errorfs/errorfs.go:[39](https://github.com/cockroachdb/pebble/actions/runs/11036677883/job/30655685274#step:4:40)6 +0xa1
  github.com/cockroachdb/pebble/internal/base.DeleteCleaner.Clean()
      /home/runner/work/pebble/pebble/internal/base/cleaner.go:25 +0x68
  github.com/cockroachdb/pebble/internal/base.(*DeleteCleaner).Clean()
      <autogenerated>:1 +0x1f
  github.com/cockroachdb/pebble.(*cleanupManager).deleteObsoleteFile()
      /home/runner/work/pebble/pebble/obsolete_files.go:235 +0xd4
  github.com/cockroachdb/pebble.(*cleanupManager).mainLoop()
      /home/runner/work/pebble/pebble/obsolete_files.go:171 +0x52b
  github.com/cockroachdb/pebble.openCleanupManager.func1.1()
      /home/runner/work/pebble/pebble/obsolete_files.go:98 +0x2e
  runtime/pprof.Do()
      /opt/hostedtoolcache/go/1.22.7/x64/src/runtime/pprof/runtime.go:51 +0x117
  github.com/cockroachdb/pebble.openCleanupManager.func1()
      /home/runner/work/pebble/pebble/obsolete_files.go:97 +0x91

Goroutine 54964 (running) created at:
  testing.(*T).Run()
      /opt/hostedtoolcache/go/1.22.7/x64/src/testing/testing.go:1742 +0x825
  testing.runTests.func1()
      /opt/hostedtoolcache/go/1.22.7/x64/src/testing/testing.go:2161 +0x85
  testing.tRunner()
      /opt/hostedtoolcache/go/1.22.7/x64/src/testing/testing.go:1689 +0x21e
  testing.runTests()
      /opt/hostedtoolcache/go/1.22.7/x64/src/testing/testing.go:2159 +0x8be
  testing.(*M).Run()
      /opt/hostedtoolcache/go/1.22.7/x64/src/testing/testing.go:2027 +0xf17
  main.main()
      _testmain.go:707 +0x2bd

Goroutine 54972 (running) created at:
  github.com/cockroachdb/pebble.openCleanupManager()
      /home/runner/work/pebble/pebble/obsolete_files.go:96 +0x4fc
  github.com/cockroachdb/pebble.Open()
      /home/runner/work/pebble/pebble/open.go:[40](https://github.com/cockroachdb/pebble/actions/runs/11036677883/job/30655685274#step:4:41)0 +0x3b77
  github.com/cockroachdb/pebble.TestCrashOpenCrashAfterWALCreation()
      /home/runner/work/pebble/pebble/open_test.go:998 +0xdc4
  testing.tRunner()
      /opt/hostedtoolcache/go/1.22.7/x64/src/testing/testing.go:1689 +0x21e
  testing.(*T).Run.gowrap1()
      /opt/hostedtoolcache/go/1.22.7/x64/src/testing/testing.go:17[42](https://github.com/cockroachdb/pebble/actions/runs/11036677883/job/30655685274#step:4:43) +0x44
==================
--- FAIL: TestCrashOpenCrashAfterWALCreation (0.01s)
    options_test.go:35: Running TestCrashOpenCrashAfterWALCreation with format major version 015
    ingest_test.go:3006: [JOB 1] WAL 000002 stopped reading at offset: (000002.log: 29); replayed 1 keys in 1 batches
    options_test.go:35: Running TestCrashOpenCrashAfterWALCreation with format major version 018
    ingest_test.go:3006: [JOB 1] WAL 000007 stopped reading at offset: (000007.log: 0); replayed 0 keys in 0 batches
    testing.go:1398: race detected during execution of test

https://github.com/cockroachdb/pebble/actions/runs/11036677883/job/30655685274

Jira issue: PEBBLE-262

@itsbilal
Copy link
Member

You can assign this to me. Sounds related to my changes

itsbilal added a commit to itsbilal/pebble that referenced this issue Sep 25, 2024
@itsbilal itsbilal moved this from Incoming to Tests (failures, skipped, flakes) in [Deprecated] Storage Sep 26, 2024
@github-project-automation github-project-automation bot moved this from In Progress (this milestone) to Done in [Deprecated] Storage Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants