Skip to content

Fix flaky test TestPendingTxFilter #1415

@qdm12

Description

@qdm12

Run: https://github.com/ava-labs/subnet-evm/actions/runs/12549163673/job/34989721300?pr=1413

Log:

-test.shuffle 1735576483648806000
==================
WARNING: DATA RACE
Read at 0x00c0084afb90 by goroutine [64](https://github.com/ava-labs/subnet-evm/actions/runs/12549163673/job/34989721300?pr=1413#step:8:65):
  runtime.mapaccess2_faststr()
      C:/hostedtoolcache/windows/go/1.22.10/x64/src/runtime/map_faststr.go:108 +0x0
  github.com/ava-labs/subnet-evm/eth/filters.TestPendingTxFilterDeadlock()
      D:/a/subnet-evm/subnet-evm/eth/filters/filter_system_test.go:841 +0x569
  testing.tRunner()
      C:/hostedtoolcache/windows/go/1.22.10/x64/src/testing/testing.go:1[68](https://github.com/ava-labs/subnet-evm/actions/runs/12549163673/job/34989721300?pr=1413#step:8:69)9 +0x21e
  testing.(*T).Run.gowrap1()
      C:/hostedtoolcache/windows/go/1.22.10/x64/src/testing/testing.go:1742 +0x44

Previous write at 0x00c0084afb90 by goroutine 109:
  runtime.mapdelete_faststr()
      C:/hostedtoolcache/windows/go/1.22.10/x64/src/runtime/map_faststr.go:301 +0x0
  github.com/ava-labs/subnet-evm/eth/filters.(*FilterAPI).NewPendingTransactionFilter.func1()
      D:/a/subnet-evm/subnet-evm/eth/filters/api.go:149 +0x428

Goroutine 64 (running) created at:
  testing.(*T).Run()
      C:/hostedtoolcache/windows/go/1.22.10/x64/src/testing/testing.go:1[74](https://github.com/ava-labs/subnet-evm/actions/runs/12549163673/job/34989721300?pr=1413#step:8:75)2 +0x825
  testing.runTests.func1()
      C:/hostedtoolcache/windows/go/1.22.10/x64/src/testing/testing.go:2161 +0x85
  testing.tRunner()
      C:/hostedtoolcache/windows/go/1.22.10/x64/src/testing/testing.go:1689 +0x21e
  testing.runTests()
      C:/hostedtoolcache/windows/go/1.22.10/x64/src/testing/testing.go:2159 +0x8be
  testing.(*M).Run()
      C:/hostedtoolcache/windows/go/1.22.10/x64/src/testing/testing.go:2027 +0xf17
  main.main()
      _testmain.go:123 +0x2e4

Goroutine 109 (finished) created at:
  github.com/ava-labs/subnet-evm/eth/filters.(*FilterAPI).NewPendingTransactionFilter()
      D:/a/subnet-evm/subnet-evm/eth/filters/api.go:138 +0x406
  github.com/ava-labs/subnet-evm/eth/filters.TestPendingTxFilterDeadlock()
      D:/a/subnet-evm/subnet-evm/eth/filters/filter_system_test.go:[84](https://github.com/ava-labs/subnet-evm/actions/runs/12549163673/job/34989721300?pr=1413#step:8:85)0 +0x51d
  testing.tRunner()
      C:/hostedtoolcache/windows/go/1.22.10/x64/src/testing/testing.go:1689 +0x21e
  testing.(*T).Run.gowrap1()
      C:/hostedtoolcache/windows/go/1.22.10/x64/src/testing/testing.go:1742 +0x44
==================
--- FAIL: TestPendingTxFilterDeadlock (0.60s)
    testing.go:1398: race detected during execution of test
--- FAIL: TestPendingLogsSubscription (1.04s)
    testing.go:1398: race detected during execution of test
--- FAIL: TestLogFilter (1.19s)
    testing.go:1398: race detected during execution of test
--- FAIL: TestPendingTxFilter (1.17s)
    testing.go:1398: race detected during execution of test
FAIL
coverage: 27.5% of statements
FAIL	github.com/ava-labs/subnet-evm/eth/filters	8.0[87](https://github.com/ava-labs/subnet-evm/actions/runs/12549163673/job/34989721300?pr=1413#step:8:88)s

Metadata

Metadata

Assignees

No one assigned

    Labels

    flaky-testTest failing occasionallygeth-codeThis deals with Geth original code which should be fixed upstream

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions