• Ferenc Szabo's avatar
    Ci race detector handle failing tests (#19143) · e38b227c
    Ferenc Szabo authored
    * swarm/storage: increase mget timeout in common_test.go
    
     TestDbStoreCorrect_1k sometimes timed out with -race on Travis.
    
    --- FAIL: TestDbStoreCorrect_1k (24.63s)
        common_test.go:194: testStore failed: timed out after 10s
    
    * swarm: remove unused vars from TestSnapshotSyncWithServer
    
    nodeCount and chunkCount is returned from setupSim and those values
    we use.
    
    * swarm: move race/norace helpers from stream to testutil
    
    As we will need to use the flag in other packages, too.
    
    * swarm: refactor TestSwarmNetwork case
    
    Extract long running test cases for better visibility.
    
    * swarm/network: skip TestSyncingViaGlobalSync with -race
    
    As panics on Travis.
    
    panic: runtime error: invalid memory address or nil pointer dereference
    [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x7e351b]
    
    * swarm: run TestSwarmNetwork with fewer nodes with -race
    
    As otherwise we always get test failure with `network_test.go:374:
    context deadline exceeded` even with raised `Timeout`.
    
    * swarm/network: run TestDeliveryFromNodes with fewer nodes with -race
    
    Test on Travis times out with 8 or more nodes if -race flag is present.
    
    * swarm/network: smaller node count for discovery tests with -race
    
    TestDiscoveryPersistenceSimulationSimAdapters failed on Travis with
    `-race` flag present. The failure was due to extensive memory usage,
    coming from the CGO runtime. Using a smaller node count resolves the
    issue.
    
    === RUN   TestDiscoveryPersistenceSimulationSimAdapter
    ==7227==ERROR: ThreadSanitizer failed to allocate 0x80000 (524288) bytes of clock allocator (error code: 12)
    FATAL: ThreadSanitizer CHECK failed: ./gotsan.cc:6976 "((0 && "unable to mmap")) != (0)" (0x0, 0x0)
    FAIL    github.com/ethereum/go-ethereum/swarm/network/simulations/discovery     804.826s
    
    * swarm/network: run TestFileRetrieval with fewer nodes with -race
    
    Otherwise we get a failure due to extensive memory usage, as the CGO
    runtime cannot allocate more bytes.
    
    === RUN   TestFileRetrieval
    ==7366==ERROR: ThreadSanitizer failed to allocate 0x80000 (524288) bytes of clock allocator (error code: 12)
    FATAL: ThreadSanitizer CHECK failed: ./gotsan.cc:6976 "((0 && "unable to mmap")) != (0)" (0x0, 0x0)
    FAIL	github.com/ethereum/go-ethereum/swarm/network/stream	155.165s
    
    * swarm/network: run TestRetrieval with fewer nodes with -race
    
    Otherwise we get a failure due to extensive memory usage, as the CGO
    runtime cannot allocate more bytes ("ThreadSanitizer failed to
    allocate").
    
    * swarm/network: skip flaky TestGetSubscriptionsRPC on Travis w/ -race
    
    Test fails a lot with something like:
     streamer_test.go:1332: Real subscriptions and expected amount don't match; real: 0, expected: 20
    
    * swarm/storage: skip TestDB_SubscribePull* tests on Travis w/ -race
    
    Travis just hangs...
    
    ok  	github.com/ethereum/go-ethereum/swarm/storage/feed/lookup	1.307s
    keepalive
    keepalive
    keepalive
    
    or panics after a while.
    
    Without these tests the race detector job is now stable. Let's
    invetigate these tests in a separate issue:
    https://github.com/ethersphere/go-ethereum/issues/1245
    e38b227c
Name
Last commit
Last update
.github Loading commit data...
accounts Loading commit data...
build Loading commit data...
cmd Loading commit data...
common Loading commit data...
consensus Loading commit data...
console Loading commit data...
containers/docker Loading commit data...
contracts Loading commit data...
core Loading commit data...
crypto Loading commit data...
dashboard Loading commit data...
docs/audits Loading commit data...
eth Loading commit data...
ethclient Loading commit data...
ethdb Loading commit data...
ethstats Loading commit data...
event Loading commit data...
graphql Loading commit data...
internal Loading commit data...
les Loading commit data...
light Loading commit data...
log Loading commit data...
metrics Loading commit data...
miner Loading commit data...
mobile Loading commit data...
node Loading commit data...
p2p Loading commit data...
params Loading commit data...
rlp Loading commit data...
rpc Loading commit data...
signer Loading commit data...
swarm Loading commit data...
tests Loading commit data...
trie Loading commit data...
vendor Loading commit data...
whisper Loading commit data...
.dockerignore Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gitmodules Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
COPYING.LESSER Loading commit data...
Dockerfile Loading commit data...
Dockerfile.alltools Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
appveyor.yml Loading commit data...
circle.yml Loading commit data...
interfaces.go Loading commit data...