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

[bug] investigate issues with qa on unsupported hw #3305

Open
xanimo opened this issue Aug 3, 2023 · 34 comments
Open

[bug] investigate issues with qa on unsupported hw #3305

xanimo opened this issue Aug 3, 2023 · 34 comments
Labels
QA Many Quality Assurance

Comments

@xanimo
Copy link
Member

xanimo commented Aug 3, 2023

upon reviewing #3301 and #3188 on arm64-apple-darwin (m2) i found there are 4 tests failing qa. opening this up as a reminder of things to come re our qa test suite running python 3.11 (and ofc on unsupported hw). here is my log:

https://gist.github.com/xanimo/5271fc15bf21cd60655d4c68bc85aa60

@xanimo
Copy link
Member Author

xanimo commented Aug 3, 2023

following up on this, it appears the tests only error out when attempting to run the full test suite a la ./qa/pull-tester/rpc-tests.py so i posit it's probably something to do with threading, concurrency or something.

@chromatic
Copy link
Member

These look like timeouts to me, but I'm surprised they'd time out on (presumably) strong hardware like an M2.

@xanimo
Copy link
Member Author

xanimo commented Aug 4, 2023

indeed, i was surprised too but it's definitely possible to replicate. i need to do a deep dive.

@patricklodder patricklodder added the QA Many Quality Assurance label Aug 4, 2023
@patricklodder

This comment was marked as outdated.

@patricklodder
Copy link
Member

I've found some issues in configure.ac that were preventing usage of the bdb brew packages other than default, because the default package parametrization was overwriting @5 - or even the configured BDB_CFLAGS and BDB_LIBS. Am testing a patch for this and can PR once done, unless someone beats me to a solution.

However, after compiling with a working wallet, I cannot reproduce your issue using #3301 with or without the ARMv8.2 crypto routines. All tests pass for me in 5 out of 5 runs right now for each flavor.

@xanimo
Copy link
Member Author

xanimo commented Aug 7, 2023

interesting. i managed to dl 5.3 using brew (brew install berekely-db@5) but did a work around in renaming the directory to omit the @5 which initially caused it to not be picked up in configure.ac. this was the configure command i used:

 ./configure --without-gui --with-bdb=/opt/homebrew/opt/berkeley-db --with-boost=/opt/homebrew/Cellar/boost/1.82.0_1 --enable-experimental --with-armv82-crypto

outside of that i suspect it has something to do with m2 specifically.

@patricklodder
Copy link
Member

did a work around in renaming the directory to omit the @5 which initially caused it to not be picked up in configure.ac

I'm proposing a fix to the brew mess in #3308 - works on both my M1 and x86_64 macs.

outside of that i suspect it has something to do with m2 specifically.

Can you try without experimental features? (Didn't make a difference for me tho)

@xanimo
Copy link
Member Author

xanimo commented Aug 7, 2023

yeah let me do try without experimental features and then i'll try again after rebase #3308 on top.

@xanimo
Copy link
Member Author

xanimo commented Aug 8, 2023

strange. i thought i had solved my python version issue (which was set as 3.10) but just got this after rebasing on #3308 so will have to figure that out after dinner, and yeah compiling without experimental didn't do anything unfortunately:

clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -I/opt/homebrew/opt/berkeley-db/include -I. -I/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -c scryptmodule.c -o build/temp.macosx-10.9-universal2-cpython-39/scryptmodule.o
      scryptmodule.c:17:10: fatal error: 'Python.h' file not found
      #include <Python.h>
               ^~~~~~~~~~
      1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for ltc-scrypt
  Running setup.py clean for ltc-scrypt
Failed to build ltc-scrypt
ERROR: Could not build wheels for ltc-scrypt, which is required to install pyproject.toml-based projects

@xanimo
Copy link
Member Author

xanimo commented Aug 8, 2023

nevermind, running it now.

@xanimo
Copy link
Member Author

xanimo commented Aug 8, 2023

TEST                           | PASSED | DURATION

p2p-fullblocktest.py           | True   | 96 s
auxpow.py                      | True   | 30 s
getauxblock.py                 | False  | 102 s
fundrawtransaction.py          | True   | 278 s
wallet-accounts.py             | True   | 131 s
walletbackup.py                | True   | 430 s
wallet-dump.py                 | True   | 90 s
listtransactions.py            | True   | 74 s
wallet.py                      | True   | 276 s
p2p-policy.py                  | True   | 45 s
p2p-acceptblock.py             | False  | 58 s
zapwallettxes.py               | True   | 56 s
sendheaders.py                 | False  | 107 s
merkle_blocks.py               | True   | 47 s
importmulti.py                 | True   | 109 s
mempool_limit.py               | True   | 92 s
receivedby.py                  | True   | 40 s
abandonconflict.py             | True   | 62 s
reindex.py                     | True   | 39 s
p2p-addr.py                    | True   | 18 s
rawtransactions.py             | True   | 64 s
p2p_invalid_locator.py         | True   | 7 s
mempool_resurrect_test.py      | True   | 8 s
p2p-tx-download.py             | False  | 49 s
txn_doublespend.py --mineblock | True   | 36 s
txn_clone.py                   | True   | 39 s
mempool_spendcoinbase.py       | True   | 9 s
rest.py                        | True   | 47 s
mempool_reorg.py               | True   | 33 s
multi_rpc.py                   | True   | 6 s
getchaintips.py                | True   | 71 s
httpbasics.py                  | True   | 16 s
signrawtransactions.py         | True   | 4 s
wallet-hd.py                   | True   | 865 s
decodescript.py                | True   | 4 s
proxy_test.py                  | True   | 14 s
disablewallet.py               | True   | 3 s
nodehandling.py                | True   | 12 s
blockchain.py                  | True   | 9 s
p2p-mempool.py                 | True   | 6 s
keypool.py                     | True   | 16 s
invalidblockrequest.py         | True   | 13 s
preciousblock.py               | True   | 27 s
importprunedfunds.py           | True   | 21 s
signmessages.py                | True   | 6 s
createauxblock.py              | True   | 27 s
prioritise_transaction.py      | True   | 45 s
feelimit.py                    | True   | 46 s
paytxfee.py                    | True   | 86 s
dustlimits.py                  | True   | 119 s
setmaxconnections.py           | True   | 69 s
rpcnamedargs.py                | True   | 6 s
import-rescan.py               | True   | 137 s
p2p-leaktests.py               | True   | 13 s
bumpfee.py                     | True   | 73 s
rescan.py                      | True   | 39 s
replace-by-fee.py              | True   | 48 s
listsinceblock.py              | True   | 65 s
wallet_create_tx.py            | True   | 24 s
addnode.py                     | True   | 6 s
liststucktransactions.py       | True   | 39 s

ALL                            | False  | 4407 s (accumulated)

Runtime: 1130 s
bluezr@lmao dogecoin % ./qa/pull-tester/rpc-tests.py getauxblock
......................
getauxblock.py:
Pass: True, Duration: 11 s

TEST           | PASSED | DURATION

getauxblock.py | True   | 11 s

ALL            | True   | 11 s (accumulated)

Runtime: 11 s
bluezr@lmao dogecoin % ./qa/pull-tester/rpc-tests.py p2p-acceptblock
......................................
p2p-acceptblock.py:
Pass: True, Duration: 19 s

TEST               | PASSED | DURATION

p2p-acceptblock.py | True   | 19 s

ALL                | True   | 19 s (accumulated)

Runtime: 19 s
bluezr@lmao dogecoin % ./qa/pull-tester/rpc-tests.py sendheaders    
..................................................................................
sendheaders.py:
Pass: True, Duration: 41 s

TEST           | PASSED | DURATION

sendheaders.py | True   | 41 s

ALL            | True   | 41 s (accumulated)

Runtime: 41 s
bluezr@lmao dogecoin % ./qa/pull-tester/rpc-tests.py p2p-tx-download
...............................................
p2p-tx-download.py:
Pass: True, Duration: 24 s

TEST               | PASSED | DURATION

p2p-tx-download.py | True   | 24 s

ALL                | True   | 24 s (accumulated)

Runtime: 24 s
bluezr@lmao dogecoin % ./qa/pull-tester/rpc-tests.py getauxblock p2p-acceptblock sendheaders p2p-tx-download
..........................................
p2p-acceptblock.py:
Initializing test directory /var/folders/jz/v7ct3pb126n5bl1cln4h5jcm0000gn/T/test_guj_2qk/352
MiniNode: Connecting to Bitcoin Node IP # 127.0.0.1:13816
MiniNode: Connecting to Bitcoin Node IP # 127.0.0.1:13817
First height 2 block accepted by both nodes
Second height 2 block accepted only from whitelisted peer
Unrequested more-work block accepted from non-whitelisted peer
Successfully reorged to length 3 chain from whitelisted peer
JSONRPC error: Block not found
Stopping nodes
Not cleaning up dir /var/folders/jz/v7ct3pb126n5bl1cln4h5jcm0000gn/T/test_guj_2qk/352
Failed

stderr:
  File "/Users/bluezr/source/repos/dogecoin/qa/rpc-tests/test_framework/test_framework.py", line 145, in main
    self.run_test()
  File "/Users/bluezr/source/repos/dogecoin/qa/rpc-tests/p2p-acceptblock.py", line 250, in run_test
    self.nodes[0].getblock(x.hash)
  File "/Users/bluezr/source/repos/dogecoin/qa/rpc-tests/test_framework/coverage.py", line 49, in __call__
    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
  File "/Users/bluezr/source/repos/dogecoin/qa/rpc-tests/test_framework/authproxy.py", line 154, in __call__
    raise JSONRPCException(response['error'])

Pass: False, Duration: 21 s

...
getauxblock.py:
Pass: True, Duration: 23 s

.................
p2p-tx-download.py:
Pass: True, Duration: 32 s

......................................
sendheaders.py:
Pass: True, Duration: 52 s

TEST               | PASSED | DURATION

p2p-acceptblock.py | False  | 21 s
getauxblock.py     | True   | 23 s
p2p-tx-download.py | True   | 32 s
sendheaders.py     | True   | 52 s

ALL                | False  | 128 s (accumulated)

Runtime: 52 s

@xanimo
Copy link
Member Author

xanimo commented Aug 8, 2023

going to try the whole test suite again with -parallel=4.

bluezr@lmao dogecoin % ./qa/pull-tester/rpc-tests.py getauxblock p2p-acceptblock sendheaders p2p-tx-download -parallel=4
..........................................
getauxblock.py:
Pass: True, Duration: 21 s

......................
p2p-tx-download.py:
Pass: True, Duration: 33 s


p2p-acceptblock.py:
Pass: True, Duration: 33 s

.....................................
sendheaders.py:
Pass: True, Duration: 52 s

TEST               | PASSED | DURATION

getauxblock.py     | True   | 21 s
p2p-tx-download.py | True   | 33 s
p2p-acceptblock.py | True   | 33 s
sendheaders.py     | True   | 52 s

ALL                | True   | 139 s (accumulated)

Runtime: 52 s

@patricklodder
Copy link
Member

patricklodder commented Aug 8, 2023

Those all look like race conditions. To make sure that these are errors in the test and not the C++ code, would you mind doing this with --enable-debug (on ./configure)?

@xanimo
Copy link
Member Author

xanimo commented Aug 8, 2023

yeah absolutely, let me try rn. also want to note that the results from using parallel last night on the full test suite failed as well.

@xanimo
Copy link
Member Author

xanimo commented Aug 8, 2023

so i'm unable to build using --enable-debug:

sync.cpp:60:14: error: no template named 'set' in namespace 'std'
typedef std::set<std::pair<void*, void*> > InvLockOrders;
        ~~~~~^
sync.cpp:123:31: error: member reference base type 'InvLockOrders' (aka 'int') is not a structure or union
        lockdata.invlockorders.insert(p2);
        ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
sync.cpp:172:31: error: member reference base type 'InvLockOrders' (aka 'int') is not a structure or union
        lockdata.invlockorders.erase(invitem);
        ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
sync.cpp:175:5: error: 'InvLockOrders' (aka 'int') is not a class, namespace, or enumeration
    InvLockOrders::iterator invit = lockdata.invlockorders.lower_bound(item);
    ^
sync.cpp:175:59: error: member reference base type 'InvLockOrders' (aka 'int') is not a structure or union
    InvLockOrders::iterator invit = lockdata.invlockorders.lower_bound(item);
                                    ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
sync.cpp:176:43: error: member reference base type 'InvLockOrders' (aka 'int') is not a structure or union
    while (invit != lockdata.invlockorders.end() && invit->first == cs) {
                    ~~~~~~~~~~~~~~~~~~~~~~^~~~
sync.cpp:179:31: error: member reference base type 'InvLockOrders' (aka 'int') is not a structure or union
        lockdata.invlockorders.erase(invit++);
        ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
7 errors generated.
make[2]: *** [libdogecoin_util_a-sync.o] Error 1
make[1]: *** [check-recursive] Error 1
make: *** [check-recursive] Error 1

@xanimo
Copy link
Member Author

xanimo commented Aug 8, 2023

this was noted above in the config.log:

  CXX      libdogecoin_server_a-validation.o
In file included from validation.cpp:51:
In file included from /opt/homebrew/opt/boost/include/boost/math/distributions/poisson.hpp:40:
In file included from /opt/homebrew/opt/boost/include/boost/math/special_functions/gamma.hpp:17:
In file included from /opt/homebrew/opt/boost/include/boost/math/tools/series.hpp:16:
/opt/homebrew/opt/boost/include/boost/math/tools/config.hpp:23:6: warning: "The minimum language standard to use Boost.Math will be C++14 starting in July 2023 (Boost 1.82 release)" [-W#warnings]
#    warning "The minimum language standard to use Boost.Math will be C++14 starting in July 2023 (Boost 1.82 release)"

so not sure if i should attempt to use 1.63? or bump to 14 or...what's going on here.

@patricklodder
Copy link
Member

i'm unable to build using --enable-debug

I'm running into the same issue with clang, it's caused by -DDEBUG_LOCKORDER, which is exactly the debug feature we'd want to use. I'm investigating this in parallel.

Do we agree that none of this is caused by #3301 though? Or do you have remaining reservations?

@patricklodder
Copy link
Member

i'm unable to build using --enable-debug

following patch fixed it for me:

diff --git a/src/sync.cpp b/src/sync.cpp
index fce57f1df..6cb3d6713 100644
--- a/src/sync.cpp
+++ b/src/sync.cpp
@@ -11,6 +11,7 @@
 
 #include <boost/foreach.hpp>
 #include <boost/thread.hpp>
+#include <set>
 
 #ifdef DEBUG_LOCKCONTENTION
 void PrintLockContention(const char* pszName, const char* pszFile, int nLine)

I'll deliver a bigger PR to resolve this soon, taking a little more time because it turns out there are also 2 types of undefined behavior in this code and it is seeded with unnecessary boost macros.

@xanimo
Copy link
Member Author

xanimo commented Aug 9, 2023

i'm unable to build using --enable-debug

I'm running into the same issue with clang, it's caused by -DDEBUG_LOCKORDER, which is exactly the debug feature we'd want to use. I'm investigating this in parallel.

Do we agree that none of this is caused by #3301 though? Or do you have remaining reservations?

no reservations re #3301, i think that's good to go.

@xanimo
Copy link
Member Author

xanimo commented Aug 9, 2023

TEST                           | PASSED | DURATION

p2p-fullblocktest.py           | True   | 31 s
auxpow.py                      | True   | 9 s
getauxblock.py                 | True   | 16 s
fundrawtransaction.py          | True   | 96 s
wallet-accounts.py             | True   | 26 s
wallet-dump.py                 | True   | 21 s
wallet.py                      | True   | 107 s
wallet-hd.py                   | True   | 179 s
listtransactions.py            | True   | 38 s
p2p-policy.py                  | True   | 22 s
walletbackup.py                | True   | 189 s
importmulti.py                 | True   | 20 s
zapwallettxes.py               | True   | 21 s
sendheaders.py                 | True   | 36 s
merkle_blocks.py               | True   | 13 s
p2p-acceptblock.py             | True   | 47 s
mempool_limit.py               | True   | 17 s
receivedby.py                  | True   | 19 s
reindex.py                     | True   | 14 s
abandonconflict.py             | True   | 18 s
p2p_invalid_locator.py         | True   | 3 s
mempool_resurrect_test.py      | True   | 3 s
rawtransactions.py             | True   | 24 s
p2p-addr.py                    | True   | 12 s
txn_doublespend.py --mineblock | True   | 13 s
p2p-tx-download.py             | True   | 22 s
txn_clone.py                   | True   | 13 s
mempool_spendcoinbase.py       | True   | 3 s
mempool_reorg.py               | True   | 10 s
httpbasics.py                  | True   | 8 s
multi_rpc.py                   | True   | 3 s
signrawtransactions.py         | True   | 3 s
rest.py                        | True   | 20 s
getchaintips.py                | True   | 33 s
decodescript.py                | True   | 3 s
proxy_test.py                  | True   | 11 s
disablewallet.py               | True   | 2 s
blockchain.py                  | True   | 6 s
nodehandling.py                | True   | 10 s
p2p-mempool.py                 | True   | 4 s
keypool.py                     | True   | 8 s
invalidblockrequest.py         | True   | 5 s
importprunedfunds.py           | True   | 7 s
preciousblock.py               | True   | 10 s
signmessages.py                | True   | 3 s
prioritise_transaction.py      | True   | 19 s
createauxblock.py              | True   | 14 s
feelimit.py                    | True   | 24 s
paytxfee.py                    | True   | 29 s
import-rescan.py               | True   | 41 s
rpcnamedargs.py                | True   | 3 s
dustlimits.py                  | True   | 45 s
p2p-leaktests.py               | True   | 8 s
bumpfee.py                     | True   | 26 s
replace-by-fee.py              | True   | 9 s
rescan.py                      | True   | 11 s
wallet_create_tx.py            | True   | 12 s
listsinceblock.py              | True   | 36 s
addnode.py                     | True   | 3 s
liststucktransactions.py       | True   | 19 s
setmaxconnections.py           | True   | 62 s

ALL                            | True   | 1539 s (accumulated)

Runtime: 398 s

so that fixed it :) also disregard changes to depends, still a work in progress re openssl :/
https://github.com/xanimo/dogecoin/commits/45f6f5877e3407078739337a20e7f313b1e86f01

@xanimo
Copy link
Member Author

xanimo commented Aug 9, 2023

@patricklodder
Copy link
Member

Okay. It's sort of unfortunate that the entire test ran without errors.

Is bumping boost to 1.70 / patching OpenSSL in depends related to this issue? To x-compile or to locally build?

@xanimo
Copy link
Member Author

xanimo commented Aug 9, 2023

Okay. It's sort of unfortunate that the entire test ran without errors.

Is bumping boost to 1.70 / patching OpenSSL in depends related to this issue? To x-compile or to locally build?

i couldn't get through depends :( it failed on boost 1.63, hence the bump, and then failed on openssl, even after adding the patch to support darwin64-arm64-cc:

Configured for debug-darwin64-arm64-cc.

*** Because of configuration changes, you MUST do the following before
*** building:

        make depend
making depend in crypto...
In file included from cryptlib.c:117:
./cryptlib.h:62:11: fatal error: 'stdlib.h' file not found
# include <stdlib.h>
          ^~~~~~~~~~
1 error generated.
mem.c:59:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
         ^~~~~~~~~
1 error generated.
mem_clr.c:60:10: fatal error: 'string.h' file not found
#include <string.h>
         ^~~~~~~~~~
1 error generated.
mem_dbg.c:112:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
         ^~~~~~~~~
1 error generated.
In file included from cversion.c:59:
./cryptlib.h:62:11: fatal error: 'stdlib.h' file not found
# include <stdlib.h>
          ^~~~~~~~~~
1 error generated.
In file included from ex_data.c:141:
./cryptlib.h:62:11: fatal error: 'stdlib.h' file not found
# include <stdlib.h>
          ^~~~~~~~~~
1 error generated.
cpt_err.c:62:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
         ^~~~~~~~~
1 error generated.
In file included from uid.c:56:
../include/openssl/crypto.h:120:11: fatal error: 'stdlib.h' file not found
# include <stdlib.h>
          ^~~~~~~~~~
1 error generated.
o_time.c:65:10: fatal error: 'string.h' file not found
#include <string.h>
         ^~~~~~~~~~
1 error generated.
o_str.c:60:10: fatal error: 'ctype.h' file not found
#include <ctype.h>
         ^~~~~~~~~
1 error generated.
o_dir.c:60:10: fatal error: 'errno.h' file not found
#include <errno.h>
         ^~~~~~~~~
1 error generated.
In file included from o_fips.c:59:
./cryptlib.h:62:11: fatal error: 'stdlib.h' file not found
# include <stdlib.h>
          ^~~~~~~~~~
1 error generated.
In file included from o_init.c:56:
../e_os.h:468:14: fatal error: 'unistd.h' file not found
#    include OPENSSL_UNISTD
             ^~~~~~~~~~~~~~
../include/openssl/opensslconf.h:230:24: note: expanded from macro 'OPENSSL_UNISTD'
#define OPENSSL_UNISTD <unistd.h>
                       ^~~~~~~~~~
<scratch space>:2:1: note: expanded from here
<unistd.h>
^~~~~~~~~~
1 error generated.
getenv.c:14:10: fatal error: 'stdlib.h' file not found
#include <stdlib.h>
         ^~~~~~~~~~
1 error generated.
make[2]: *** [local_depend] Error 1
make[1]: *** [depend] Error 1
make: *** [/Users/bluezr/source/repos/dogecoin/depends/work/build/arm-apple-darwin22.6.0/openssl/1.0.2-dba0305ce77/./.stamp_configured] Error 2

so that said, everything i did to pass was only up to wip: make DEBUG_LOCKORDER work with clang on the edited commit link and by running:

make distclean
./autogen.sh && ./configure --with-boost=`brew --prefix boost` --enable-debug
make check
./qa/pull-tester/rpc-tests.py

@xanimo
Copy link
Member Author

xanimo commented Aug 9, 2023

i did however upgrade to mavericks last night and noticed that 8 prompts popped up to allow incoming/outgoing requests to dogecoind instead of the previous 4.

@xanimo
Copy link
Member Author

xanimo commented Aug 9, 2023

oops i meant ventura.

@patricklodder
Copy link
Member

MOST IMPORTANT Q: How do you want to proceed testing THIS issue?


Re: depends.

i couldn't get through depends :( it failed on boost 1.63, hence the bump, and then failed on openssl, even after adding the patch to support darwin64-arm64-cc

Depends is maintained with a focal x86_64 guarantee only at this time. If you really want to support macOS as a depends / x-compile build host there are a ton of patches to the depend system itself to pull first because there are known conflicts between the x86 host x-compile configuration and using a darwin build host. I personally think it's better to make that work with 1.21 than with 1.14, but it is not impossible to do the latter.

Boost upgrade could be interesting, depending on what it brings in terms of fixes. I'm assuming you and yours are not building any new features that actually require 1.70 or later, with all the boost hate being voiced?


Re: allow networking

noticed that 8 prompts popped up to allow incoming/outgoing requests to dogecoind instead of the previous 4.

Interesting. I think I have never seen such thing, but I am withholding one patch at the moment so that I can test the macOS doc on multiple versions of arm and x86 now that there's an actual working build, before I mark as ready. Can you open a new issue with the details?

@xanimo
Copy link
Member Author

xanimo commented Aug 9, 2023

MOST IMPORTANT Q: How do you want to proceed testing THIS issue?

this issue re qa can definitely be closed.

Re: depends.

i couldn't get through depends :( it failed on boost 1.63, hence the bump, and then failed on openssl, even after adding the patch to support darwin64-arm64-cc

Depends is maintained with a focal x86_64 guarantee only at this time. If you really want to support macOS as a depends / x-compile build host there are a ton of patches to the depend system itself to pull first because there are known conflicts between the x86 host x-compile configuration and using a darwin build host. I personally think it's better to make that work with 1.21 than with 1.14, but it is not impossible to do the latter.

Boost upgrade could be interesting, depending on what it brings in terms of fixes. I'm assuming you and yours are not building any new features that actually require 1.70 or later, with all the boost hate being voiced?

yeah no me and mines aren't doing nothing, i honestly could've just applied that patch to 1.63 probably but i have no qualms using it but would've failed on openssl anyway and yes i saw red x's across the board when i pushed the previous runs so i think i'll put any upgrades on hold.

Re: allow networking

noticed that 8 prompts popped up to allow incoming/outgoing requests to dogecoind instead of the previous 4.

Interesting. I think I have never seen such thing, but I am withholding one patch at the moment so that I can test the macOS doc on multiple versions of arm and x86 now that there's an actual working build, before I mark as ready. Can you open a new issue with the details?

yeah sure, it's really just the firewall asking if i want to allow an app through but if you need details i can open an issue for sure. otherwise feel free to close this as my issue is solved or i will when i get back from my walk to the grocery store. <3

@patricklodder
Copy link
Member

patricklodder commented Aug 9, 2023

this issue re qa can definitely be closed.

Wait... How did we fix the test races? Adding std::set to fix inclusion hell cannot be it, right? <insert padme>

@xanimo
Copy link
Member Author

xanimo commented Aug 10, 2023

i didn't use the patch, just cherry-picked xanimo@ca3675e but this one just solves --enable-debug. outside of that i suspect the fresh install of ventura possibly fixed things for me, but will run it a couple more times just to be sure.

@xanimo
Copy link
Member Author

xanimo commented Aug 10, 2023

hmm ok nevermind. going to run with --tracerpc.

@xanimo
Copy link
Member Author

xanimo commented Aug 10, 2023

ok so i've ran the test suite 6 times and failed on p2p-tx-download twice so going to do a deeper dive on that test specifically.

@xanimo
Copy link
Member Author

xanimo commented Aug 10, 2023

i think that time.sleep(0.1) in place until getmocktime is available, on L153 in p2p-tx-download, might be what's causing the issue on m2. i bumped it to 0.5 and am on the 3rd iteration and haven't encountered any issues yet.

@patricklodder
Copy link
Member

I ran both p2p-tx-download.py and p2p-acceptblock a couple of times and I have been able to reproduce timing errors on an M1 too. In both cases there is a time.sleep call involved.

The interesting thing about both errors though is that they are caused by the expected time it takes to process a certain action to complete being exceeded, which is odd because my M1 bench_dogecoin results are overall better than my i7_970 results. So there's something going on, but it can be anything.

However, since running qa should really not be a means to measure performance, I think the best solution to this issue is to:

  1. implement a getmocktime call and use it in the tests
  2. refactor any other time.sleep race-the-clock constructs in tests in favor of polls with a significant timeout, i.e. 30 seconds or more.

@xanimo
Copy link
Member Author

xanimo commented Aug 10, 2023

agreed and a relief you were able to reproduce. i'll take a look at implementing a getmocktime/refactoring in a little bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QA Many Quality Assurance
Projects
None yet
Development

No branches or pull requests

3 participants