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

Fix race in pause_identifier unittest #7697

Open
aarongable opened this issue Sep 4, 2024 · 0 comments
Open

Fix race in pause_identifier unittest #7697

aarongable opened this issue Sep 4, 2024 · 0 comments

Comments

@aarongable
Copy link
Contributor

The admin pause-identifier subcommand and its associated unittests were introduced in #7668 and improved in #7689. We've now seen a CI unit test failure due to a data race in these new unit tests:

==================
WARNING: DATA RACE
Read at 0x00c00048a460 by goroutine 60:
  github.com/letsencrypt/boulder/cmd/admin.(*mockSAPaused).PauseIdentifiers()
      /boulder/cmd/admin/pause_identifier_test.go:91 +0x44
  github.com/letsencrypt/boulder/cmd/admin.(*admin).pauseIdentifiers.func1()
      /boulder/cmd/admin/pause_identifier.go:84 +0x289

Previous write at 0x00c00048a460 by goroutine 53:
  github.com/letsencrypt/boulder/cmd/admin.(*mockSAPaused).PauseIdentifiers()
      /boulder/cmd/admin/pause_identifier_test.go:91 +0xf1
  github.com/letsencrypt/boulder/cmd/admin.(*admin).pauseIdentifiers.func1()
      /boulder/cmd/admin/pause_identifier.go:84 +0x289

Goroutine 60 (running) created at:
  github.com/letsencrypt/boulder/cmd/admin.(*admin).pauseIdentifiers()
      /boulder/cmd/admin/pause_identifier.go:81 +0x51d
  github.com/letsencrypt/boulder/cmd/admin.TestPauseIdentifiers.func1()
      /boulder/cmd/admin/pause_identifier_test.go:188 +0x27b
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1689 +0x21e
  testing.(*T).Run.gowrap1()
      /usr/local/go/src/testing/testing.go:1742 +0x44

Goroutine 53 (finished) created at:
  github.com/letsencrypt/boulder/cmd/admin.(*admin).pauseIdentifiers()
      /boulder/cmd/admin/pause_identifier.go:81 +0x51d
  github.com/letsencrypt/boulder/cmd/admin.TestPauseIdentifiers.func1()
      /boulder/cmd/admin/pause_identifier_test.go:188 +0x27b
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1689 +0x21e
  testing.(*T).Run.gowrap1()
      /usr/local/go/src/testing/testing.go:1742 +0x44
==================
--- FAIL: TestSerialsFromFile (0.00s)
    testing.go:[139](https://github.com/letsencrypt/boulder/actions/runs/10709127483/job/29693034354#step:6:140)8: race detected during execution of test
==================
WARNING: DATA RACE
Read at 0x00c00045e548 by goroutine 60:
  runtime.growslice()
      /usr/local/go/src/runtime/slice.go:155 +0x0
  github.com/letsencrypt/boulder/cmd/admin.(*mockSAPaused).PauseIdentifiers()
      /boulder/cmd/admin/pause_identifier_test.go:91 +0x7b
  github.com/letsencrypt/boulder/cmd/admin.(*admin).pauseIdentifiers.func1()
      /boulder/cmd/admin/pause_identifier.go:84 +0x289

Previous write at 0x00c00045e548 by goroutine 53:
  github.com/letsencrypt/boulder/cmd/admin.(*mockSAPaused).PauseIdentifiers()
      /boulder/cmd/admin/pause_identifier_test.go:91 +0xa4
  github.com/letsencrypt/boulder/cmd/admin.(*admin).pauseIdentifiers.func1()
      /boulder/cmd/admin/pause_identifier.go:84 +0x289

Goroutine 60 (running) created at:
  github.com/letsencrypt/boulder/cmd/admin.(*admin).pauseIdentifiers()
      /boulder/cmd/admin/pause_identifier.go:81 +0x51d
  github.com/letsencrypt/boulder/cmd/admin.TestPauseIdentifiers.func1()
      /boulder/cmd/admin/pause_identifier_test.go:188 +0x27b
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1689 +0x21e
  testing.(*T).Run.gowrap1()
      /usr/local/go/src/testing/testing.go:1742 +0x44

Goroutine 53 (finished) created at:
  github.com/letsencrypt/boulder/cmd/admin.(*admin).pauseIdentifiers()
      /boulder/cmd/admin/pause_identifier.go:81 +0x51d
  github.com/letsencrypt/boulder/cmd/admin.TestPauseIdentifiers.func1()
      /boulder/cmd/admin/pause_identifier_test.go:188 +0x27b
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:[168](https://github.com/letsencrypt/boulder/actions/runs/10709127483/job/29693034354#step:6:169)9 +0x21e
  testing.(*T).Run.gowrap1()
      /usr/local/go/src/testing/testing.go:1742 +0x44
==================
--- FAIL: TestPauseIdentifiers (0.00s)
    --- FAIL: TestPauseIdentifiers/valid_multiple_entries_with_duplicates (0.00s)
        testing.go:1398: race detected during execution of test
    --- FAIL: TestPauseIdentifiers/valid_single_entry_but_broken_SA (0.00s)
        testing.go:1398: race detected during execution of test
--- FAIL: TestRevokeSerials (0.00s)
    testing.go:1398: race detected during execution of test
--- FAIL: TestReadingUnpauseAccountsFile (0.00s)
    testing.go:1398: race detected during execution of test
--- FAIL: TestUnpauseAccounts (0.00s)
    testing.go:1398: race detected during execution of test
--- FAIL: TestReadingPauseCSV (0.00s)
    testing.go:1398: race detected during execution of test
FAIL
FAIL	github.com/letsencrypt/boulder/cmd/admin	0.046s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant