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

Unit tests sometimes time out. #2472

Closed
KtorZ opened this issue Jan 28, 2021 · 12 comments
Closed

Unit tests sometimes time out. #2472

KtorZ opened this issue Jan 28, 2021 · 12 comments
Labels
Test failure A flaky test or nightly CI failure

Comments

@KtorZ
Copy link
Member

KtorZ commented Jan 28, 2021

Context

Test Case

?

Failure / Counter-example

Build failed:

    ci/hydra-build:required

        Valid ISO 8601 extended UTC times
          2008-09-15T15:53:00Z
            +++ OK, passed 1 test.
          2008-09-15T15:53:00.1Z
            +++ OK, passed 1 test.
          2008-09-15T15:53:00.12Z
            +++ OK, passed 1 test.
        Non-time examples
          Data.Time.TextSpec[56:21]
            +++ OK, passed 1 test.
          w
            +++ OK, passed 1 test.
          wibble
            +++ OK, passed 1 test.
        ISO 8601 basic format without times
          2008
            +++ OK, passed 1 test.
          200809
            +++ OK, passed 1 test.
          20080915
            +++ OK, passed 1 test.
        ISO 8601 basic format without timezones
          20080915T155300
            +++ OK, passed 1 test.
          20080915T155300.1
            +++ OK, passed 1 test.
          20080915T155300.12
            +++ OK, passed 1 test.
building of '/nix/store/zy6scpy44agjf03q800lfc9mrk9zlyq1-cardano-wallet-core-test-unit-2021.3.4-check' timed out after 900 seconds of silence
@rvl rvl added the Test failure A flaky test or nightly CI failure label Jan 29, 2021
@rvl
Copy link
Contributor

rvl commented Jan 29, 2021

This time out is likely to be the same one as #2393 and #2436.
They all stop at pretty much the same place.

@Anviking
Copy link
Member

Anviking commented Feb 16, 2021

Could perhaps be related:

Here, locally, it seems it blows up when trying to display the counterexample:

Skärmavbild 2021-02-16 kl  14 48 44

The error was specific to #2521, but maybe the size of the counterexample could be related to this issue.

@rvl
Copy link
Contributor

rvl commented Feb 16, 2021

Yeah nice hypothesis @Anviking - plausible because Arbitrary checkpoints will probably include Arbitrary TokenBundles now.

@Anviking
Copy link
Member

I tried reproducing the above and failed. Strange thing is that it seems like "/Cardano.Wallet.DB.Sqlite/Check db reading/writing from/to file and cleaning/put and read checkpoint/" doesn't contain any arbitrary values. Only a static one.

I ran stack test cardano-wallet-core:unit --ta '+RTS -M100m -s -RTS' a few time, but nothing strange happened.

It's also interesting how this issue only occurs on hydra, and mostly on certain days.

@KtorZ
Copy link
Member Author

KtorZ commented Feb 23, 2021

how this issue only occurs on hydra,

Are you sure of that?

@Anviking
Copy link
Member

Using a modified* bors-stats.sh, all 12 failures of this ticket are hydra-failures.

Browsing old related tickets manually GH, I only see hydra too.

Maybe there's some Buildkite failures too, sure, I can't say for sure, but at least it seems to be mostly hydra.

Output
./scripts/bors-stats.sh                                                                                                                                                                                                                                                            (59s 648ms)
05 Feb 07:20 #2472 https:/input-output-hk/cardano-wallet/pull/2489#issuecomment-773847340
Build failed:

ci/hydra-build:required

#2472


05 Feb 08:01 #2472 https:/input-output-hk/cardano-wallet/pull/2491#issuecomment-773865683
Build failed (retrying...):

ci/hydra-build:required

#2472


05 Feb 08:01 #2472 https:/input-output-hk/cardano-wallet/pull/2492#issuecomment-773865688
Build failed (retrying...):

ci/hydra-build:required

#2472


05 Feb 13:02 #2472 https:/input-output-hk/cardano-wallet/pull/2493#issuecomment-774020048
Build failed (retrying...):

ci/hydra-build:required

 readPoolProduction should never give pools with no slots after rollback - arbitrary N-slot-depth rollbacks
 +++ OK, passed 100 tests (100% number of slots <= 10).
 readStakeDistribution . putStakeDistribution == pure
 +++ OK, passed 100 tests (6% Empty distributions).
 putPoolRegistration then readPoolRegistration yields expected result
 +++ OK, passed 100 tests.
building of '/nix/store/8q2wbvfdmx56w0gq4cv7k4z3y6p6b79m-cardano-wallet-core-test-unit-2021.1.28-check' timed out after 900 seconds of silence

#2472


05 Feb 14:35 #2472 https:/input-output-hk/cardano-wallet/pull/2493#issuecomment-774070116
Build failed:

ci/hydra-build:required

 PUT /wallets/0000000000000000000000000000000000000000/signatures/utxo_internal/1234H
 PATCH /wallets/0000000000000000000000000000000000000000/signatures/utxo_internal/1234H
 DELETE /wallets/0000000000000000000000000000000000000000/signatures/utxo_internal/1234H
 CONNECT /wallets/0000000000000000000000000000000000000000/signatures/utxo_internal/1234H
 TRACE /wallets/0000000000000000000000000000000000000000/signatures/utxo_internal/1234H
 OPTIONS /wallets/0000000000000000000000000000000000000000/signatures/utxo_internal/1234H
building of '/nix/store/86mia2kv84lphl2a31qkw30a71z4pnah-cardano-wallet-core-test-unit-2021.1.28-check' timed out after 900 seconds of silence

#2472


05 Feb 16:20 #2472 https:/input-output-hk/cardano-wallet/pull/2493#issuecomment-774134141
Build failed:

ci/hydra-build:required

 Generator for ReadPrivateKey
 Shrinker for ReadPrivateKey
 Generator for RollbackTo
 Shrinker for RollbackTo
 Generator for ReadGenesisParameters
 Shrinker for ReadGenesisParameters
 Sqlite
 Extra Properties about DB initialization
 createWallet . listWallets yields expected results
 +++ OK, passed 100 tests.
 creating same wallet twice yields an error
 +++ OK, passed 100 tests.
 removing the same wallet twice yields an error
 +++ OK, passed 100 tests.
 put . read yields a result
building of '/nix/store/hzcpjbs79862l2qijz4rq7grwx2h6z7m-cardano-wallet-core-test-unit-2021.1.28-check' timed out after 900 seconds of silence

#2472


06 Feb 06:27 #2472 https:/input-output-hk/cardano-wallet/pull/2489#issuecomment-774409486
Build failed:

ci/hydra-build:required

#2472


06 Feb 07:06 #2472 https:/input-output-hk/cardano-wallet/pull/2493#issuecomment-774415321
Build failed (retrying...):

ci/hydra-build:required

 GET /wallets/0000000000000000000000000000000000000000/signatures/utxo_internal/1234
 PUT /wallets/0000000000000000000000000000000000000000/signatures/utxo_internal/1234
 PATCH /wallets/0000000000000000000000000000000000000000/signatures/utxo_internal/1234
 DELETE /wallets/0000000000000000000000000000000000000000/signatures/utxo_internal/1234
 CONNECT /wallets/0000000000000000000000000000000000000000/signatures/utxo_internal/1234
 TRACE /wallets/0000000000000000000000000000000000000000/signatures/utxo_internal/1234
 OPTIONS /wallets/0000000000000000000000000000000000000000/signatures/utxo_internal/1234
 GET /wallets/0000000000000000000000000000000000000000/signatures/utxo_internal/1234H
 PUT /wallets/0000000000000000000000000000000000000000/signatures/utxo_internal/1234H
 PATCH /wallets/0000000000000000000000000000000000000000/signatures/utxo_internal/1234H
 DELETE /wallets/0000000000000000000000000000000000000000/signatures/utxo_internal/1234H
 CONNECT /wallets/0000000000000000000000000000000000000000/signatures/utxo_internal/1234H
 TRACE /wallets/0000000000000000000000000000000000000000/signatures/utxo_internal/1234H
 OPTIONS /wallets/0000000000000000000000000000000000000000/signatures/utxo_internal/1234H
building of '/nix/store/kz0xanvvs67l45br1rayv6df3p1yj792-cardano-wallet-core-test-unit-2021.1.28-check' timed out after 900 seconds of silence

#2472


10 Feb 10:49 #2472 https:/input-output-hk/cardano-wallet/pull/2496#issuecomment-776621676
Build failed:

ci/hydra-build:required

#2472


15 Feb 13:13 #2472 https:/input-output-hk/cardano-wallet/pull/2520#issuecomment-779215889
Build failed:

ci/hydra-build:required

 CONNECT /wallets/0000000000000000000000000000000000000000/signatures/utxo_internal/2147483647
 TRACE /wallets/0000000000000000000000000000000000000000/signatures/utxo_internal/2147483647
 OPTIONS /wallets/0000000000000000000000000000000000000000/signatures/utxo_internal/2147483647
 PUT /wallets/0000000000000000000000000000000000000000/statistics/utxos
 POST /wallets/0000000000000000000000000000000000000000/statistics/utxos
 PATCH /wallets/0000000000000000000000000000000000000000/statistics/utxos
 DELETE /wallets/0000000000000000000000000000000000000000/statistics/utxos
building of '/nix/store/m549nn2z1qjcv2iqi62i1lifvzrs9l71-cardano-wallet-core-test-unit-2021.2.12-check' timed out after 900 seconds of silence

#2472


15 Feb 13:58 #2472 https:/input-output-hk/cardano-wallet/pull/2519#issuecomment-779240782
Build failed:

ci/hydra-build:required

#2472


15 Feb 14:37 #2472 https:/input-output-hk/cardano-wallet/pull/2520#issuecomment-779262244
Build failed:

ci/hydra-build:required

 +++ OK, passed 100 tests; 8 discarded.
 can't put before wallet exists
 Checkpoint
 +++ OK, passed 100 tests.
 Wallet Metadata
 +++ OK, passed 100 tests.
 Tx History
 +++ OK, passed 100 tests.
 Private Key
 +++ OK, passed 100 tests.
 put doesn't affect other resources
building of '/nix/store/djzhldcr0bj58i7w79dckq0lww3cr0q4-cardano-wallet-core-test-unit-2021.2.12-check' timed out after 900 seconds of silence

#2472


succeded: 0, failed: 12 (100%), total: 12
excluding #expected failures

Broken down by tags/issues:
12 times #2472 Unit tests sometimes time out.  | https:/input-output-hk/cardano-wallet/issues/2472

*) Should make that script more powerful btw.

@Anviking
Copy link
Member

I also looked into GenTxHistory though:

And maybe it is a bit slow?

replicateM 1000 (fmap (length . unGenTxHistory) <$> generate $ arbitrary @GenTxHistory)
[4,1,6,14,0,6,11,1,3,8,6,1,1,9,14,0,8,8,1,0,2,7,4,14,2,8,2,1,8,10,5,10,7,5,9,2,5,3,4,12,0,4,4,2,0,2,13,5,6,8,7,8,2,2,3,3,11,3,6,2,12,2,4,11,1,1,11,1,5,6,11,9,2,5,3,2,2,4,13,5,5,9,13,0,11,11,12,7,7,1,10,14,6,9,13,9,8,8,1,5,15,3,9,7,10,3,5,2,5,11,2,8,1,0,8,8,7,0,3,8,13,10,0,4,8,2,7,3,8,7,3,4,6,8,9,8,12,4,1,0,8,14,7,4,11,2,5,11,7,13,10,6,2,11,4,1,0,2,11,2,12,1,6,9,5,12,9,0,13,4,8,7,7,11,9,14,13,8,1,7,3,0,0,1,6,11,11,10,3,2,1,5,9,1,6,2,5,1,3,10,10,8,12,2,10,9,0,4,1,9,8,0,6,0,8,9,13,2,6,2,11,0,1,3,7,6,15,0,9,9,15,12,14,9,1,0,4,2,5,8,10,3,5,8,9,4,0,6,1,11,13,10,9,1,15,2,7,2,0,9,5,0,10,10,2,9,7,11,6,12,1,2,0,7,11,2,14,7,2,7,4,8,5,1,5,1,3,12,11,13,5,0,5,3,8,2,6,1,3,9,4,1,9,5,10,5,6,3,7,0,3,4,3,6,10,12,9,9,10,8,5,1,11,5,5,9,6,12,7,15,9,14,1,13,11,7,4,13,7,10,11,4,3,1,7,7,5,3,7,0,8,6,3,7,13,0,4,0,3,3,10,9,0,9,6,12,1,3,8,7,12,12,12,0,10,13,5,8,4,0,7,9,11,9,10,1,11,1,10,6,1,3,5,10,10,15,0,4,2,1,10,3,14,8,8,9,9,4,5,8,11,6,1,12,1,5,5,4,2,1,8,2,6,6,7,8,0,14,15,9,4,11,0,5,12,5,3,3,5,8,3,14,6,0,5,17,1,5,13,2,5,12,10,8,1,12,11,9,16,8,5,0,1,10,15,2,6,15,1,2,4,13,7,9,12,3,9,7,0,9,9,9,3,5,5,8,10,6,1,3,8,3,2,7,1,0,7,10,4,10,12,2,3,5,0,9,12,2,5,4,6,4,2,12,11,2,8,3,6,10,9,6,5,8,8,8,3,6,15,13,6,14,10,4,10,5,10,2,3,4,2,1,5,13,3,5,6,2,9,12,3,7,0,3,5,7,6,10,0,8,9,4,5,11,0,8,2,7,6,9,14,6,8,7,3,4,0,11,7,12,0,4,1,3,1,7,13,8,0,5,11,7,9,3,1,0,2,4,6,8,2,5,6,11,8,4,0,11,8,1,11,0,13,5,11,8,7,6,2,8,4,6,11,8,9,2,12,12,8,10,5,3,9,1,5,1,3,7,12,6,7,10,8,8,6,4,2,10,0,11,1,7,13,6,11,5,7,1,7,6,15,3,2,2,9,1,8,9,3,9,14,9,5,11,13,5,7,4,4,3,0,5,1,8,2,9,4,11,4,6,14,9,9,2,3,4,2,8,12,11,10,1,8,6,12,11,7,3,3,6,8,0,7,10,0,8,1,3,8,6,10,6,3,3,7,8,0,0,3,5,3,8,7,7,9,3,1,2,9,13,10,0,2,11,12,1,0,2,0,1,8,8,4,8,16,2,2,11,0,0,12,2,0,1,3,5,8,3,0,1,15,4,6,10,7,8,2,11,8,1,4,8,10,9,3,4,1,13,6,1,14,0,1,8,14,10,4,14,1,11,9,11,7,1,0,8,0,1,7,4,7,2,2,2,11,0,7,0,4,8,2,7,3,7,3,14,5,7,3,10,2,11,12,0,8,4,4,3,4,5,0,2,3,4,13,1,3,2,8,6,1,6,14,9,9,0,4,14,1,8,3,0,8,0,6,14,0,4,7,7,5,10,8,4,6,3,10,11,0,5,6,9,15,11,10,7,3,10,6,2,6,6,7,7,2,6,8,10,8,7,11,2,6,7,5,2,7,2,8,8,4,4,2,7,11,16,10,11,7,2,6,2,6,1,0,0,1,9,9,9,9,3,0,5,3,8,0,1,5,5,5,9,13,2,8,1,8,8,9,6,9,7,7,12,9,12,9,8,10,4,12,1,12,13,4,3,10,4,10,3,12,3,5,2,1,3,0,12,0,6,1,3,4,5,0,9,10,7,6,10,12,6,11,12,14,1,3,4,1,4]
(4.87 secs, 5,487,650,560 bytes)
  • Originally 4.87s
  • Replacing arbitrary ByteStrings in Address and RewardAccount for a static twentyNineNulls makes it run in just 1.5s
  • Making TokenBundles with all coin values -> 0.8s
  • Reducing number of inputs, outputs and withdrawals in Arbitrary Tx from 5 to 1 -> 0.45s

@Anviking
Copy link
Member

Anviking commented Feb 23, 2021

I did manage to observe timeouts locally finally. Several times in a row, before it disappeared.

I wonder if HLS was consuming all my memory at that point. (But I didn't notice anything at the time)

On the same track, it seems stack test cardano-wallet-core:unit --ta '--match "Sqlite" +RTS -M100m -s -RTS is not effective — or not what I believe it is — my system manager shows the unit tests consuming several GB.

https://downloads.haskell.org/~ghc/7.4.1/docs/html/users_guide/runtime-control.html

Want to try playing around setting -A / ask about this

iohk-bors bot added a commit that referenced this issue Feb 26, 2021
2537: Fix massive memory leak in unit tests r=Anviking a=Anviking

# Issue Number

ADP-758, #2472 

# Overview

- [x] Make sure to also close the DBLayers we create!
- [x] <s>Use validateGenerator to also test non-QSM Arbitrary instances</s>
- [ ] <s>TODO: Look a bit more at the generators / validation of them, could perhaps split the PR too.</s>

# Comments

Before this fix the memory usage would steadily climb upwards 5-15GB. Now it's at most ~40 MB.

### Running part of unit tests before fix:
<img width="1167" alt="ska__rmavbild_2021-02-25_kl _12 34 43" src="https://user-images.githubusercontent.com/304423/109172195-cafd8c00-7782-11eb-8afd-a40732fccded.png">


### Running all unit tests after fix:
<img width="1399" alt="Skärmavbild 2021-02-25 kl  15 54 16" src="https://user-images.githubusercontent.com/304423/109171975-938edf80-7782-11eb-904b-9404708fbdde.png">


<!-- Additional comments or screenshots to attach if any -->

<!--
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Jira will detect and link to this PR once created, but you can also link this PR in the description of the corresponding ticket
 ✓ Acknowledge any changes required to the Wiki
 ✓ Finally, in the PR description delete any empty sections and all text commented in <!--, so that this text does not appear in merge commit messages.
-->


Co-authored-by: Johannes Lund <[email protected]>
iohk-bors bot added a commit that referenced this issue Feb 26, 2021
2537: Fix massive memory leak in unit tests r=Anviking a=Anviking

# Issue Number

ADP-758, #2472 

# Overview

- [x] Make sure to also close the DBLayers we create!
- [x] <s>Use validateGenerator to also test non-QSM Arbitrary instances</s>
- [ ] <s>TODO: Look a bit more at the generators / validation of them, could perhaps split the PR too.</s>

# Comments

Before this fix the memory usage would steadily climb upwards 5-15GB. Now it's at most ~40 MB.

### Running part of unit tests before fix:
<img width="1167" alt="ska__rmavbild_2021-02-25_kl _12 34 43" src="https://user-images.githubusercontent.com/304423/109172195-cafd8c00-7782-11eb-8afd-a40732fccded.png">


### Running all unit tests after fix:
<img width="1399" alt="Skärmavbild 2021-02-25 kl  15 54 16" src="https://user-images.githubusercontent.com/304423/109171975-938edf80-7782-11eb-904b-9404708fbdde.png">


<!-- Additional comments or screenshots to attach if any -->

<!--
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Jira will detect and link to this PR once created, but you can also link this PR in the description of the corresponding ticket
 ✓ Acknowledge any changes required to the Wiki
 ✓ Finally, in the PR description delete any empty sections and all text commented in <!--, so that this text does not appear in merge commit messages.
-->


Co-authored-by: Johannes Lund <[email protected]>
@Anviking
Copy link
Member

Anviking commented Mar 2, 2021

Should be fixed by #2537

@Anviking
Copy link
Member

Anviking commented Mar 4, 2021

Seen again 🙁 #2542 (comment)

Anviking added a commit that referenced this issue Jun 14, 2021
This might help reduce the unit test timeouts on macOS hydra builds.

Investigating #2472 Jonathan found the following tests to fail with limited ulimit -v:
    36% Match String: "Checkpoint"
    44% Match String: "correct time measures"
   100% Match String: "different request ids"
    20% Match String: "Private Key"
    32% Match String: "Tx History"
    28% Match String: "Wallet Metadata"

where entries 2 and 3 are from LogginsSpec.

The timeouts in CI were in these following locations:

  12 times (28%) 000000 // from "Not Allowed Methods"
  9 times (21%) Checkpoint
  8 times (19%) rollback
  5 times (12%) 8601 // from e.g. "ISO 8601 extended format without timezones"
  4 times (9%) JSON
  4 times (9%) MVar
  4 times (9%) readStakeDistribution // only in the past, so now fixed
  1 times (2%) Coverage

which either suggest there are an 10+ lines of output not shown in the
output, or the LoggingSpec isn't to blame.

So it would be very interesting to see whether this commit reduces
timeouts or not.
Anviking added a commit that referenced this issue Jun 14, 2021
This might help reduce the unit test timeouts on macOS hydra builds.

Investigating #2472 Jonathan found the following tests to fail with limited ulimit -v:
    36% Match String: "Checkpoint"
    44% Match String: "correct time measures"
   100% Match String: "different request ids"
    20% Match String: "Private Key"
    32% Match String: "Tx History"
    28% Match String: "Wallet Metadata"

where entries 2 and 3 are from LogginsSpec.

The timeouts in CI were in these following locations:

  12 times (28%) 000000 // from "Not Allowed Methods"
  9 times (21%) Checkpoint
  8 times (19%) rollback
  5 times (12%) 8601 // from e.g. "ISO 8601 extended format without timezones"
  4 times (9%) JSON
  4 times (9%) MVar
  4 times (9%) readStakeDistribution // only in the past, so now fixed
  1 times (2%) Coverage

which either suggest there are an 10+ lines of output not shown in the
output, or the LoggingSpec isn't to blame.

So it would be very interesting to see whether this commit reduces
timeouts or not.
Anviking added a commit that referenced this issue Jun 14, 2021
This might help reduce the unit test timeouts on macOS hydra builds.

Investigating #2472 Jonathan found the following tests to fail with limited ulimit -v:
    36% Match String: "Checkpoint"
    44% Match String: "correct time measures"
   100% Match String: "different request ids"
    20% Match String: "Private Key"
    32% Match String: "Tx History"
    28% Match String: "Wallet Metadata"

where entries 2 and 3 are from LogginsSpec.

The timeouts in CI were in these following locations:

  12 times (28%) 000000 // from "Not Allowed Methods"
  9 times (21%) Checkpoint
  8 times (19%) rollback
  5 times (12%) 8601 // from e.g. "ISO 8601 extended format without timezones"
  4 times (9%) JSON
  4 times (9%) MVar
  4 times (9%) readStakeDistribution // only in the past, so now fixed
  1 times (2%) Coverage

which either suggest there are an 10+ lines of output not shown in the
output, or the LoggingSpec isn't to blame.

So it would be very interesting to see whether this commit reduces
timeouts or not.
Anviking added a commit that referenced this issue Jun 14, 2021
This might help reduce the unit test timeouts on macOS hydra builds.

Investigating #2472 Jonathan found the following tests to fail with limited ulimit -v:
    36% Match String: "Checkpoint"
    44% Match String: "correct time measures"
   100% Match String: "different request ids"
    20% Match String: "Private Key"
    32% Match String: "Tx History"
    28% Match String: "Wallet Metadata"

where entries 2 and 3 are from LogginsSpec.

The timeouts in CI were in these following locations:

  12 times (28%) 000000 // from "Not Allowed Methods"
  9 times (21%) Checkpoint
  8 times (19%) rollback
  5 times (12%) 8601 // from e.g. "ISO 8601 extended format without timezones"
  4 times (9%) JSON
  4 times (9%) MVar
  4 times (9%) readStakeDistribution // only in the past, so now fixed
  1 times (2%) Coverage

which either suggest there are an 10+ lines of output not shown in the
output, or the LoggingSpec isn't to blame.

So it would be very interesting to see whether this commit reduces
timeouts or not.
Anviking added a commit that referenced this issue Jun 15, 2021
Unit tests on macOS hydra builds are regularly timing out.

Rough analysis suggests more than 50% of recent unit timeouts occur in
the MVar DB properties:

> Broken down by tags/issues:
> 21 times (100%) #2472 Unit tests sometimes time out.
> 19 times (90%) mac
> 19 times (90%) hydra
> 10 times (48%) MVar
> 2 times (10%) buildkite

(./scripts/bors-stats.rb list --fetch-system --tag "#2472" --details true --annotate MVar)

I believe as we run the DB properties on the real Sqlite DB, and
the MVar properties in linux, we shouldn't lose much from disabling them on macOS.
iohk-bors bot added a commit that referenced this issue Jun 16, 2021
2714: Mark MVar DB properties pending on macOS r=Anviking a=Anviking

# Issue Number

#2472 / ADP-970


# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [x] Make `MVar` DB properties pending on macOS (see commit message)

# Comments

<!--
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Jira will detect and link to this PR once created, but you can also link this PR in the description of the corresponding ticket
 ✓ Acknowledge any changes required to the Wiki
 ✓ Finally, in the PR description delete any empty sections and all text commented in <!--, so that this text does not appear in merge commit messages.
-->


Co-authored-by: Johannes Lund <[email protected]>
@Anviking
Copy link
Member

Grouping recent Mac hydra timeouts by month in lack of better ideas, but not sure what to tell from it:

18 Jul (2020) 08:43 hydra, mac https:/input-output-hk/cardano-wallet/pull/1922#issuecomment-660450915

22 Oct 13:32 #2292, hydra, mac https:/input-output-hk/cardano-wallet/pull/2245#issuecomment-714496497

04 Nov 17:06 hydra, mac https:/input-output-hk/cardano-wallet/pull/2191#issuecomment-721857244
06 Nov 15:28 #2292, hydra, mac https:/input-output-hk/cardano-wallet/pull/2297#issuecomment-723140858
09 Nov 12:48 #2292, hydra, mac https:/input-output-hk/cardano-wallet/pull/2297#issuecomment-723991910
18 Nov 16:33 #another-integration-timeout, hydra, mac https:/input-output-hk/cardano-wallet/pull/2329#issuecomment-729797752

01 Dec 18:14 hydra, mac https:/input-output-hk/cardano-wallet/pull/2357#issuecomment-736728788
08 Dec 10:59 #2394, hydra, mac https:/input-output-hk/cardano-wallet/pull/2375#issuecomment-740549051
08 Dec 12:25 #2394, hydra, mac https:/input-output-hk/cardano-wallet/pull/2375#issuecomment-740589546
14 Dec 15:27 hydra, mac https:/input-output-hk/cardano-wallet/pull/2386#issuecomment-744515798
18 Dec 15:29 #2394, hydra, mac https:/input-output-hk/cardano-wallet/pull/2404#issuecomment-748157495
22 Dec 11:24 #2217, hydra, mac https:/input-output-hk/cardano-wallet/pull/2384#issuecomment-749492627

04 Jan 12:24 #2393, hydra, mac https:/input-output-hk/cardano-wallet/pull/2411#issuecomment-753946115
11 Jan 11:25 #2436, hydra, mac https:/input-output-hk/cardano-wallet/pull/2421#issuecomment-757889251
19 Jan 13:23 hydra, mac https:/input-output-hk/cardano-wallet/pull/2455#issuecomment-762836666
26 Jan 08:54 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2464#issuecomment-767398443
26 Jan 09:36 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2464#issuecomment-767421374
28 Jan 12:09 #2393, hydra, mac https:/input-output-hk/cardano-wallet/pull/2468#issuecomment-769011238
28 Jan 15:17 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2471#issuecomment-769156198
28 Jan 16:39 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2473#issuecomment-769212932
28 Jan 16:39 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2474#issuecomment-769212939
28 Jan 20:43 hydra, mac https:/input-output-hk/cardano-wallet/pull/2474#issuecomment-769376642

05 Feb 07:20 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2489#issuecomment-773847340
05 Feb 08:01 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2491#issuecomment-773865683
05 Feb 08:01 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2492#issuecomment-773865688
05 Feb 13:02 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2492#issuecomment-774020041
05 Feb 13:02 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2493#issuecomment-774020048
05 Feb 14:35 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2493#issuecomment-774070116
05 Feb 16:20 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2493#issuecomment-774134141
06 Feb 06:27 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2489#issuecomment-774409486
06 Feb 07:06 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2493#issuecomment-774415321
15 Feb 13:13 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2520#issuecomment-779215889
15 Feb 13:58 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2519#issuecomment-779240782
15 Feb 14:37 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2520#issuecomment-779262244
16 Feb 09:44 #2540, hydra, mac https:/input-output-hk/cardano-wallet/pull/2523#issuecomment-779714295
26 Feb 11:00 #2540, hydra, mac https:/input-output-hk/cardano-wallet/pull/2537#issuecomment-786575587
26 Feb 20:32 #2540, hydra, mac https:/input-output-hk/cardano-wallet/pull/2536#issuecomment-786879109

04 Mar 11:49 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2542#issuecomment-790557256
04 Mar 13:05 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2542#issuecomment-790603762
04 Mar 15:55 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2553#issuecomment-790720635
10 Mar 07:36 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2552#issuecomment-795026254
12 Mar 12:35 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2555#issuecomment-797463390
29 Mar 08:17 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2581#issuecomment-809174170

07 Apr 12:20 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2605#issuecomment-814869405
20 Apr 12:45 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2570#issuecomment-823243764

03 May 12:13 #2436, hydra, mac https:/input-output-hk/cardano-wallet/pull/2637#issuecomment-831220052
07 May 17:28 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2643#issuecomment-834640400
20 May 13:41 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2658#issuecomment-845132842
20 May 14:35 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2658#issuecomment-845178120
20 May 15:38 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2658#issuecomment-845229402
20 May 16:35 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2658#issuecomment-845274098
25 May 13:08 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2667#issuecomment-847855389
25 May 20:17 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2667#issuecomment-848231186

07 Jun 16:27 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2680#issuecomment-856083350
07 Jun 19:32 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2680#issuecomment-856200864
07 Jun 20:29 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2680#issuecomment-856232983
08 Jun 03:16 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2692#issuecomment-856406069
08 Jun 09:36 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2692#issuecomment-856619757
08 Jun 12:47 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2693#issuecomment-856736113
08 Jun 13:45 #2703, hydra, mac https:/input-output-hk/cardano-wallet/pull/2692#issuecomment-856781615
08 Jun 15:29 #2703, hydra, mac https:/input-output-hk/cardano-wallet/pull/2692#issuecomment-856872103
08 Jun 15:29 #timeout, hydra, mac https:/input-output-hk/cardano-wallet/pull/2691#issuecomment-856872111
09 Jun 17:09 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2697#issuecomment-857877192
09 Jun 21:45 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2697#issuecomment-858123424
14 Jun 13:53 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2709#issuecomment-860703099
14 Jun 21:20 #2472, hydra, mac https:/input-output-hk/cardano-wallet/pull/2709#issuecomment-861002934

iohk-bors bot added a commit that referenced this issue Jun 18, 2021
2721: Ensure faucet setup runs on BFT node without rollbacks r=rvl a=Anviking

# Issue Number

ADP-970, #2720, #2428


# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [x] Ensure faucet setup runs on BFT node, such that rollbacks can't mess it up


# Comments

<!-- Additional comments or screenshots to attach if any -->

<!--
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Jira will detect and link to this PR once created, but you can also link this PR in the description of the corresponding ticket
 ✓ Acknowledge any changes required to the Wiki
 ✓ Finally, in the PR description delete any empty sections and all text commented in <!--, so that this text does not appear in merge commit messages.
-->


2723: Use LineBuffering in unit tests r=rvl a=Anviking

# Issue Number

ADP-970 / #2472 


# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [x] Try using line buffering in unit tests, like we do for integration tests


# Comments

<!-- Additional comments or screenshots to attach if any -->

<!--
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Jira will detect and link to this PR once created, but you can also link this PR in the description of the corresponding ticket
 ✓ Acknowledge any changes required to the Wiki
 ✓ Finally, in the PR description delete any empty sections and all text commented in <!--, so that this text does not appear in merge commit messages.
-->


Co-authored-by: Johannes Lund <[email protected]>
Co-authored-by: Rodney Lorrimar <[email protected]>
iohk-bors bot added a commit that referenced this issue Jun 18, 2021
2723: Use LineBuffering in unit tests r=rvl a=Anviking

# Issue Number

ADP-970 / #2472 


# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [x] Try using line buffering in unit tests, like we do for integration tests


# Comments

<!-- Additional comments or screenshots to attach if any -->

<!--
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Jira will detect and link to this PR once created, but you can also link this PR in the description of the corresponding ticket
 ✓ Acknowledge any changes required to the Wiki
 ✓ Finally, in the PR description delete any empty sections and all text commented in <!--, so that this text does not appear in merge commit messages.
-->


Co-authored-by: Johannes Lund <[email protected]>
Co-authored-by: Rodney Lorrimar <[email protected]>
iohk-bors bot added a commit that referenced this issue Jun 18, 2021
2723: Use LineBuffering in unit tests r=Anviking a=Anviking

# Issue Number

ADP-970 / #2472 


# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [x] Try using line buffering in unit tests, like we do for integration tests


# Comments

<!-- Additional comments or screenshots to attach if any -->

<!--
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Jira will detect and link to this PR once created, but you can also link this PR in the description of the corresponding ticket
 ✓ Acknowledge any changes required to the Wiki
 ✓ Finally, in the PR description delete any empty sections and all text commented in <!--, so that this text does not appear in merge commit messages.
-->


Co-authored-by: Johannes Lund <[email protected]>
Co-authored-by: Rodney Lorrimar <[email protected]>
Anviking added a commit that referenced this issue Jun 18, 2021
Attempt to ensure visible progress in the macOS hydra job.

An hypothesis is that #2472 is caused by heavy load and unfocused
resources from running the tests concurrently, risking that the slowest
hspec runner - and thererefore the stdout - being silent for 900s causing
hydra to timeout.

Setting -j 1 should hopefully focus the resource we have in one place. It
should go silent less often, at the expense of the full run getting slower.
Anviking added a commit that referenced this issue Jun 21, 2021
Attempt to ensure visible progress in the macOS hydra job.

An hypothesis is that #2472 is caused by heavy load and unfocused
resources from running the tests concurrently, risking that the slowest
hspec runner - and thererefore the stdout - being silent for 900s causing
hydra to timeout.

Setting -j 1 should hopefully focus the resource we have in one place. It
should go silent less often, at the expense of the full run getting slower.
rvl pushed a commit that referenced this issue Jun 23, 2021
Attempt to ensure visible progress in the macOS hydra job.

An hypothesis is that #2472 is caused by heavy load and unfocused
resources from running the tests concurrently, risking that the slowest
hspec runner - and thererefore the stdout - being silent for 900s causing
hydra to timeout.

Setting -j 1 should hopefully focus the resource we have in one place. It
should go silent less often, at the expense of the full run getting slower.
iohk-bors bot added a commit that referenced this issue Jun 23, 2021
2727: Set -j 1 in macOS nix unit tests r=rvl a=Anviking

# Issue Number

#2472 / ADP-970


# Overview

- [x] Set `-j 1` for hydra Mac builds, in hope this alleviates unit timeouts

# Comments

A hypothesis is that #2472 is caused by heavy load and unfocused
resources from running the tests concurrently, risking that the slowest
hspec runner - and thererefore the stdout - being silent for 900s causing
hydra to timeout.

Setting -j 1 should hopefully focus the resource we have in one place. It
should go silent less often, at the expense of the full run getting slower.

## Testing locally

Tested locally with `nix-build -A checks.cardano-wallet-core`. Seems to work.

It now takes 399s instead of 299.7877 on my machine (Not that dramatic slowdown).

We have a `-with-rtsopts=-N4` in the .cabal file. I'm not sure if that's good or not, but I suspect it doesn't matter as much as the `-j` option.


Co-authored-by: Johannes Lund <[email protected]>
@Anviking
Copy link
Member

Though we haven't had that many merges since the merging of #2727, we've not seen it again, and I think it helped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Test failure A flaky test or nightly CI failure
Projects
None yet
Development

No branches or pull requests

3 participants