#1 2022-04-19 20:27:20

sstillwell
Member
From: Kansas City, MO, USA
Registered: 2019-06-18
Posts: 27

Building/running for Apple Silicon M1 (aarch64-darwin)

Okay, so I found {$define NOSQLITE3STATIC} in mormot.defines.inc, and turned that on, to build the mormot2tests.dpr.  Doing a clean and build allowed it to complete, although I get 124 "errors" that are actually ld warnings, of the form:

ld: warning: object file (/Users/scott/fpcupdeluxe/ccr/mORMot2/test/fpc/lib/aarch64-darwin/mormot2tests.o) was built for newer macOS version (11.0) than being linked (10.8)

when I run the regression tests, I get:

Last login: Tue Apr 19 13:14:03 on ttys001
/Users/scott/fpcupdeluxe/ccr/mORMot2/test/fpc/bin/aarch64-darwin/mormot2tests ; exit;
➜  ~ /Users/scott/fpcupdeluxe/ccr/mORMot2/test/fpc/bin/aarch64-darwin/mormot2tests ; exit;

   mORMot2 Regression Tests
  --------------------------


1. Core units

 1.1. Core base: 
  - RecordCopy: 743 assertions passed  65us
  - TRawUtf8List: 190,174 assertions passed  161.42ms
  - TDynArray: 1,091,805 assertions passed  245.83ms
  - TDynArrayHashed: 1,599,070 assertions passed  1.03s
  - TSynDictionary: 283,050 assertions passed  426.71ms
  - TSynQueue: 6,541,501 assertions passed  128.35ms
  - TSynNameValue: 40,032 assertions passed  63.83ms
  - TRawUtf8Interning: 2,000,013 assertions passed  497.83ms
     500000 interning 16 KB in 27.31ms i.e. 17.4M/s, aver. 54ns, 558.7 MB/s
     500000 direct 15.2 MB in 230.52ms i.e. 2M/s, aver. 461ns, 66.1 MB/s
  - TObjArray: 3,230 assertions passed  3.08ms
  - Custom RTL: 297,646 assertions passed  517.82ms
     FillChar in 5.03ms, 77.1 GB/s
     Move in 7.97ms, 39.1 GB/s
     small Move in 27.71ms, 3.9 GB/s
     big Move in 10.95ms, 35.6 GB/s
     FillCharFast in 5.72ms, 67.8 GB/s
     MoveFast in 7.73ms, 40.4 GB/s
     small MoveFast in 29.53ms, 3.7 GB/s
     big MoveFast in 8.45ms, 46.1 GB/s
  - Fast string compare: 41 assertions passed  31us
  - IdemPropName: 228 assertions passed  211us
  - Url encoding: 167 assertions passed  968us
  - GUID: 10,019 assertions passed  33.45ms
  - ParseCommandArguments: 232 assertions passed  59us
  - IsMatch: 4,250 assertions passed  142us
  - TExprParserMatch: 140 assertions passed  199us
  - Soundex: 35 assertions passed  12us
  - Numerical conversions: 2,543,429 assertions passed  1.45s
     100000 FloatToText  in 107.65ms i.e. 907.1K/s, aver. 1.07us, 16.8 MB/s
     100000 str  in 11.80ms i.e. 8M/s, aver. 118ns, 193.8 MB/s
     100000 DoubleToShort  in 6.76ms i.e. 14.1M/s, aver. 67ns, 296.2 MB/s
     100000 DoubleToAscii  in 6.35ms i.e. 15M/s, aver. 63ns, 318.2 MB/s
  - Integers: 146,512 assertions passed  32.33ms
  - crc32c: 100,074 assertions passed  95.31ms
      pas 377.3 MB/s fast 805.3 MB/s
  - Random32: 221,003 assertions passed  1.59ms
     240000 Random32 in 1.21ms i.e. 188M/s, aver. 5ns, 752.2 MB/s
     RandomBytes in 311us, 1.1 GB/s
[1]    82131 segmentation fault  /Users/scott/fpcupdeluxe/ccr/mORMot2/test/fpc/bin/aarch64-darwin/mormot2tests

Saving session...completed.
Deleting expired sessions...none found.

[Process completed]

Ideas?  Am I being too much of a n00b here?

Offline

#2 2022-04-19 20:30:26

sstillwell
Member
From: Kansas City, MO, USA
Registered: 2019-06-18
Posts: 27

Re: Building/running for Apple Silicon M1 (aarch64-darwin)

Oops, I should add that I have built FPC and Lazarus both against the "fixes" branch via fpcupdeluxe, and mORMot2 HEAD via fpcupdeluxe.  I am doing this on an M1 Mac mini running macOS Monterey 12.3.1, Xcode 13.3

Offline

#3 2022-04-19 21:33:13

sstillwell
Member
From: Kansas City, MO, USA
Registered: 2019-06-18
Posts: 27

Re: Building/running for Apple Silicon M1 (aarch64-darwin)

On the other hand, building for aarch64-linux is dead simple and worked the first time with zero failures in the regression tests.  Bravo!

:~/fpcupd/ccr/mORMot2/test/fpc/bin/aarch64-linux$ ./mormot2tests

   mORMot2 Regression Tests
  --------------------------


1. Core units

 1.1. Core base: 
  - RecordCopy: 743 assertions passed  369us
  - TRawUtf8List: 190,174 assertions passed  229.15ms
  - TDynArray: 1,091,805 assertions passed  400.30ms
  - TDynArrayHashed: 1,599,070 assertions passed  1.66s
  - TSynDictionary: 283,050 assertions passed  718.96ms
  - TSynQueue: 6,541,501 assertions passed  287.40ms
  - TSynNameValue: 40,032 assertions passed  83.72ms
  - TRawUtf8Interning: 2,000,013 assertions passed  652.43ms
     500000 interning 16 KB in 33.83ms i.e. 14M/s, aver. 67ns, 450.9 MB/s
     500000 direct 15.2 MB in 321.51ms i.e. 1.4M/s, aver. 643ns, 47.4 MB/s
  - TObjArray: 3,230 assertions passed  4.67ms
  - Custom RTL: 297,646 assertions passed  1.14s
     FillChar in 18.86ms, 20.6 GB/s
     Move in 199.67ms, 1.5 GB/s
     small Move in 83.34ms, 1.3 GB/s
     big Move in 223.45ms, 1.7 GB/s
     FillCharFast in 8.89ms, 43.6 GB/s
     MoveFast in 19.27ms, 16.2 GB/s
     small MoveFast in 26.84ms, 4 GB/s
     big MoveFast in 34.88ms, 11.1 GB/s
  - Fast string compare: 41 assertions passed  28us
  - IdemPropName: 228 assertions passed  936us
  - Url encoding: 167 assertions passed  1.37ms
  - GUID: 10,019 assertions passed  42.96ms
  - ParseCommandArguments: 232 assertions passed  83us
  - IsMatch: 4,250 assertions passed  859us
  - TExprParserMatch: 140 assertions passed  488us
  - Soundex: 35 assertions passed  32us
  - Numerical conversions: 2,542,468 assertions passed  1.93s
     100000 FloatToText  in 149.81ms i.e. 651.8K/s, aver. 1.49us, 12.1 MB/s
     100000 str  in 18.69ms i.e. 5.1M/s, aver. 186ns, 122.4 MB/s
     100000 DoubleToShort  in 12.28ms i.e. 7.7M/s, aver. 122ns, 163.1 MB/s
     100000 DoubleToAscii  in 11.66ms i.e. 8.1M/s, aver. 116ns, 173.4 MB/s
  - Integers: 146,512 assertions passed  39.99ms
  - crc32c: 310,089 assertions passed  127.14ms
      pas 208 MB/s fast 829.1 MB/s armv8 8.1 GB/s
  - Random32: 221,003 assertions passed  4.13ms
     240000 Random32 in 3.54ms i.e. 64.6M/s, aver. 14ns, 258.4 MB/s
     RandomBytes in 487us, 784 MB/s
  - Bloom filters: 2,010,072 assertions passed  151.61ms
  - DeltaCompress: 3,087 assertions passed  28.23ms
  - Curr 64: 20,056 assertions passed  6.23ms
  - CamelCase: 11 assertions passed  37us
  - Bits: 15,567 assertions passed  24.11ms
  - Ini files: 7,028 assertions passed  39.99ms
  - UTF8: 1,386,120 assertions passed  1.18s
  - Url decoding: 1,301 assertions passed  838us
  - Mime types: 450 assertions passed  2.95ms
  - Baudot code: 10,007 assertions passed  53.72ms
  - Iso 8601 date and time: 200,831 assertions passed  67.34ms
  - Time zones: 459 assertions passed  202.32ms
  - Quick select: 4,015 assertions passed  97.15ms
  - TSynCache: 408 assertions passed  569us
  - TSynFilter: 804 assertions passed  4.66ms
  - TSynValidate: 677 assertions passed  2.18ms
  - TSynLogFile: 56 assertions passed  395us
  - TSynUniqueIdentifier: 1,300,002 assertions passed  2.14s
     200000 ComputeNew in 5.26ms i.e. 36.2M/s, aver. 26ns
  Total failed: 0 / 20,243,399  - Core base PASSED  11.35s

 1.2. Core process: 
  - RTTI: 1,345 assertions passed  2.48ms
  - Url encoding: 300 assertions passed  1.84ms
  - Encode decode JSON: 432,071 assertions passed  523.91ms
  - JSON benchmark: 100,519 assertions passed  11.91s
     StrLen() in 1.44ms, 13.2 GB/s
     IsValidUtf8(RawUtf8) in 11.76ms, 1.6 GB/s
     IsValidUtf8(PUtf8Char) in 13.06ms, 1.4 GB/s
     IsValidJson(RawUtf8) in 22.63ms, 866.2 MB/s
     IsValidJson(PUtf8Char) in 22.56ms, 868.8 MB/s
     JsonArrayCount(P) in 22.87ms i.e. 6.8M/s, 857.1 MB/s
     JsonArrayCount(P,PMax) in 22.51ms i.e. 6.9M/s, 870.8 MB/s
     JsonObjectPropCount() in 11.73ms, 0.9 GB/s
     jsonUnquotedPropNameCompact in 73.14ms, 237.9 MB/s
     jsonHumanReadable in 145.56ms, 171.3 MB/s
     TDocVariant in 2.25s i.e. 71.3K/s, 8.7 MB/s
     TDocVariant no guess in 2.72s i.e. 58.9K/s, 7.1 MB/s
     TDocVariant dvoIntern in 1.13s i.e. 141K/s, 17.2 MB/s
     TOrmTableJson save in 33.91ms i.e. 4.6M/s, 254.2 MB/s
     TOrmTableJson exp in 47.03ms i.e. 3.3M/s, 416.8 MB/s
     TOrmTableJson not exp in 20.99ms i.e. 7.4M/s, 410.6 MB/s
     TDocVariant FromResults exp in 798.83ms i.e. 201.1K/s, 24.5 MB/s
     TDocVariant FromResults not exp in 773.31ms i.e. 207.7K/s, 11.1 MB/s
     DynArrayLoadJson exp in 606.93ms i.e. 264.7K/s, 32.3 MB/s
     DynArrayLoadJson non exp in 593.67ms i.e. 270.6K/s, 14.5 MB/s
     TOrmPeopleObjArray exp in 875.26ms i.e. 183.5K/s, 22.3 MB/s
     TOrmPeopleObjArray non exp in 816.04ms i.e. 196.9K/s, 10.5 MB/s
     fpjson in 664.06ms i.e. 24.1K/s, 2.9 MB/s
  - Wiki markdown to html: 56 assertions passed  241us
  - Variants: 122 assertions passed  436us
  - Mustache renderer: 166 assertions passed  4.27ms
  - TDocVariant: 91,983 assertions passed  267.80ms
  - TDecimal128: 17,446 assertions passed  7.49ms
  - BSON: 245,070 assertions passed  5.77ms
     100000 TBsonObjectID.ComputeNew in 3.76ms i.e. 25.3M/s, aver. 37ns
  - TSelectStatement: 229 assertions passed  447us
  - TSynMonitorUsage: 1,202 assertions passed  469us
  Total failed: 0 / 890,509  - Core process PASSED  12.72s

 1.3. Core collections: 
  - IList: 6,944,142 assertions passed  1.42s
     500000  IList<Byte> in 4.13ms i.e. 115.2M/s, aver. 8ns
     500000  IList<Word> in 4.57ms i.e. 104.1M/s, aver. 9ns
     500000  IList<Integer> in 5.19ms i.e. 91.7M/s, aver. 10ns
     500000  IList<Cardinal> in 5.02ms i.e. 94.8M/s, aver. 10ns
     500000  IList<Int64> in 6.73ms i.e. 70.7M/s, aver. 13ns
     500000  IList<QWord> in 6.61ms i.e. 72M/s, aver. 13ns
     500000  IList<Single> in 4.48ms i.e. 106.2M/s, aver. 8ns
     500000  IList<Double> in 5.37ms i.e. 88.7M/s, aver. 10ns
     500000  IList<TDateTime> in 5.37ms i.e. 88.7M/s, aver. 10ns
     500000  IList<UTF8String> in 26.38ms i.e. 18M/s, aver. 52ns
     500000  IList<UnicodeString> in 25.82ms i.e. 18.4M/s, aver. 51ns
     500000  IList<Variant> in 27.72ms i.e. 17.1M/s, aver. 55ns
     500000  IList<THash128> in 14.31ms i.e. 33.3M/s, aver. 28ns
     500000  IList<TGuid> in 13.36ms i.e. 35.6M/s, aver. 26ns
  - IKeyValue: 3,800,050 assertions passed  933.90ms
     100000 integer,Int64  add in 9.77ms i.e. 9.7M/s, aver. 97ns
     100000 integer,Int64  get in 3.72ms i.e. 25.5M/s, aver. 37ns
     100000 RawUtf8,double add in 96.96ms i.e. 0.9M/s, aver. 969ns
     100000 RawUtf8,double get in 12.48ms i.e. 7.6M/s, aver. 124ns
     100000 integer,Int64  capa add in 8.63ms i.e. 11M/s, aver. 86ns
     100000 integer,Int64  capa get in 4.67ms i.e. 20.3M/s, aver. 46ns
     100000 RawUtf8,double capa add in 83.18ms i.e. 1.1M/s, aver. 831ns
     100000 RawUtf8,double capa get in 8.73ms i.e. 10.9M/s, aver. 87ns
  Total failed: 0 / 10,744,192  - Core collections PASSED  2.36s

 1.4. Core crypto: 
  - MD5: 166 assertions passed  278us
  - SHA1: 8 assertions passed  3.47ms
  - SHA256: 20 assertions passed  18.08ms
  - SHA512: 32 assertions passed  38.79ms
  - SHA3: 8,225 assertions passed  55.10ms
  - AES: 72,700 assertions passed  285.87ms
  - AES_GCM: 215 assertions passed  117us
  - RC4: 1,016 assertions passed  3.57ms
  - Hashes: 21 assertions passed  319.22ms
  - Base64: 26,064 assertions passed  303.27ms
     encoding in 96.53ms, 1 GB/s
     decoding in 136.15ms, 734.4 MB/s
  - CompressShaAes: 1,683 assertions passed  7.29ms
  - TAesPNRG: 362,626 assertions passed  282.26ms
     100000 mORMot Random32 in 2.47ms i.e. 38.5M/s, aver. 24ns, 154.2 MB/s
     mORMot FillRandom in 87us, 1 GB/s
     100000 OpenSSL Random32 in 147.52ms i.e. 661.9K/s, aver. 1.47us, 2.5 MB/s
     OpenSSL FillRandom in 117us, 815.1 MB/s
     100000 Lecuyer Random32 in 1.44ms i.e. 66M/s, aver. 14ns, 264.1 MB/s
     Lecuyer RandomBytes in 123us, 775.3 MB/s
  - CryptDataForCurrentUser: 5,000 assertions passed  9.83ms
     2000 AES-CFB in 9.65ms i.e. 202.2K/s, aver. 4.82us, 107.9 MB/s
  - JWT: 164,916 assertions passed  1.44s
     1000 HS256 in 4.03ms i.e. 242.2K/s, aver. 4.03us
     1000 HS384 in 5.64ms i.e. 173.1K/s, aver. 5.64us
     1000 HS512 in 5.67ms i.e. 171.9K/s, aver. 5.67us
     1000 S3224 in 4.58ms i.e. 212.9K/s, aver. 4.58us
     1000 S3256 in 4.58ms i.e. 212.8K/s, aver. 4.58us
     1000 S3384 in 4.61ms i.e. 211.7K/s, aver. 4.61us
     1000 S3512 in 4.65ms i.e. 209.7K/s, aver. 4.65us
     1000 S3S128 in 4.63ms i.e. 210.9K/s, aver. 4.63us
     1000 S3S256 in 4.63ms i.e. 210.7K/s, aver. 4.63us
     100 ES256 in 15.82ms i.e. 6.1K/s, aver. 158us
     100 RS256 in 8.50ms i.e. 11.4K/s, aver. 85us
     100 RS384 in 8.51ms i.e. 11.4K/s, aver. 85us
     100 RS512 in 8.51ms i.e. 11.4K/s, aver. 85us
     100 PS256 in 8.53ms i.e. 11.4K/s, aver. 85us
     100 PS384 in 8.71ms i.e. 11.2K/s, aver. 87us
     100 PS512 in 8.64ms i.e. 11.2K/s, aver. 86us
     100 ES256 in 15.81ms i.e. 6.1K/s, aver. 158us
     100 ES384 in 145.34ms i.e. 688/s, aver. 1.45ms
     100 ES512 in 377.59ms i.e. 264/s, aver. 3.77ms
     100 ES256K in 56.89ms i.e. 1.7K/s, aver. 568us
     100 EdDSA in 12.72ms i.e. 7.6K/s, aver. 127us
  - TBinaryCookieGenerator: 82,944 assertions passed  28.72ms
     16384 generate in 13.63ms i.e. 1.1M/s, aver. 832ns
     16384 validate in 1.56ms i.e. 10M/s, aver. 95ns
  - Catalog: 3,346 assertions passed  2.77s
  - Benchmark: 107,500 assertions passed  575.78ms
     2500 crc32c in 253us i.e. 9.4M/s or 20.5 GB/s
     2500 xxhash32 in 1.47ms i.e. 1.6M/s or 3.5 GB/s
     2500 crc32 in 257us i.e. 9.2M/s or 20.2 GB/s
     2500 adler32 in 465us i.e. 5.1M/s or 11.1 GB/s
     2500 hash32 in 607us i.e. 3.9M/s or 8.5 GB/s
     2500 md5 in 12.12ms i.e. 201.2K/s or 438.6 MB/s
     2500 sha1 in 22.02ms i.e. 110.8K/s or 241.5 MB/s
     2500 hmacsha1 in 23.76ms i.e. 102.7K/s or 223.8 MB/s
     2500 sha256 in 3.41ms i.e. 715.1K/s or 1.5 GB/s
     2500 hmacsha256 in 4.17ms i.e. 585.3K/s or 1.2 GB/s
     2500 sha384 in 27.89ms i.e. 87.5K/s or 190.7 MB/s
     2500 hmacsha384 in 32.76ms i.e. 74.5K/s or 162.3 MB/s
     2500 sha512 in 27.76ms i.e. 87.9K/s or 191.6 MB/s
     2500 hmacsha512 in 32.76ms i.e. 74.5K/s or 162.3 MB/s
     2500 sha3_256 in 35.89ms i.e. 68K/s or 148.2 MB/s
     2500 sha3_512 in 65.62ms i.e. 37.2K/s or 81 MB/s
     2500 rc4 in 12.99ms i.e. 187.8K/s or 409.4 MB/s
     2500 mormot aes-128-cfb in 11.49ms i.e. 212.3K/s or 462.7 MB/s
     2500 mormot aes-128-ofb in 6.59ms i.e. 370.2K/s or 806.8 MB/s
     2500 mormot aes-128-c64 in 7.18ms i.e. 339.7K/s or 740.3 MB/s
     2500 mormot aes-128-ctr in 7.31ms i.e. 333.6K/s or 727.1 MB/s
     2500 mormot aes-128-cfc in 12.03ms i.e. 202.9K/s or 442.2 MB/s
     2500 mormot aes-128-ofc in 8.03ms i.e. 304K/s or 662.5 MB/s
     2500 mormot aes-128-ctc in 8.54ms i.e. 285.6K/s or 622.5 MB/s
     2500 mormot aes-128-gcm in 11.05ms i.e. 220.8K/s or 481.3 MB/s
     2500 mormot aes-256-cfb in 12.33ms i.e. 197.9K/s or 431.4 MB/s
     2500 mormot aes-256-ofb in 7.51ms i.e. 325K/s or 708.2 MB/s
     2500 mormot aes-256-c64 in 8.21ms i.e. 297K/s or 647.3 MB/s
     2500 mormot aes-256-ctr in 8.14ms i.e. 299.7K/s or 653.3 MB/s
     2500 mormot aes-256-cfc in 12.92ms i.e. 188.8K/s or 411.5 MB/s
     2500 mormot aes-256-ofc in 8.82ms i.e. 276.5K/s or 602.7 MB/s
     2500 mormot aes-256-ctc in 9.56ms i.e. 255.2K/s or 556.2 MB/s
     2500 mormot aes-256-gcm in 11.33ms i.e. 215.3K/s or 469.2 MB/s
     2500 openssl aes-128-cfb in 7.75ms i.e. 315K/s or 686.5 MB/s
     2500 openssl aes-128-ofb in 6.94ms i.e. 351.5K/s or 766.2 MB/s
     2500 openssl aes-128-ctr in 4.77ms i.e. 511.2K/s or 1 GB/s
     2500 openssl aes-128-gcm in 6.20ms i.e. 393.7K/s or 858.1 MB/s
     2500 openssl aes-256-cfb in 8.65ms i.e. 282K/s or 614.6 MB/s
     2500 openssl aes-256-ofb in 7.87ms i.e. 310.2K/s or 676 MB/s
     2500 openssl aes-256-ctr in 5.24ms i.e. 465.7K/s or 0.9 GB/s
     2500 openssl aes-256-gcm in 6.68ms i.e. 365.2K/s or 795.8 MB/s
     2500 shake128 in 29.89ms i.e. 81.6K/s or 177.9 MB/s
     2500 shake256 in 35.17ms i.e. 69.4K/s or 151.2 MB/s
  Total failed: 0 / 836,482  - Core crypto PASSED  6.14s

 1.5. Core ecc: 
  - Reference vectors: 23 assertions passed  9.25ms
  - ECC: 2,104 assertions passed  860.81ms
     300 Ecc256r1MakeKey in 8.61ms i.e. 34K/s, aver. 28us
     300 Ecc256r1Uncompress in 40.85ms i.e. 7.1K/s, aver. 136us
     300 Ecc256r1Sign in 14ms i.e. 20.9K/s, aver. 46us
     300 Ecc256r1Verify in 57.20ms i.e. 5.1K/s, aver. 190us
     300 Ecc256r1VerifyUncomp in 641.44ms i.e. 467/s, aver. 2.13ms
     598 Ecc256r1SharedSecret in 90.43ms i.e. 6.4K/s, aver. 151us
  - Certificates and signatures: 106 assertions passed  7.86ms
  - Ecc command line tool: 704 assertions passed  89.74ms
  - ECDHE stream protocol: 63,393 assertions passed  789.07ms
     100 efAesCrc128 in 5.40ms i.e. 18K/s, aver. 54us, 471.3 MB/s
     100 efAesCfb128 in 2.98ms i.e. 32.7K/s, aver. 29us, 854.8 MB/s
     100 efAesOfb128 in 2.97ms i.e. 32.8K/s, aver. 29us, 856.5 MB/s
     100 efAesCtr128 in 1.95ms i.e. 49.8K/s, aver. 19us, 1.2 GB/s
     100 efAesCbc128 in 2.17ms i.e. 44.9K/s, aver. 21us, 1.1 GB/s
     100 efAesCrc256 in 5.85ms i.e. 16.6K/s, aver. 58us, 435.3 MB/s
     100 efAesCfb256 in 3.31ms i.e. 29.4K/s, aver. 33us, 768.7 MB/s
     100 efAesOfb256 in 3.42ms i.e. 28.4K/s, aver. 34us, 743.4 MB/s
     100 efAesCtr256 in 2.15ms i.e. 45.3K/s, aver. 21us, 1.1 GB/s
     100 efAesCbc256 in 2.51ms i.e. 38.9K/s, aver. 25us, 0.9 GB/s
     100 efAesGcm128 in 2.20ms i.e. 44.2K/s, aver. 22us, 1.1 GB/s
     100 efAesGcm256 in 2.48ms i.e. 39.3K/s, aver. 24us, 1 GB/s
     100 efAesCtc128 in 3.56ms i.e. 27.3K/s, aver. 35us, 714.6 MB/s
     100 efAesCtc256 in 4.02ms i.e. 24.2K/s, aver. 40us, 633.1 MB/s
  - OpenSSL: 532 assertions passed  1.22s
     3 RSA 2048 Generation in 229.05ms i.e. 13/s, aver. 76.35ms
     30 RSA 2048 Sign in 108.86ms i.e. 275/s, aver. 3.62ms
     30 RSA 2048 Verify in 2.91ms i.e. 10K/s, aver. 97us
     3 RSA-PSS 2048 Generation in 708.56ms i.e. 4/s, aver. 236.18ms
     30 RSA-PSS 2048 Sign in 108.89ms i.e. 275/s, aver. 3.62ms
     30 RSA-PSS 2048 Verify in 2.94ms i.e. 9.9K/s, aver. 98us
     100 prime256v1 Generation in 8.41ms i.e. 11.6K/s, aver. 84us
     100 prime256v1 Sign in 7.01ms i.e. 13.9K/s, aver. 70us
     100 prime256v1 Verify in 17.38ms i.e. 5.6K/s, aver. 173us
     100 ed25519 Generation in 5.81ms i.e. 16.8K/s, aver. 58us
     100 ed25519 Sign in 10.15ms i.e. 9.6K/s, aver. 101us
     100 ed25519 Verify in 12.58ms i.e. 7.7K/s, aver. 125us
  Total failed: 0 / 66,862  - Core ecc PASSED  2.98s

 1.6. Core compression: 
  - In memory compression: 21 assertions passed  486.39ms
  - GZIP format: 30 assertions passed  120.07ms
  - ZIP format: 880 assertions passed  1.58s
  - SynLZ: 15,025 assertions passed  92.28ms
  - TAlgoCompress: 1,218 assertions passed  1.69s
     TAlgoSynLZ 3.8 MB->1.9 MB: comp 281.5MB/s decomp 405.3MB/s
     TAlgoRleLZ 3.8 MB->1.9 MB: comp 166.4MB/s decomp 398MB/s
     TAlgoRle 3.8 MB->3.7 MB: comp 373.3MB/s decomp 4.5GB/s
     TAlgoLizard 3.8 MB->1.8 MB: comp 23.5MB/s decomp 547.3MB/s
     TAlgoLizardFast 3.8 MB->2.1 MB: comp 90.3MB/s decomp 586.1MB/s
     TAlgoLizardHuffman 3.8 MB->1.7 MB: comp 5.4MB/s decomp 391.3MB/s
     TAlgoDeflate 3.8 MB->1.4 MB: comp 24.6MB/s decomp 202.6MB/s
     TAlgoDeflateFast 3.8 MB->1.5 MB: comp 34.3MB/s decomp 182.8MB/s
  Total failed: 0 / 17,174  - Core compression PASSED  3.98s

 1.7. Network protocols: 
  - Rtsp over http: 1,900 assertions passed  284.13ms
  - Rtsp over http buffered write: 1,900 assertions passed  249.51ms
  Total failed: 0 / 3,800  - Network protocols PASSED  533.72ms


2. ORM

 2.1. Orm core: 
  - TOrm: 93 assertions passed  1.19ms
  - TOrmSigned: 200 assertions passed  1.57ms
  - TOrmModel: 49 assertions passed  332us
  - TRestServerFullMemory: 1,370,749 assertions passed  3.49s
  Total failed: 0 / 1,371,091  - Orm core PASSED  3.50s

 2.2. Sqlite file: 
  - Database direct access: 22,291 assertions passed  92.90ms
  - Virtual table direct access: 12 assertions passed  1.82ms
  - TOrmTableJson: 149,089 assertions passed  121.59ms
  - TRestClientDB: 608,198 assertions passed  2.35s
  - Regexp function: 6,015 assertions passed  17.97ms
  - TRecordVersion: 20,060 assertions passed  187.75ms
  Total failed: 0 / 805,665  - Sqlite file PASSED  2.78s

 2.3. Sqlite file WAL: 
  - Database direct access: 22,291 assertions passed  89.48ms
  - Virtual table direct access: 12 assertions passed  1.23ms
  - TOrmTableJson: 149,089 assertions passed  120.60ms
  - TRestClientDB: 608,198 assertions passed  2.36s
  - Regexp function: 6,015 assertions passed  18ms
  - TRecordVersion: 20,060 assertions passed  194.29ms
  Total failed: 0 / 805,665  - Sqlite file WAL PASSED  2.78s

 2.4. Sqlite file memory map: 
  - Database direct access: 22,271 assertions passed  83.25ms
  - Virtual table direct access: 12 assertions passed  568us
  - TOrmTableJson: 149,089 assertions passed  120.90ms
  - TRestClientDB: 608,196 assertions passed  2.35s
  - Regexp function: 6,015 assertions passed  18.15ms
  - TRecordVersion: 20,060 assertions passed  187.43ms
  Total failed: 0 / 805,643  - Sqlite file memory map PASSED  2.76s

 2.5. Sqlite memory: 
  - Database direct access: 22,271 assertions passed  77.88ms
  - Virtual table direct access: 12 assertions passed  1.25ms
  - TOrmTableJson: 149,089 assertions passed  121.52ms
  - TRestClientDB: 676,505 assertions passed  3.39s
  - Regexp function: 6,015 assertions passed  17.94ms
  - TRecordVersion: 20,060 assertions passed  187.95ms
  - TOrmTableWritable: 24,086 assertions passed  14.55ms
  - RTree: 280,024 assertions passed  2.20s
     10000 With RTree in 1.10s i.e. 8.8K/s, aver. 110us
     10000 With RTreeInteger in 1.08s i.e. 9K/s, aver. 108us
  - Shard write: 10,602 assertions passed  494.71ms
  - Shard read: 140,001 assertions passed  336.40ms
  - Shard read after purge: 114,003 assertions passed  268.67ms
  - MaxShardCount: 144,002 assertions passed  385.36ms
  Total failed: 0 / 1,586,670  - Sqlite memory PASSED  7.49s

 2.6. External database: 
  - SynDBRemote: 28,471 assertions passed  177.83ms
  - DB properties persistence: 7 assertions passed  212us
  - External records: 2 assertions passed  917us
  - Auto adapt SQL: 1,041 assertions passed  10.07ms
  - Crypted database: 253,277 assertions passed  234.75ms
  - External via REST: 170,355 assertions passed  2.46s
  - External via virtual table: 170,355 assertions passed  2.11s
  - External via REST with change tracking: 180,455 assertions passed  3.41s
  Total failed: 0 / 803,963  - External database PASSED  8.42s

 2.7. Client server access: 
  - TRestHttpServer: 2 assertions passed  5.35ms
     using THttpAsyncServer Ubuntu 5.13.0 epoll
  - TRestHttpClient: 4 assertions passed  8.92ms
     using TRestHttpClientSocket
  - HTTP client keep alive: 4,088 assertions passed  168.21ms
     4.7 KB, first 1.59ms, done 159.74ms i.e. 6259/s, aver. 159us, 28.7 MB/s
  - HTTP client multi connect: 4,088 assertions passed  182.86ms
     4.7 KB, first 261us, done 175.15ms i.e. 5709/s, aver. 175us, 26.2 MB/s
  - HTTP client encrypted: 4,088 assertions passed  193.70ms
     4.7 KB, first 237us, done 185.88ms i.e. 5379/s, aver. 185us, 24.7 MB/s
  - Direct in process access: 4,057 assertions passed  40.64ms
     4.7 KB, first 78us, done 37.75ms i.e. 26487/s, aver. 37us, 121.8 MB/s
  - HTTP several DB servers: 12,607 assertions passed  976.68ms
     4.7 KB, first 497us, done 135.26ms i.e. 7392/s, aver. 135us, 34 MB/s
     4.7 KB, first 324us, done 130.79ms i.e. 7645/s, aver. 130us, 35.1 MB/s
     4.7 KB, first 313us, done 132.02ms i.e. 7574/s, aver. 132us, 34.8 MB/s
  Total failed: 0 / 28,934  - Client server access PASSED  1.67s

 2.8. Multi thread process: 
  - Create thread pool: 1 assertion passed  3.81ms
  - TRestServerDB: 8,418 assertions passed  225.11ms
     1=42097/s  2=19360/s  5=23736/s  10=19614/s  30=15120/s  50=13203/s  
  - TRestClientDB: 8,422 assertions passed  154.46ms
     1=31514/s  2=27616/s  5=29934/s  10=31000/s  30=27912/s  50=22772/s  
  - TCP sockets: 8,419 assertions passed  530.90ms
     1=6509/s  2=9474/s  5=8978/s  10=13344/s  30=13827/s  50=12125/s  
  - Unix domain sockets: 8,422 assertions passed  565.14ms
     1=7565/s  2=13071/s  5=12675/s  10=15166/s  30=17315/s  50=10517/s  
  - Websockets: 8,422 assertions passed  707.10ms
     1=5551/s  2=9866/s  5=8461/s  10=8313/s  30=7470/s  50=5151/s  
  - Locked: 8,421 assertions passed  149.56ms
     1=30028/s  2=30283/s  5=31538/s  10=30313/s  30=27511/s  50=25745/s  
  - Unlocked: 8,422 assertions passed  131.61ms
     1=32332/s  2=31405/s  5=36086/s  10=36147/s  30=32154/s  50=31602/s  
  - Main thread: 8,421 assertions passed  160.97ms
     1=21053/s  2=20574/s  5=33409/s  10=29491/s  30=33400/s  50=30240/s  
  - Background thread: 8,422 assertions passed  212.25ms
     1=17493/s  2=20577/s  5=25328/s  10=23542/s  30=22246/s  50=15813/s  
   MaxThreads=50 MaxClients=50 TotalOps=18720 TotalClients=882
  Total failed: 0 / 75,790  - Multi thread process PASSED  2.90s


3. SOA

 3.1. Service oriented architecture: 
  - Weak interfaces: 56 assertions passed  607us
  - Service initialization: 268 assertions passed  5.79ms
  - Direct call: 1,379,310 assertions passed  119.29ms
  - Server side: 1,379,330 assertions passed  117ms
  - Client side REST: 1,839,107 assertions passed  2.07s
  - Client side REST as json object: 1,839,101 assertions passed  2.17s
  - Client side REST sessions stats: 1,839,101 assertions passed  2.16s
  - Client side REST locked: 1,839,105 assertions passed  2.06s
  - Client side REST main thread: 1,839,105 assertions passed  3.95s
  - Client side REST background thread: 1,839,105 assertions passed  3.98s
  - Client side REST sign with crc 32c: 1,839,101 assertions passed  2.07s
  - Client side REST sign with xxhash: 1,839,101 assertions passed  2.07s
  - Client side REST sign with md 5: 1,839,101 assertions passed  2.10s
  - Client side REST sign with sha 256: 1,839,101 assertions passed  2.10s
  - Client side REST sign with sha 512: 1,839,101 assertions passed  2.18s
  - Client side REST weak authentication: 1,839,101 assertions passed  1.79s
  - Client side REST basic authentication: 1,839,101 assertions passed  3.08s
  - Client side REST custom record layout: 1,839,101 assertions passed  2.25s
  - Client side REST service log to DB: 1,839,101 assertions passed  2.48s
  - Client side json RPC: 1,839,101 assertions passed  2.53s
  - Test over HTTP: 17,769 assertions passed  585.95ms
  - Security: 139 assertions passed  3.84ms
  - Mocks and stubs: 30,030 assertions passed  184.07ms
  Total failed: 0 / 32,232,536  - Service oriented architecture PASSED  40.16s

 3.2. Bidirectional remote connection: 
  - Websockets protocols: 30,000 assertions passed  38.03ms
  - Run http server: 2 assertions passed  5.37ms
  - Soa callback on server side: 4,580 assertions passed  14.51ms
  - Soa callback via json websockets: 6,898 assertions passed  291.35ms
  - Soa callback via binary websockets: 6,898 assertions passed  304.46ms
  - Relay start: 4 assertions passed  7.52ms
  - Relay soa callback via json websockets: 6,899 assertions passed  623.52ms
  - Relay connection recreate: 1 assertion passed  3.22ms
  - Relay soa callback via binary websockets: 6,899 assertions passed  754.91ms
  - Relay shutdown: 2 assertions passed  116.51ms
  - TRecordVersion: 20,068 assertions passed  218.47ms
  Total failed: 0 / 82,251  - Bidirectional remote connection PASSED  2.48s



Ubuntu 20.04.4 LTS - Linux 5.13.0-1025-oracle (cp utf8)
    2 x ARM Neoverse-N1 (aarch64)
    on QEMU KVM Virtual Machine virt-4.2
Using mORMot 2.0.220
    TSqlite3LibraryStatic 3.38.2 with internal MM
Generated with: Free Pascal 3.2.3 64 bit Linux compiler

Time elapsed for all tests: 1m55
Performed 2022-04-19 21:25:49 by scott on my-vm

Total assertions failed for all test suits:  0 / 71,400,626
! All tests passed successfully.
Heap dump by heaptrc unit of /home/scott/fpcupd/ccr/mORMot2/test/fpc/bin/aarch64-linux/mormot2tests
61247642 memory blocks allocated : 17428849010/17574290448
61247642 memory blocks freed     : 17428849010/17574290448
0 unfreed memory blocks : 0
True heap size : 360448
True free heap : 360448

Offline

#4 2022-04-20 05:08:47

AOG
Member
Registered: 2014-02-24
Posts: 490

Re: Building/running for Apple Silicon M1 (aarch64-darwin)

was built for newer macOS version (11.0) than being linked (10.8)

Please have a look at your fpc.cfg. Fpcupdeluxe might have added a -WM define (somewhere at the bottom of the cfg). You might try to remove it and build the mORMot again. I do not know if it will improve anything, but its worth the try.

Offline

#5 2022-04-20 05:58:37

sstillwell
Member
From: Kansas City, MO, USA
Registered: 2019-06-18
Posts: 27

Re: Building/running for Apple Silicon M1 (aarch64-darwin)

Yep, there was a -WM10.8 directive there, I commented it out and rebuilt mORMot2, then rebuilt the mormot2tests app.  That got rid of the warmings, thank you!  It did not, however, get rid of the segfault just after RandomBytes in CoreUnits > CoreBase.

Good information though, I'm learning by leaps and bounds.  Eventually I may even catch up to where I was 30 years ago when I was using Turbo Pascal on DOS and Think Pascal on the Mac.

Offline

#6 2022-04-20 07:49:33

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Building/running for Apple Silicon M1 (aarch64-darwin)

For M1 Darwin, try to enable the debug information, to see if the exception has a stack trace logged.

For aarch64-linux, could you post the numbers with no heaptrc memory manager, i.e. in release mode, and -O2 or -O3 optimization level?

Online

#7 2022-04-20 15:19:44

sstillwell
Member
From: Kansas City, MO, USA
Registered: 2019-06-18
Posts: 27

Re: Building/running for Apple Silicon M1 (aarch64-darwin)

I think I got it right - turned off debug info, turned off heap trace info, turned on -O2 optimization, then did a 'clean and build all' and re-ran the test.  Significantly faster.

~/fpcupd/ccr/mORMot2/test/fpc/bin/aarch64-linux$ ./mormot2tests

   mORMot2 Regression Tests
  --------------------------


1. Core units

 1.1. Core base: 
  - RecordCopy: 743 assertions passed  421us
  - TRawUtf8List: 190,174 assertions passed  73.08ms
  - TDynArray: 1,091,805 assertions passed  196.16ms
  - TDynArrayHashed: 1,599,070 assertions passed  837.31ms
  - TSynDictionary: 283,050 assertions passed  610.61ms
  - TSynQueue: 6,541,501 assertions passed  261.19ms
  - TSynNameValue: 40,032 assertions passed  9.68ms
  - TRawUtf8Interning: 2,000,013 assertions passed  139.21ms
     500000 interning 16 KB in 33.62ms i.e. 14.1M/s, aver. 67ns, 453.8 MB/s
     500000 direct 15.2 MB in 25.98ms i.e. 18.3M/s, aver. 51ns, 587.2 MB/s
  - TObjArray: 3,230 assertions passed  2.55ms
  - Custom RTL: 297,646 assertions passed  979.96ms
     FillChar in 35.45ms, 10.9 GB/s
     Move in 226.92ms, 1.3 GB/s
     small Move in 100.05ms, 1 GB/s
     big Move in 253.29ms, 1.5 GB/s
     FillCharFast in 8.84ms, 43.9 GB/s
     MoveFast in 18.40ms, 16.9 GB/s
     small MoveFast in 24.63ms, 4.4 GB/s
     big MoveFast in 35.86ms, 10.8 GB/s
  - Fast string compare: 41 assertions passed  19us
  - IdemPropName: 228 assertions passed  388us
  - Url encoding: 167 assertions passed  1.24ms
  - GUID: 10,019 assertions passed  4.74ms
  - ParseCommandArguments: 232 assertions passed  29us
  - IsMatch: 4,250 assertions passed  379us
  - TExprParserMatch: 140 assertions passed  135us
  - Soundex: 35 assertions passed  22us
  - Numerical conversions: 2,543,241 assertions passed  363.11ms
     100000 FloatToText  in 48.72ms i.e. 1.9M/s, aver. 487ns, 37.2 MB/s
     100000 str  in 18.69ms i.e. 5.1M/s, aver. 186ns, 122.4 MB/s
     100000 DoubleToShort  in 12.47ms i.e. 7.6M/s, aver. 124ns, 160.6 MB/s
     100000 DoubleToAscii  in 11.61ms i.e. 8.2M/s, aver. 116ns, 174.1 MB/s
  - Integers: 146,512 assertions passed  37.03ms
  - crc32c: 310,089 assertions passed  74.33ms
      pas 379.1 MB/s fast 842.2 MB/s armv8 12 GB/s
  - Random32: 221,003 assertions passed  3.71ms
     240000 Random32 in 3.11ms i.e. 73.4M/s, aver. 12ns, 293.8 MB/s
     RandomBytes in 487us, 784 MB/s
  - Bloom filters: 2,010,072 assertions passed  155.03ms
  - DeltaCompress: 3,087 assertions passed  23.30ms
  - Curr 64: 20,056 assertions passed  1.52ms
  - CamelCase: 11 assertions passed  8us
  - Bits: 15,567 assertions passed  25.77ms
  - Ini files: 7,028 assertions passed  34.29ms
  - UTF8: 1,386,141 assertions passed  971.08ms
  - Url decoding: 1,301 assertions passed  159us
  - Mime types: 450 assertions passed  1.38ms
  - Baudot code: 10,007 assertions passed  34.24ms
  - Iso 8601 date and time: 200,831 assertions passed  8.10ms
  - Time zones: 459 assertions passed  200.86ms
  - Quick select: 4,015 assertions passed  86.32ms
  - TSynCache: 408 assertions passed  136us
  - TSynFilter: 804 assertions passed  1.48ms
  - TSynValidate: 677 assertions passed  444us
  - TSynLogFile: 56 assertions passed  43us
  - TSynUniqueIdentifier: 1,300,002 assertions passed  376.33ms
     200000 ComputeNew in 5.29ms i.e. 36M/s, aver. 26ns
  Total failed: 0 / 20,244,193  - Core base PASSED  5.51s

 1.2. Core process: 
  - RTTI: 1,345 assertions passed  923us
  - Url encoding: 300 assertions passed  457us
  - Encode decode JSON: 431,991 assertions passed  111.93ms
  - JSON benchmark: 100,519 assertions passed  1.84s
     StrLen() in 1.41ms, 13.4 GB/s
     IsValidUtf8(RawUtf8) in 11.76ms, 1.6 GB/s
     IsValidUtf8(PUtf8Char) in 13.09ms, 1.4 GB/s
     IsValidJson(RawUtf8) in 26.61ms, 736.6 MB/s
     IsValidJson(PUtf8Char) in 27ms, 726 MB/s
     JsonArrayCount(P) in 26.97ms i.e. 5.8M/s, 726.6 MB/s
     JsonArrayCount(P,PMax) in 26.64ms i.e. 5.8M/s, 735.6 MB/s
     JsonObjectPropCount() in 14.72ms, 770.8 MB/s
     jsonUnquotedPropNameCompact in 74.95ms, 232.2 MB/s
     jsonHumanReadable in 128.43ms, 194.1 MB/s
     TDocVariant in 229.47ms i.e. 700.2K/s, 85.4 MB/s
     TDocVariant no guess in 239.38ms i.e. 671.2K/s, 81.8 MB/s
     TDocVariant dvoIntern in 224.71ms i.e. 715K/s, 87.2 MB/s
     TOrmTableJson save in 31.46ms i.e. 4.9M/s, 273.9 MB/s
     TOrmTableJson exp in 36.02ms i.e. 4.3M/s, 544.2 MB/s
     TOrmTableJson not exp in 20.13ms i.e. 7.7M/s, 428.1 MB/s
     TDocVariant FromResults exp in 98ms i.e. 1.6M/s, 200 MB/s
     TDocVariant FromResults not exp in 84.25ms i.e. 1.8M/s, 102.3 MB/s
     DynArrayLoadJson exp in 86.12ms i.e. 1.8M/s, 227.6 MB/s
     DynArrayLoadJson non exp in 57.98ms i.e. 2.7M/s, 148.7 MB/s
     TOrmPeopleObjArray exp in 139.63ms i.e. 1.1M/s, 140.3 MB/s
     TOrmPeopleObjArray non exp in 91.86ms i.e. 1.7M/s, 93.8 MB/s
     fpjson in 119.31ms i.e. 134.6K/s, 16.4 MB/s
  - Wiki markdown to html: 56 assertions passed  64us
  - Variants: 122 assertions passed  108us
  - Mustache renderer: 166 assertions passed  1.06ms
  - TDocVariant: 91,983 assertions passed  104.05ms
  - TDecimal128: 17,446 assertions passed  1.72ms
  - BSON: 245,070 assertions passed  4.10ms
     100000 TBsonObjectID.ComputeNew in 3.57ms i.e. 26.7M/s, aver. 35ns
  - TSelectStatement: 229 assertions passed  300us
  - TSynMonitorUsage: 1,202 assertions passed  104us
  Total failed: 0 / 890,429  - Core process PASSED  2.07s

 1.3. Core collections: 
  - IList: 6,944,142 assertions passed  894.64ms
     500000  IList<Byte> in 3.18ms i.e. 149.9M/s, aver. 6ns
     500000  IList<Word> in 4.01ms i.e. 118.7M/s, aver. 8ns
     500000  IList<Integer> in 4.33ms i.e. 109.9M/s, aver. 8ns
     500000  IList<Cardinal> in 3.92ms i.e. 121.5M/s, aver. 7ns
     500000  IList<Int64> in 5.02ms i.e. 94.8M/s, aver. 10ns
     500000  IList<QWord> in 4.94ms i.e. 96.5M/s, aver. 9ns
     500000  IList<Single> in 3.61ms i.e. 132M/s, aver. 7ns
     500000  IList<Double> in 3.79ms i.e. 125.6M/s, aver. 7ns
     500000  IList<TDateTime> in 3.75ms i.e. 126.9M/s, aver. 7ns
     500000  IList<UTF8String> in 16.72ms i.e. 28.5M/s, aver. 33ns
     500000  IList<UnicodeString> in 16.63ms i.e. 28.6M/s, aver. 33ns
     500000  IList<Variant> in 23.81ms i.e. 20M/s, aver. 47ns
     500000  IList<THash128> in 13.64ms i.e. 34.9M/s, aver. 27ns
     500000  IList<TGuid> in 12.66ms i.e. 37.6M/s, aver. 25ns
  - IKeyValue: 3,800,050 assertions passed  308.15ms
     100000 integer,Int64  add in 9.96ms i.e. 9.5M/s, aver. 99ns
     100000 integer,Int64  get in 3.69ms i.e. 25.7M/s, aver. 36ns
     100000 RawUtf8,double add in 29.24ms i.e. 3.2M/s, aver. 292ns
     100000 RawUtf8,double get in 11.33ms i.e. 8.4M/s, aver. 113ns
     100000 integer,Int64  capa add in 8.49ms i.e. 11.2M/s, aver. 84ns
     100000 integer,Int64  capa get in 4.62ms i.e. 20.6M/s, aver. 46ns
     100000 RawUtf8,double capa add in 19.15ms i.e. 4.9M/s, aver. 191ns
     100000 RawUtf8,double capa get in 7.77ms i.e. 12.2M/s, aver. 77ns
  Total failed: 0 / 10,744,192  - Core collections PASSED  1.20s

 1.4. Core crypto: 
  - MD5: 166 assertions passed  258us
  - SHA1: 8 assertions passed  3.48ms
  - SHA256: 20 assertions passed  17.90ms
  - SHA512: 32 assertions passed  38.40ms
  - SHA3: 8,225 assertions passed  38.75ms
  - AES: 72,700 assertions passed  172.14ms
  - AES_GCM: 215 assertions passed  70us
  - RC4: 1,016 assertions passed  1.60ms
  - Hashes: 21 assertions passed  316.37ms
  - Base64: 26,064 assertions passed  275.65ms
     encoding in 96.69ms, 1 GB/s
     decoding in 135.58ms, 737.5 MB/s
  - CompressShaAes: 1,683 assertions passed  2.24ms
  - TAesPNRG: 362,626 assertions passed  253.34ms
     100000 mORMot Random32 in 2.50ms i.e. 38M/s, aver. 25ns, 152 MB/s
     mORMot FillRandom in 88us, 1 GB/s
     100000 OpenSSL Random32 in 147.07ms i.e. 664K/s, aver. 1.47us, 2.5 MB/s
     OpenSSL FillRandom in 117us, 815.1 MB/s
     100000 Lecuyer Random32 in 1.34ms i.e. 71.1M/s, aver. 13ns, 284.6 MB/s
     Lecuyer RandomBytes in 122us, 781.7 MB/s
  - CryptDataForCurrentUser: 5,000 assertions passed  4.58ms
     2000 AES-CFB in 4.46ms i.e. 437.8K/s, aver. 2.23us, 233.7 MB/s
  - JWT: 164,916 assertions passed  1.66s
     1000 HS256 in 1.03ms i.e. 0.9M/s, aver. 1.03us
     1000 HS384 in 2.71ms i.e. 359.8K/s, aver. 2.71us
     1000 HS512 in 2.75ms i.e. 354.9K/s, aver. 2.75us
     1000 S3224 in 1.65ms i.e. 589.7K/s, aver. 1.65us
     1000 S3256 in 1.66ms i.e. 585.4K/s, aver. 1.66us
     1000 S3384 in 1.68ms i.e. 580.2K/s, aver. 1.68us
     1000 S3512 in 1.68ms i.e. 578.8K/s, aver. 1.68us
     1000 S3S128 in 1.67ms i.e. 583.3K/s, aver. 1.67us
     1000 S3S256 in 1.69ms i.e. 576.1K/s, aver. 1.69us
     100 ES256 in 15.93ms i.e. 6.1K/s, aver. 159us
     100 RS256 in 8.08ms i.e. 12K/s, aver. 80us
     100 RS384 in 8.11ms i.e. 12K/s, aver. 81us
     100 RS512 in 8.10ms i.e. 12K/s, aver. 81us
     100 PS256 in 8.15ms i.e. 11.9K/s, aver. 81us
     100 PS384 in 8.32ms i.e. 11.7K/s, aver. 83us
     100 PS512 in 8.27ms i.e. 11.8K/s, aver. 82us
     100 ES256 in 15.43ms i.e. 6.3K/s, aver. 154us
     100 ES384 in 144.24ms i.e. 693/s, aver. 1.44ms
     100 ES512 in 378.24ms i.e. 264/s, aver. 3.78ms
     100 ES256K in 56.62ms i.e. 1.7K/s, aver. 566us
     100 EdDSA in 12.46ms i.e. 7.8K/s, aver. 124us
  - TBinaryCookieGenerator: 82,944 assertions passed  10.42ms
     16384 generate in 3.78ms i.e. 4.1M/s, aver. 230ns
     16384 validate in 1.78ms i.e. 8.7M/s, aver. 109ns
  - Catalog: 3,346 assertions passed  2.97s
  - Benchmark: 107,500 assertions passed  508.14ms
     2500 crc32c in 261us i.e. 9.1M/s or 19.9 GB/s
     2500 xxhash32 in 1.46ms i.e. 1.6M/s or 3.5 GB/s
     2500 crc32 in 259us i.e. 9.2M/s or 20 GB/s
     2500 adler32 in 468us i.e. 5M/s or 11.1 GB/s
     2500 hash32 in 610us i.e. 3.9M/s or 8.5 GB/s
     2500 md5 in 12.59ms i.e. 193.9K/s or 422.5 MB/s
     2500 sha1 in 21.80ms i.e. 111.9K/s or 244 MB/s
     2500 hmacsha1 in 24.48ms i.e. 99.7K/s or 217.3 MB/s
     2500 sha256 in 3.45ms i.e. 705.8K/s or 1.5 GB/s
     2500 hmacsha256 in 4.12ms i.e. 591.7K/s or 1.2 GB/s
     2500 sha384 in 27.80ms i.e. 87.7K/s or 191.3 MB/s
     2500 hmacsha384 in 32.76ms i.e. 74.5K/s or 162.4 MB/s
     2500 sha512 in 27.80ms i.e. 87.8K/s or 191.3 MB/s
     2500 hmacsha512 in 32.77ms i.e. 74.4K/s or 162.3 MB/s
     2500 sha3_256 in 35.97ms i.e. 67.8K/s or 147.9 MB/s
     2500 sha3_512 in 65.62ms i.e. 37.2K/s or 81 MB/s
     2500 rc4 in 13ms i.e. 187.7K/s or 409.2 MB/s
     2500 mormot aes-128-cfb in 8.51ms i.e. 286.5K/s or 624.5 MB/s
     2500 mormot aes-128-ofb in 3.79ms i.e. 643.3K/s or 1.3 GB/s
     2500 mormot aes-128-c64 in 4.35ms i.e. 560.3K/s or 1.1 GB/s
     2500 mormot aes-128-ctr in 4.49ms i.e. 543K/s or 1.1 GB/s
     2500 mormot aes-128-cfc in 9.34ms i.e. 261.3K/s or 569.5 MB/s
     2500 mormot aes-128-ofc in 5.34ms i.e. 456.8K/s or 0.9 GB/s
     2500 mormot aes-128-ctc in 5.77ms i.e. 423.1K/s or 0.9 GB/s
     2500 mormot aes-128-gcm in 7.38ms i.e. 330.5K/s or 720.4 MB/s
     2500 mormot aes-256-cfb in 9.12ms i.e. 267.6K/s or 583.3 MB/s
     2500 mormot aes-256-ofb in 5.61ms i.e. 435.1K/s or 0.9 GB/s
     2500 mormot aes-256-c64 in 5.39ms i.e. 452.3K/s or 0.9 GB/s
     2500 mormot aes-256-ctr in 5.38ms i.e. 453.7K/s or 0.9 GB/s
     2500 mormot aes-256-cfc in 10.14ms i.e. 240.5K/s or 524.2 MB/s
     2500 mormot aes-256-ofc in 5.99ms i.e. 407.1K/s or 887.2 MB/s
     2500 mormot aes-256-ctc in 6.62ms i.e. 368.4K/s or 802.9 MB/s
     2500 mormot aes-256-gcm in 8.37ms i.e. 291.5K/s or 635.3 MB/s
     2500 openssl aes-128-cfb in 4.94ms i.e. 493.6K/s or 1 GB/s
     2500 openssl aes-128-ofb in 4.17ms i.e. 584.3K/s or 1.2 GB/s
     2500 openssl aes-128-ctr in 1.96ms i.e. 1.2M/s or 2.6 GB/s
     2500 openssl aes-128-gcm in 3.21ms i.e. 760.3K/s or 1.6 GB/s
     2500 openssl aes-256-cfb in 5.87ms i.e. 415.2K/s or 905 MB/s
     2500 openssl aes-256-ofb in 5.37ms i.e. 454.3K/s or 0.9 GB/s
     2500 openssl aes-256-ctr in 2.42ms i.e. 0.9M/s or 2.1 GB/s
     2500 openssl aes-256-gcm in 3.68ms i.e. 662.8K/s or 1.4 GB/s
     2500 shake128 in 29.77ms i.e. 82K/s or 178.7 MB/s
     2500 shake256 in 35.35ms i.e. 69K/s or 150.5 MB/s
  Total failed: 0 / 836,482  - Core crypto PASSED  6.28s

 1.5. Core ecc: 
  - Reference vectors: 23 assertions passed  9.58ms
  - ECC: 2,104 assertions passed  861.28ms
     300 Ecc256r1MakeKey in 8.62ms i.e. 33.9K/s, aver. 28us
     300 Ecc256r1Uncompress in 40.90ms i.e. 7.1K/s, aver. 136us
     300 Ecc256r1Sign in 14.10ms i.e. 20.7K/s, aver. 47us
     300 Ecc256r1Verify in 56.91ms i.e. 5.1K/s, aver. 189us
     300 Ecc256r1VerifyUncomp in 641.77ms i.e. 467/s, aver. 2.13ms
     598 Ecc256r1SharedSecret in 90.60ms i.e. 6.4K/s, aver. 151us
  - Certificates and signatures: 106 assertions passed  7.06ms
  - Ecc command line tool: 704 assertions passed  77.80ms
  - ECDHE stream protocol: 63,393 assertions passed  655ms
     100 efAesCrc128 in 4.85ms i.e. 20.1K/s, aver. 48us, 525.1 MB/s
     100 efAesCfb128 in 2.40ms i.e. 40.6K/s, aver. 24us, 1 GB/s
     100 efAesOfb128 in 2.40ms i.e. 40.6K/s, aver. 24us, 1 GB/s
     100 efAesCtr128 in 1.24ms i.e. 78.6K/s, aver. 12us, 2 GB/s
     100 efAesCbc128 in 1.50ms i.e. 64.8K/s, aver. 15us, 1.6 GB/s
     100 efAesCrc256 in 5.33ms i.e. 18.3K/s, aver. 53us, 477.7 MB/s
     100 efAesCfb256 in 2.77ms i.e. 35.2K/s, aver. 27us, 918.7 MB/s
     100 efAesOfb256 in 2.91ms i.e. 33.4K/s, aver. 29us, 872.8 MB/s
     100 efAesCtr256 in 1.49ms i.e. 65.4K/s, aver. 14us, 1.6 GB/s
     100 efAesCbc256 in 1.83ms i.e. 53.2K/s, aver. 18us, 1.3 GB/s
     100 efAesGcm128 in 1.52ms i.e. 64.1K/s, aver. 15us, 1.6 GB/s
     100 efAesGcm256 in 1.76ms i.e. 55.4K/s, aver. 17us, 1.4 GB/s
     100 efAesCtc128 in 2.89ms i.e. 33.7K/s, aver. 28us, 880.9 MB/s
     100 efAesCtc256 in 3.27ms i.e. 29.8K/s, aver. 32us, 777.1 MB/s
  - OpenSSL: 532 assertions passed  1.07s
     3 RSA 2048 Generation in 297.66ms i.e. 10/s, aver. 99.22ms
     30 RSA 2048 Sign in 109.02ms i.e. 275/s, aver. 3.63ms
     30 RSA 2048 Verify in 2.90ms i.e. 10K/s, aver. 96us
     3 RSA-PSS 2048 Generation in 493.14ms i.e. 6/s, aver. 164.38ms
     30 RSA-PSS 2048 Sign in 108.89ms i.e. 275/s, aver. 3.62ms
     30 RSA-PSS 2048 Verify in 2.91ms i.e. 10K/s, aver. 97us
     100 prime256v1 Generation in 8.16ms i.e. 11.9K/s, aver. 81us
     100 prime256v1 Sign in 6.87ms i.e. 14.2K/s, aver. 68us
     100 prime256v1 Verify in 17.41ms i.e. 5.6K/s, aver. 174us
     100 ed25519 Generation in 5.55ms i.e. 17.5K/s, aver. 55us
     100 ed25519 Sign in 10.06ms i.e. 9.7K/s, aver. 100us
     100 ed25519 Verify in 12.64ms i.e. 7.7K/s, aver. 126us
  Total failed: 0 / 66,862  - Core ecc PASSED  2.68s

 1.6. Core compression: 
  - In memory compression: 21 assertions passed  437.17ms
  - GZIP format: 30 assertions passed  114.27ms
  - ZIP format: 880 assertions passed  1.50s
  - SynLZ: 14,967 assertions passed  75.04ms
  - TAlgoCompress: 1,218 assertions passed  603.67ms
     TAlgoSynLZ 3.8 MB->1.9 MB: comp 292.3MB/s decomp 434.4MB/s
     TAlgoRleLZ 3.8 MB->1.9 MB: comp 167MB/s decomp 418.8MB/s
     TAlgoRle 3.8 MB->3.7 MB: comp 385.1MB/s decomp 6.2GB/s
     TAlgoLizard 3.8 MB->1.8 MB: comp 23MB/s decomp 0.9GB/s
     TAlgoLizardFast 3.8 MB->2.1 MB: comp 191.6MB/s decomp 1.3GB/s
     TAlgoLizardHuffman 3.8 MB->1.7 MB: comp 97.6MB/s decomp 632.8MB/s
     TAlgoDeflate 3.8 MB->1.4 MB: comp 29.4MB/s decomp 208.2MB/s
     TAlgoDeflateFast 3.8 MB->1.5 MB: comp 47.6MB/s decomp 187.9MB/s
  Total failed: 0 / 17,116  - Core compression PASSED  2.73s

 1.7. Network protocols: 
  - Rtsp over http: 1,900 assertions passed  273.98ms
  - Rtsp over http buffered write: 1,900 assertions passed  248.04ms
  Total failed: 0 / 3,800  - Network protocols PASSED  522.04ms


2. ORM

 2.1. Orm core: 
  - TOrm: 93 assertions passed  499us
  - TOrmSigned: 200 assertions passed  774us
  - TOrmModel: 49 assertions passed  32us
  - TRestServerFullMemory: 1,370,749 assertions passed  974.90ms
  Total failed: 0 / 1,371,091  - Orm core PASSED  976.23ms

 2.2. Sqlite file: 
  - Database direct access: 22,291 assertions passed  68.65ms
  - Virtual table direct access: 12 assertions passed  658us
  - TOrmTableJson: 149,089 assertions passed  59.57ms
  - TRestClientDB: 608,198 assertions passed  596.30ms
  - Regexp function: 6,015 assertions passed  10.69ms
  - TRecordVersion: 20,060 assertions passed  44.61ms
  Total failed: 0 / 805,665  - Sqlite file PASSED  780.53ms

 2.3. Sqlite file WAL: 
  - Database direct access: 22,291 assertions passed  66.78ms
  - Virtual table direct access: 12 assertions passed  356us
  - TOrmTableJson: 149,089 assertions passed  59.18ms
  - TRestClientDB: 608,198 assertions passed  607.94ms
  - Regexp function: 6,015 assertions passed  10.83ms
  - TRecordVersion: 20,060 assertions passed  44.13ms
  Total failed: 0 / 805,665  - Sqlite file WAL PASSED  789.28ms

 2.4. Sqlite file memory map: 
  - Database direct access: 22,271 assertions passed  57.08ms
  - Virtual table direct access: 12 assertions passed  430us
  - TOrmTableJson: 149,089 assertions passed  58.62ms
  - TRestClientDB: 608,196 assertions passed  590.46ms
  - Regexp function: 6,015 assertions passed  10.83ms
  - TRecordVersion: 20,060 assertions passed  43.93ms
  Total failed: 0 / 805,643  - Sqlite file memory map PASSED  761.40ms

 2.5. Sqlite memory: 
  - Database direct access: 22,271 assertions passed  55.40ms
  - Virtual table direct access: 12 assertions passed  311us
  - TOrmTableJson: 149,089 assertions passed  58.18ms
  - TRestClientDB: 676,505 assertions passed  945.34ms
  - Regexp function: 6,015 assertions passed  10.75ms
  - TRecordVersion: 20,060 assertions passed  43.84ms
  - TOrmTableWritable: 24,086 assertions passed  5.26ms
  - RTree: 280,024 assertions passed  738.63ms
     10000 With RTree in 380.74ms i.e. 25.6K/s, aver. 38us
     10000 With RTreeInteger in 355.35ms i.e. 27.4K/s, aver. 35us
  - Shard write: 10,602 assertions passed  98.55ms
  - Shard read: 140,001 assertions passed  115.23ms
  - Shard read after purge: 114,003 assertions passed  92.57ms
  - MaxShardCount: 144,002 assertions passed  118.03ms
  Total failed: 0 / 1,586,670  - Sqlite memory PASSED  2.28s

 2.6. External database: 
  - SynDBRemote: 28,471 assertions passed  124.34ms
  - DB properties persistence: 7 assertions passed  173us
  - External records: 2 assertions passed  389us
  - Auto adapt SQL: 1,041 assertions passed  1.69ms
  - Crypted database: 253,277 assertions passed  75.28ms
  - External via REST: 170,355 assertions passed  550.58ms
  - External via virtual table: 170,355 assertions passed  777.26ms
  - External via REST with change tracking: 180,455 assertions passed  1.50s
  Total failed: 0 / 803,963  - External database PASSED  3.03s

 2.7. Client server access: 
  - TRestHttpServer: 2 assertions passed  5.56ms
     using THttpAsyncServer Ubuntu 5.13.0 epoll
  - TRestHttpClient: 4 assertions passed  8.63ms
     using TRestHttpClientSocket
  - HTTP client keep alive: 4,088 assertions passed  197.08ms
     4.7 KB, first 1.23ms, done 192.13ms i.e. 5204/s, aver. 192us, 23.9 MB/s
  - HTTP client multi connect: 4,088 assertions passed  246.91ms
     4.7 KB, first 398us, done 240.39ms i.e. 4159/s, aver. 240us, 19.1 MB/s
  - HTTP client encrypted: 4,088 assertions passed  196.04ms
     4.7 KB, first 206us, done 191.76ms i.e. 5214/s, aver. 191us, 23.9 MB/s
  - Direct in process access: 4,057 assertions passed  26.54ms
     4.7 KB, first 32us, done 18.44ms i.e. 54209/s, aver. 18us, 249.3 MB/s
  - HTTP several DB servers: 12,607 assertions passed  715.24ms
     4.7 KB, first 217us, done 88.99ms i.e. 11236/s, aver. 88us, 51.6 MB/s
     4.7 KB, first 318us, done 89.50ms i.e. 11172/s, aver. 89us, 51.3 MB/s
     4.7 KB, first 329us, done 92.99ms i.e. 10753/s, aver. 92us, 49.4 MB/s
  Total failed: 0 / 28,934  - Client server access PASSED  1.59s

 2.8. Multi thread process: 
  - Create thread pool: 1 assertion passed  5.66ms
  - TRestServerDB: 8,422 assertions passed  93.44ms
     1=83125/s  2=70351/s  5=66533/s  10=44469/s  30=27372/s  50=35391/s  
  - TRestClientDB: 8,419 assertions passed  99.49ms
     1=71312/s  2=66187/s  5=59854/s  10=41344/s  30=28218/s  50=31374/s  
  - TCP sockets: 8,418 assertions passed  539.20ms
     1=9575/s  2=13404/s  5=12488/s  10=14278/s  30=15074/s  50=12921/s  
  - Unix domain sockets: 8,422 assertions passed  558.92ms
     1=12091/s  2=18014/s  5=17565/s  10=18069/s  30=20142/s  50=17927/s  
  - Websockets: 8,420 assertions passed  606.97ms
     1=6437/s  2=12218/s  5=10449/s  10=11433/s  30=8109/s  50=6013/s  
  - Locked: 8,422 assertions passed  95.56ms
     1=60469/s  2=56044/s  5=62578/s  10=43467/s  30=34545/s  50=33977/s  
  - Unlocked: 8,422 assertions passed  113.01ms
     1=65207/s  2=46651/s  5=52344/s  10=36015/s  30=25569/s  50=29441/s  
  - Main thread: 8,419 assertions passed  103.99ms
     1=38299/s  2=39319/s  5=51828/s  10=39275/s  30=46923/s  50=38199/s  
  - Background thread: 8,418 assertions passed  156.95ms
     1=38680/s  2=28487/s  5=36538/s  10=31245/s  30=24652/s  50=17158/s  
   MaxThreads=50 MaxClients=50 TotalOps=18720 TotalClients=882
  Total failed: 0 / 75,783  - Multi thread process PASSED  2.53s


3. SOA

 3.1. Service oriented architecture: 
  - Weak interfaces: 56 assertions passed  249us
  - Service initialization: 268 assertions passed  2.07ms
  - Direct call: 1,379,310 assertions passed  24.11ms
  - Server side: 1,379,330 assertions passed  28.62ms
  - Client side REST: 1,839,107 assertions passed  500.62ms
  - Client side REST as json object: 1,839,101 assertions passed  521.04ms
  - Client side REST sessions stats: 1,839,101 assertions passed  584.09ms
  - Client side REST locked: 1,839,105 assertions passed  1.12s
  - Client side REST main thread: 1,839,105 assertions passed  2.84s
  - Client side REST background thread: 1,839,105 assertions passed  2.35s
  - Client side REST sign with crc 32c: 1,839,101 assertions passed  496.59ms
  - Client side REST sign with xxhash: 1,839,101 assertions passed  492.96ms
  - Client side REST sign with md 5: 1,839,101 assertions passed  524.49ms
  - Client side REST sign with sha 256: 1,839,101 assertions passed  514.98ms
  - Client side REST sign with sha 512: 1,839,101 assertions passed  602.31ms
  - Client side REST weak authentication: 1,839,101 assertions passed  467.73ms
  - Client side REST basic authentication: 1,839,101 assertions passed  645.72ms
  - Client side REST custom record layout: 1,839,101 assertions passed  511.72ms
  - Client side REST service log to DB: 1,839,101 assertions passed  661.20ms
  - Client side json RPC: 1,839,101 assertions passed  596.03ms
  - Test over HTTP: 17,769 assertions passed  577.65ms
  - Security: 139 assertions passed  1.27ms
  - Mocks and stubs: 30,030 assertions passed  32.69ms
  Total failed: 0 / 32,232,536  - Service oriented architecture PASSED  14.11s

 3.2. Bidirectional remote connection: 
  - Websockets protocols: 30,000 assertions passed  6.52ms
  - Run http server: 2 assertions passed  5.38ms
  - Soa callback on server side: 4,580 assertions passed  1.79ms
  - Soa callback via json websockets: 6,898 assertions passed  217.26ms
  - Soa callback via binary websockets: 6,898 assertions passed  212.16ms
  - Relay start: 4 assertions passed  6.54ms
  - Relay soa callback via json websockets: 6,899 assertions passed  512.03ms
  - Relay connection recreate: 1 assertion passed  3.11ms
  - Relay soa callback via binary websockets: 6,899 assertions passed  708.77ms
  - Relay shutdown: 2 assertions passed  126.39ms
  - TRecordVersion: 20,068 assertions passed  73.38ms
  Total failed: 0 / 82,251  - Bidirectional remote connection PASSED  1.97s



Ubuntu 20.04.4 LTS - Linux 5.13.0-1025-oracle (cp utf8)
    2 x ARM Neoverse-N1 (aarch64)
    on QEMU KVM Virtual Machine virt-4.2
Using mORMot 2.0.220
    TSqlite3LibraryStatic 3.38.2 with internal MM
Generated with: Free Pascal 3.2.3 64 bit Linux compiler

Time elapsed for all tests: 49.87s
Performed 2022-04-20 15:09:00 by scott on my-vm

Total assertions failed for all test suits:  0 / 71,401,275
! All tests passed successfully.

Some individual tests are oddly slower, like the FillChar which seems twice as SLOW, but overall the entire suite of tests ran in less than half the time - I think we'll find that our test results are not 100% repeatable due to the fact that it's on a multi-tenant host even though the Ampere CPU is supposedly  giving dedicated caches at each level for each core rather than sharing across to L3 across multiple cores.  IO access is still shared regardless of CPU sharing or lack of it.  Also, KVM is likely NOT pinning a VM to a particular set of cores, so there's contention there as well.

EDIT: I rebuilt it using actual "Release" build options and it made NO change - still exactly 49.87 seconds to complete.

Last edited by sstillwell (2022-04-20 18:55:42)

Offline

#8 2022-04-20 15:33:49

sstillwell
Member
From: Kansas City, MO, USA
Registered: 2019-06-18
Posts: 27

Re: Building/running for Apple Silicon M1 (aarch64-darwin)

I'm working on getting the updated results for M1.

Offline

#9 2022-04-20 16:14:34

sstillwell
Member
From: Kansas City, MO, USA
Registered: 2019-06-18
Posts: 27

Re: Building/running for Apple Silicon M1 (aarch64-darwin)

I must be missing something...I can't get it to go into debug even with a source breakpoint set.  All I ever get is the segfault message in the same place each time.  My breakpoint is set at the very first executed line of

  TIntegrationTests.RunAsConsole('mORMot2 Regression Tests',
    //LOG_VERBOSE,
    LOG_FILTER[lfExceptions],
    [], Executable.ProgramFilePath + 'data');

I've gone into Project Options and to the ellipses '...' next to the build mode and done the "Create Debug and Release" and chosen Debug, then done a Clean and Build all...it makes no difference.  Debug info is set to Dwarf3 (beta) by default in the Debug mode...is that a problem?

The data subdirectory is empty after the segfault, so there's no text log or anything that I can find.

Any other ideas?

Last edited by sstillwell (2022-04-20 16:17:22)

Offline

#10 2022-04-21 05:33:17

sstillwell
Member
From: Kansas City, MO, USA
Registered: 2019-06-18
Posts: 27

Re: Building/running for Apple Silicon M1 (aarch64-darwin)

Okay, I found the wiki article about configuring the lldb debugger, so now I can see where it's failing on macOS...

Process 6250 stopped
* thread #1: tid=0xa16d4e: 0x0000000100007f90, 0x000000016f604000, 0x000000016f604000 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: mormot2tests &&//FUNC: fpc_ln_real <<&&//FRAME, stop reason = EXC_BAD_ACCESS (code=2, address=0x16f603ff0)
    frame #0: 0x0000000100007f90, 0x000000016f604000, 0x000000016f604000 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: mormot2tests &&//FUNC: fpc_ln_real <<&&//FRAME
>> frame variable -P 1 -D 5
>> version
Target 0: (mormot2tests) stopped.
(lldb) frame variable -P 1 -D 5
(lldb) version
>> thread backtrace -c 10
>> version
lldb-1205.0.27.3
Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55)
(lldb) thread backtrace -c 10
* thread #1: tid=0xa16d4e: 0x0000000100007f90, 0x000000016f604000, 0x000000016f604000 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: mormot2tests &&//FUNC: fpc_ln_real <<&&//FRAME, stop reason = EXC_BAD_ACCESS (code=2, address=0x16f603ff0)
  * frame #0: 0x0000000100007f90, 0x000000016f604000, 0x000000016f604000 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: mormot2tests &&//FUNC: fpc_ln_real <<&&//FRAME
    frame #1: 0x00000001002c1d5c, 0x000000016f604000, 0x000000016f604000 &&//FULL: /Users/scott/fpcupdeluxe/ccr/mORMot2/src/lib/mormot.lib.static.pas &&//SHORT: mormot.lib.static.pas &&//LINE: 751 &&//MOD: mormot2tests &&//FUNC: l0g(x=<unavailable>) <<&&//FRAME
    frame #2: 0x0000000100007f9c, 0x000000016f604010, 0x000000016f604010 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: mormot2tests &&//FUNC: fpc_ln_real <<&&//FRAME
    frame #3: 0x00000001002c1d5c, 0x000000016f604020, 0x000000016f604020 &&//FULL: /Users/scott/fpcupdeluxe/ccr/mORMot2/src/lib/mormot.lib.static.pas &&//SHORT: mormot.lib.static.pas &&//LINE: 751 &&//MOD: mormot2tests &&//FUNC: l0g(x=<unavailable>) <<&&//FRAME
    frame #4: 0x0000000100007f9c, 0x000000016f604030, 0x000000016f604030 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: mormot2tests &&//FUNC: fpc_ln_real <<&&//FRAME
    frame #5: 0x00000001002c1d5c, 0x000000016f604040, 0x000000016f604040 &&//FULL: /Users/scott/fpcupdeluxe/ccr/mORMot2/src/lib/mormot.lib.static.pas &&//SHORT: mormot.lib.static.pas &&//LINE: 751 &&//MOD: mormot2tests &&//FUNC: l0g(x=<unavailable>) <<&&//FRAME
    frame #6: 0x0000000100007f9c, 0x000000016f604050, 0x000000016f604050 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: mormot2tests &&//FUNC: fpc_ln_real <<&&//FRAME
    frame #7: 0x00000001002c1d5c, 0x000000016f604060, 0x000000016f604060 &&//FULL: /Users/scott/fpcupdeluxe/ccr/mORMot2/src/lib/mormot.lib.static.pas &&//SHORT: mormot.lib.static.pas &&//LINE: 751 &&//MOD: mormot2tests &&//FUNC: l0g(x=<unavailable>) <<&&//FRAME
    frame #8: 0x0000000100007f9c, 0x000000016f604070, 0x000000016f604070 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: mormot2tests &&//FUNC: fpc_ln_real <<&&//FRAME
    frame #9: 0x00000001002c1d5c, 0x000000016f604080, 0x000000016f604080 &&//FULL: /Users/scott/fpcupdeluxe/ccr/mORMot2/src/lib/mormot.lib.static.pas &&//SHORT: mormot.lib.static.pas &&//LINE: 751 &&//MOD: mormot2tests &&//FUNC: l0g(x=<unavailable>) <<&&//FRAME
(lldb) version
lldb-1205.0.27.3
Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55)

The variable x is unavailable, and the stack trace doesn't go back far enough to tell me where it was being called from.

Ideas?

Offline

#11 2022-04-21 07:41:31

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Building/running for Apple Silicon M1 (aarch64-darwin)

Perhaps when executing the ln() function TSynBloomFilter.Create, line 3702 of mormot.core.search?

There may be a linking issue.
This ln() seems to redirect to l0g() from mormot.lib.static.pas which itself is linked as log() and make an infinite recursive call.

Sounds like a compiler bug to me.
Please try https://github.com/synopse/mORMot2/commit/b6601cf5

Online

#12 2022-04-21 15:17:04

sstillwell
Member
From: Kansas City, MO, USA
Registered: 2019-06-18
Posts: 27

Re: Building/running for Apple Silicon M1 (aarch64-darwin)

Okay, I managed to pull and build that - it gets further with another crash:

#0 _platform_memmove at :-1
#1 FPC_MOVE at :-1
#2 FastSetRawByteString("", 0x000000000063dd70, 10662) at mormot.core.base.pas:4175
#3 ResourceToRawByteString(<unavailable>, <unavailable>, "", <unavailable>) at mormot.core.buffers.pas:5963
#4 LoadFromResource(0x000000010126fd80, 0) at mormot.core.search.pas:5661
#5 CreateDefault(0x000000010126fd80, 0x0000000000000001, 0) at mormot.core.search.pas:5580
#6 TIMEZONES(0x0000000101268280) at test.core.base.pas:5224
#7 Run(0x000000010122a890) at mormot.core.test.pas:1199
#8 RUN(0x000000010122a890) at mormot2tests.dpr:86
#9 RunAsConsole(0x0000000100524008, "\U00000018\xd4I", <unavailable>, <unavailable>, "\U00000018V%\U00000001\U00000001") at mormot.core.test.pas:1393
#10  at :0
#11  at :0

Also, do you know why running under debug would NOT create console output?  It doesn't open iTerm.app which is set as the default Terminal app for my system.  It's not opening and then closing automatically (which has been an issue before), it's just not opening at all.

Offline

#13 2022-04-21 15:27:39

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Building/running for Apple Silicon M1 (aarch64-darwin)

Online

#14 2022-04-21 15:49:42

sstillwell
Member
From: Kansas City, MO, USA
Registered: 2019-06-18
Posts: 27

Re: Building/running for Apple Silicon M1 (aarch64-darwin)

It yields the same call stack on exception.

I'm running another instance after that from outside of Lazarus at the command line so that we can get a more complete list of exceptions so you can see the issues ahead instead of just one at a time.  I'll post as soon as it completes (or crashes).

Offline

#15 2022-04-21 17:16:01

sstillwell
Member
From: Kansas City, MO, USA
Registered: 2019-06-18
Posts: 27

Re: Building/running for Apple Silicon M1 (aarch64-darwin)

➜  aarch64-darwin git:(master) ✗ ./mormot2tests log
mORMot2 Regression Tests

 Running tests... please wait
#432795   #432796   #432937   #54   #55   #56   #57   #58   #1 ENetSock  #1 ENetSock  #1   #1   #1   #1   ^C

➜  aarch64-darwin git:(master) ✗ cat logmORMot2\ Regression\ Tests.txt

   mORMot2 Regression Tests
  --------------------------


1. Core units

 1.1. Core base:
  - RecordCopy: 743 assertions passed  55us
  - TRawUtf8List: 190,174 assertions passed  182.01ms
  - TDynArray: 1,091,805 assertions passed  236.64ms
  - TDynArrayHashed: 1,599,070 assertions passed  1.01s
  - TSynDictionary: 283,050 assertions passed  421.57ms
  - TSynQueue: 6,541,501 assertions passed  120.35ms
  - TSynNameValue: 40,032 assertions passed  63.77ms
  - TRawUtf8Interning: 2,000,013 assertions passed  477.36ms
     500000 interning 16 KB in 24.59ms i.e. 19.3M/s, aver. 49ns, 620.4 MB/s
     500000 direct 15.2 MB in 225.36ms i.e. 2.1M/s, aver. 450ns, 67.7 MB/s
  - TObjArray: 3,230 assertions passed  2.82ms
  - Custom RTL: 297,646 assertions passed  503.45ms
     FillChar in 4.90ms, 79.1 GB/s
     Move in 7.93ms, 39.3 GB/s
     small Move in 26.98ms, 4 GB/s
     big Move in 8.53ms, 45.7 GB/s
     FillCharFast in 4.90ms, 79.2 GB/s
     MoveFast in 7.30ms, 42.8 GB/s
     small MoveFast in 28.94ms, 3.7 GB/s
     big MoveFast in 8.62ms, 45.2 GB/s
  - Fast string compare: 41 assertions passed  10us
  - IdemPropName: 228 assertions passed  180us
  - Url encoding: 167 assertions passed  917us
  - GUID: 10,019 assertions passed  32.96ms
  - ParseCommandArguments: 232 assertions passed  50us
  - IsMatch: 4,250 assertions passed  108us
  - TExprParserMatch: 140 assertions passed  174us
  - Soundex: 35 assertions passed  7us
  - Numerical conversions: 2,541,563 assertions passed  1.44s
     100000 FloatToText  in 106.29ms i.e. 918.7K/s, aver. 1.06us, 17 MB/s
     100000 str  in 11.76ms i.e. 8.1M/s, aver. 117ns, 194.6 MB/s
     100000 DoubleToShort  in 6.68ms i.e. 14.2M/s, aver. 66ns, 299.7 MB/s
     100000 DoubleToAscii  in 6.26ms i.e. 15.2M/s, aver. 62ns, 322.8 MB/s
  - Integers: 146,512 assertions passed  32.30ms
  - crc32c: 100,074 assertions passed  94.21ms
      pas 381 MB/s fast 817.9 MB/s
  - Random32: 221,003 assertions passed  1.55ms
     240000 Random32 in 1.18ms i.e. 192.8M/s, aver. 4ns, 771.2 MB/s
     RandomBytes in 311us, 1.1 GB/s
  - Bloom filters: 2,010,072 assertions passed  62.21ms
  - DeltaCompress: 3,087 assertions passed  16.95ms
  - Curr 64: 20,056 assertions passed  4.53ms
  - CamelCase: 11 assertions passed  25us
  - Bits: 15,567 assertions passed  12.81ms
  - Ini files: 7,028 assertions passed  18.35ms
  - UTF8: 1,385,162 assertions passed  703.64ms
  - Url decoding: 1,301 assertions passed  460us
  - Mime types: 450 assertions passed  5.41ms
  - Baudot code: 10,007 assertions passed  35.82ms
  - Iso 8601 date and time: 200,831 assertions passed  50.14ms
! Core base - Time zones
! Exception EAccessViolation raised with messsage:
!  Access violation
  - Quick select: 4,015 assertions passed  101.87ms
  - TSynCache: 408 assertions passed  218us
  - TSynFilter: 804 assertions passed  3.52ms
  - TSynValidate: 677 assertions passed  1.69ms
  - TSynLogFile: 56 assertions passed  57us
  - TSynUniqueIdentifier: 1,300,002 assertions passed  1.59s
     200000 ComputeNew in 3.31ms i.e. 57.5M/s, aver. 16ns
  Total failed: 0 / 20,031,511  - Core base PASSED  7.46s

 1.2. Core process:
  - RTTI: 1,345 assertions passed  1.45ms
  - Url encoding: 300 assertions passed  1.34ms
!  - Encode decode JSON: 3 / 432,978 FAILED  491.86ms
  - JSON benchmark: 100,519 assertions passed  8.31s
     StrLen() in 6.74ms, 2.8 GB/s
     IsValidUtf8(RawUtf8) in 9.89ms, 1.9 GB/s
     IsValidUtf8(PUtf8Char) in 13.43ms, 1.4 GB/s
     IsValidJson(RawUtf8) in 21.03ms, 0.9 GB/s
     IsValidJson(PUtf8Char) in 17.89ms, 1 GB/s
     JsonArrayCount(P) in 16.62ms i.e. 9.4M/s, 1.1 GB/s
     JsonArrayCount(P,PMax) in 16.13ms i.e. 9.7M/s, 1.1 GB/s
     JsonObjectPropCount() in 8.37ms, 1.3 GB/s
     jsonUnquotedPropNameCompact in 42.63ms, 408.3 MB/s
     jsonHumanReadable in 60.35ms, 413.2 MB/s
     TDocVariant in 1.58s i.e. 101.5K/s, 12.3 MB/s
     TDocVariant no guess in 1.95s i.e. 82.2K/s, 10 MB/s
     TDocVariant dvoIntern in 761.84ms i.e. 210.9K/s, 25.7 MB/s
     TOrmTableJson save in 22.05ms i.e. 7.1M/s, 391 MB/s
     TOrmTableJson exp in 22.66ms i.e. 6.9M/s, 865 MB/s
     TOrmTableJson not exp in 11.90ms i.e. 13.1M/s, 724.3 MB/s
     TDocVariant FromResults exp in 560.05ms i.e. 286.9K/s, 35 MB/s
     TDocVariant FromResults not exp in 551ms i.e. 291.6K/s, 15.6 MB/s
     DynArrayLoadJson exp in 422.66ms i.e. 380.1K/s, 46.3 MB/s
     DynArrayLoadJson non exp in 419.02ms i.e. 383.4K/s, 20.5 MB/s
     TOrmPeopleObjArray exp in 598.72ms i.e. 268.3K/s, 32.7 MB/s
     TOrmPeopleObjArray non exp in 573.14ms i.e. 280.3K/s, 15 MB/s
     fpjson in 472.40ms i.e. 34K/s, 4.1 MB/s
  - Wiki markdown to html: 56 assertions passed  173us
  - Variants: 122 assertions passed  62us
!  - Mustache renderer: 5 / 58 FAILED  44.62ms
  - TDocVariant: 90,791 assertions passed  164.70ms
  - TDecimal128: 17,446 assertions passed  5.50ms
  - BSON: 245,070 assertions passed  3.67ms
     100000 TBsonObjectID.ComputeNew in 2.50ms i.e. 38.1M/s, aver. 25ns
  - TSelectStatement: 229 assertions passed  326us
  - TSynMonitorUsage: 1,202 assertions passed  343us
  Total failed: 8 / 890,116  - Core process FAILED  9.03s

 1.3. Core collections:
  - IList: 6,944,142 assertions passed  839.15ms
     500000  IList<Byte> in 1.95ms i.e. 244.2M/s, aver. 3ns
     500000  IList<Word> in 1.99ms i.e. 238.6M/s, aver. 3ns
     500000  IList<Integer> in 2.12ms i.e. 224.7M/s, aver. 4ns
     500000  IList<Cardinal> in 2.08ms i.e. 228.3M/s, aver. 4ns
     500000  IList<Int64> in 2.64ms i.e. 180.3M/s, aver. 5ns
     500000  IList<QWord> in 2.59ms i.e. 183.8M/s, aver. 5ns
     500000  IList<Single> in 2.13ms i.e. 222.9M/s, aver. 4ns
     500000  IList<Double> in 2.32ms i.e. 204.8M/s, aver. 4ns
     500000  IList<TDateTime> in 2.32ms i.e. 205.2M/s, aver. 4ns
     500000  IList<UTF8String> in 8.85ms i.e. 53.8M/s, aver. 17ns
     500000  IList<UnicodeString> in 7.98ms i.e. 59.7M/s, aver. 15ns
     500000  IList<Variant> in 11.81ms i.e. 40.3M/s, aver. 23ns
     500000  IList<THash128> in 4.84ms i.e. 98.4M/s, aver. 9ns
     500000  IList<TGuid> in 4.57ms i.e. 104.2M/s, aver. 9ns
  - IKeyValue: 3,800,050 assertions passed  629.33ms
     100000 integer,Int64  add in 7.08ms i.e. 13.4M/s, aver. 70ns
     100000 integer,Int64  get in 3.76ms i.e. 25.3M/s, aver. 37ns
     100000 RawUtf8,double add in 57.06ms i.e. 1.6M/s, aver. 570ns
     100000 RawUtf8,double get in 6.14ms i.e. 15.5M/s, aver. 61ns
     100000 integer,Int64  capa add in 4.51ms i.e. 21.1M/s, aver. 45ns
     100000 integer,Int64  capa get in 2.81ms i.e. 33.8M/s, aver. 28ns
     100000 RawUtf8,double capa add in 51.39ms i.e. 1.8M/s, aver. 513ns
     100000 RawUtf8,double capa get in 3.79ms i.e. 25.1M/s, aver. 37ns
  Total failed: 0 / 10,744,192  - Core collections PASSED  1.46s

 1.4. Core crypto:
  - MD5: 166 assertions passed  174us
  - SHA1: 8 assertions passed  3.38ms
  - SHA256: 15 assertions passed  30.14ms
! Core crypto - SHA512
! Exception EOpenSslHash raised with messsage:
!  TOpenSslHash.Create: OpenSSL 1.1.1 is not available
  - SHA3: 8,225 assertions passed  30.26ms
! Core crypto - AES
! Exception EOpenSslCrypto raised with messsage:
!  TAesGcmOsl.Create: OpenSSL 1.1.1 is not available
  - AES_GCM: 215 assertions passed  111us
  - RC4: 1,016 assertions passed  2.18ms
  - Hashes: 21 assertions passed  923.98ms
  - Base64: 26,064 assertions passed  145.18ms
     encoding in 42.70ms, 2.2 GB/s
     decoding in 61.62ms, 1.5 GB/s
  - CompressShaAes: 1,683 assertions passed  5.95ms
  - TAesPNRG: 231,315 assertions passed  81.47ms
     100000 mORMot Random32 in 8.39ms i.e. 11.3M/s, aver. 83ns, 45.4 MB/s
     mORMot FillRandom in 493us, 193.4 MB/s
     100000 Lecuyer Random32 in 508us i.e. 187.7M/s, aver. 5ns, 750.9 MB/s
     Lecuyer RandomBytes in 78us, 1.1 GB/s
  - CryptDataForCurrentUser: 5,000 assertions passed  18.08ms
     2000 AES-CFB in 17.37ms i.e. 112.4K/s, aver. 8.68us, 60 MB/s
  - JWT: 162,731 assertions passed  329.74ms
     1000 HS256 in 5.07ms i.e. 192.5K/s, aver. 5.07us
     1000 HS384 in 4.02ms i.e. 242.3K/s, aver. 4.02us
     1000 HS512 in 4.04ms i.e. 241.4K/s, aver. 4.04us
     1000 S3224 in 3.14ms i.e. 310.7K/s, aver. 3.14us
     1000 S3256 in 3.14ms i.e. 310.4K/s, aver. 3.14us
     1000 S3384 in 3.15ms i.e. 309.9K/s, aver. 3.15us
     1000 S3512 in 3.16ms i.e. 308.6K/s, aver. 3.16us
     1000 S3S128 in 3.15ms i.e. 309.1K/s, aver. 3.15us
     1000 S3S256 in 3.17ms i.e. 307.5K/s, aver. 3.17us
     100 ES256 in 89.89ms i.e. 1K/s, aver. 898us
  - TBinaryCookieGenerator: 82,944 assertions passed  18.88ms
     16384 generate in 8.63ms i.e. 1.8M/s, aver. 527ns
     16384 validate in 825us i.e. 18.9M/s, aver. 50ns
  - Catalog: 2,514 assertions passed  939.59ms
! Core crypto - Benchmark
! Exception EOpenSslCrypto raised with messsage:
!  TAesGcmOsl.Create: OpenSSL 1.1.1 is not available
  Total failed: 0 / 521,994  - Core crypto PASSED  2.53s

 1.5. Core ecc:
  - Reference vectors: 23 assertions passed  7.23ms
  - ECC: 2,104 assertions passed  1.50s
     300 Ecc256r1MakeKey in 226.86ms i.e. 1.2K/s, aver. 756us
     300 Ecc256r1Uncompress in 16.38ms i.e. 17.8K/s, aver. 54us
     300 Ecc256r1Sign in 232.29ms i.e. 1.2K/s, aver. 774us
     300 Ecc256r1Verify in 282.46ms i.e. 1K/s, aver. 941us
     300 Ecc256r1VerifyUncomp in 266.25ms i.e. 1.1K/s, aver. 887us
     598 Ecc256r1SharedSecret in 482.04ms i.e. 1.2K/s, aver. 806us
  - Certificates and signatures: 106 assertions passed  41.34ms
  - Ecc command line tool: 704 assertions passed  457.97ms
  - ECDHE stream protocol: 63,393 assertions passed  4.01s
     100 efAesCrc128 in 12.40ms i.e. 7.8K/s, aver. 124us, 205.3 MB/s
     100 efAesCfb128 in 13.82ms i.e. 7K/s, aver. 138us, 184.2 MB/s
     100 efAesOfb128 in 13.92ms i.e. 7K/s, aver. 139us, 183 MB/s
     100 efAesCtr128 in 13.09ms i.e. 7.4K/s, aver. 130us, 194.5 MB/s
     100 efAesCbc128 in 13.82ms i.e. 7K/s, aver. 138us, 184.2 MB/s
     100 efAesCrc256 in 15.88ms i.e. 6.1K/s, aver. 158us, 160.3 MB/s
     100 efAesCfb256 in 17.73ms i.e. 5.5K/s, aver. 177us, 143.6 MB/s
     100 efAesOfb256 in 17.50ms i.e. 5.5K/s, aver. 175us, 145.5 MB/s
     100 efAesCtr256 in 17.03ms i.e. 5.7K/s, aver. 170us, 149.5 MB/s
     100 efAesCbc256 in 17.90ms i.e. 5.4K/s, aver. 179us, 142.2 MB/s
     100 efAesGcm128 in 15.67ms i.e. 6.2K/s, aver. 156us, 162.4 MB/s
     100 efAesGcm256 in 20.71ms i.e. 4.7K/s, aver. 207us, 123 MB/s
     100 efAesCtc128 in 12.26ms i.e. 7.9K/s, aver. 122us, 207.6 MB/s
     100 efAesCtc256 in 16.69ms i.e. 5.8K/s, aver. 166us, 152.5 MB/s
  - OpenSSL: no assertion  3us
  Total failed: 0 / 66,330  - Core ecc PASSED  6.02s

 1.6. Core compression:
  - In memory compression: 21 assertions passed  194.41ms
  - GZIP format: 30 assertions passed  78.31ms
  - ZIP format: 864 assertions passed  1.22s
  - SynLZ: 14,639 assertions passed  63.05ms
  - TAlgoCompress: 762 assertions passed  290.81ms
     TAlgoSynLZ 3.8 MB->1.8 MB: comp 227.4MB/s decomp 697MB/s
     TAlgoRleLZ 3.8 MB->1.8 MB: comp 163.9MB/s decomp 631.5MB/s
     TAlgoRle 3.8 MB->3.8 MB: comp 345.2MB/s decomp 17.6GB/s
     TAlgoDeflate 3.8 MB->1.4 MB: comp 27.6MB/s decomp 305.4MB/s
     TAlgoDeflateFast 3.8 MB->1.5 MB: comp 79.6MB/s decomp 295.8MB/s
  Total failed: 0 / 16,316  - Core compression PASSED  1.85s

 1.7. Network protocols:
!  - Rtsp over http: 1 / 1 FAILED  1.02s
!  - Rtsp over http buffered write: 1 / 1 FAILED  1.03s
  Total failed: 2 / 2  - Network protocols FAILED  2.06s


2. ORM

 2.1. Orm core:
  - TOrm: 93 assertions passed  2.11ms
  - TOrmSigned: 200 assertions passed  15.94ms
  - TOrmModel: 49 assertions passed  241us
  - TRestServerFullMemory: 1,370,749 assertions passed  2.35s
  Total failed: 0 / 1,371,091  - Orm core PASSED  2.37s

 2.2. Sqlite file:
  - Database direct access: 22,271 assertions passed  43.29ms
  - Virtual table direct access: 12 assertions passed  651us
  - TOrmTableJson: 149,089 assertions passed  81.49ms
  - TRestClientDB: 608,196 assertions passed  1.57s
  - TRecordVersion: 20,060 assertions passed  130.15ms
  Total failed: 0 / 799,628  - Sqlite file PASSED  1.82s

 2.3. Sqlite file WAL:
  - Database direct access: 22,271 assertions passed  41.18ms
  - Virtual table direct access: 12 assertions passed  301us
  - TOrmTableJson: 149,089 assertions passed  80.73ms
  - TRestClientDB: 608,196 assertions passed  1.56s
  - TRecordVersion: 20,060 assertions passed  132.02ms
  Total failed: 0 / 799,628  - Sqlite file WAL PASSED  1.82s

 2.4. Sqlite file memory map:
  - Database direct access: 22,271 assertions passed  41.92ms
  - Virtual table direct access: 12 assertions passed  371us
  - TOrmTableJson: 149,089 assertions passed  81.61ms
  - TRestClientDB: 608,196 assertions passed  1.54s
  - TRecordVersion: 20,060 assertions passed  130.41ms
  Total failed: 0 / 799,628  - Sqlite file memory map PASSED  1.80s

 2.5. Sqlite memory:
  - Database direct access: 22,271 assertions passed  40.47ms
  - Virtual table direct access: 12 assertions passed  305us
  - TOrmTableJson: 149,089 assertions passed  80.82ms
  - TRestClientDB: 676,505 assertions passed  2.18s
  - TRecordVersion: 20,060 assertions passed  130.20ms
  - TOrmTableWritable: 24,086 assertions passed  9.91ms
  - RTree: 280,024 assertions passed  1.45s
     10000 With RTree in 728.10ms i.e. 13.4K/s, aver. 72us
     10000 With RTreeInteger in 721.78ms i.e. 13.5K/s, aver. 72us
  - Shard write: 10,602 assertions passed  337.23ms
  - Shard read: 140,001 assertions passed  205.69ms
  - Shard read after purge: 114,003 assertions passed  164.84ms
  - MaxShardCount: 144,002 assertions passed  243.47ms
  Total failed: 0 / 1,580,655  - Sqlite memory PASSED  4.85s

 2.6. External database:
! External database - SynDBRemote
! Exception ESqlite3Exception raised with messsage:
!  Error SQLITE_MISUSE (21) [Step] using 3.37.0 - another row available, extended_errcode=100
  - DB properties persistence: 7 assertions passed  188us
  - External records: 2 assertions passed  670us
  - Auto adapt SQL: 1,041 assertions passed  6.89ms
  - Crypted database: 176,193 assertions passed  115.91ms
  - External via REST: 170,355 assertions passed  1.73s
  - External via virtual table: 170,355 assertions passed  1.40s
  - External via REST with change tracking: 180,455 assertions passed  2.35s
  Total failed: 0 / 701,414  - External database PASSED  5.61s

 2.7. Client server access:
  - TRestHttpServer: 2 assertions passed  3.23ms
     using THttpAsyncServer OSX 21.4.0 poll
!  - TRestHttpClient: 1 / 1 FAILED  1m00
     using TRestHttpClientSocket
!  - HTTP client keep alive: 1 / 1 FAILED  1m00
!  - HTTP client multi connect: 1 / 1 FAILED  1m00
!  - HTTP client encrypted: 1 / 1 FAILED  1m00
  - Direct in process access: 4,057 assertions passed  72.76ms
     4.7 KB, first 4.13ms, done 58.50ms i.e. 17091/s, aver. 58us%
➜  aarch64-darwin git:(master) ✗

When I canceled the program, it had been hung for about 45 minutes.

Offline

#16 2022-04-21 17:50:49

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Building/running for Apple Silicon M1 (aarch64-darwin)

I guess it is not able to download some needed .json files from the web.
Try to copy the .json files available in a mORMot2Tests from Linux or Windows.

Then there is no OpenSSL available on Darwin by default.
Please try https://github.com/synopse/mORMot2/commit/dddd3139

Online

#17 2022-04-21 18:17:53

sstillwell
Member
From: Kansas City, MO, USA
Registered: 2019-06-18
Posts: 27

Re: Building/running for Apple Silicon M1 (aarch64-darwin)

Also, OpenSSL 1.1 is available via homebrew, which I already have installed.  I guess I'd have to provide the library path for that - on Apple Silicon Macs that would typically live in /opt/homebrew/Cellar/openssl@1.1/1.1.1n/lib (or whatever version is current for "1.1.1n".  It should also link to just /opt/homebrew/lib/, but I don't find it there - another issue I need to look up.  'brew info openssl@1.1' says:

openssl@1.1 is keg-only, which means it was not symlinked into /opt/homebrew,
because macOS provides LibreSSL

I'll pull your commit and test later - in the middle of meetings at work right now.

Last edited by sstillwell (2022-04-21 18:18:59)

Offline

#18 2022-04-21 20:18:44

sstillwell
Member
From: Kansas City, MO, USA
Registered: 2019-06-18
Posts: 27

Re: Building/running for Apple Silicon M1 (aarch64-darwin)

Same error as before...

(lldb) thread backtrace -c 11
* thread #1: tid=0xa75f57: 0x00000001afa1d180, 0x000000016fdfe450, 0x000000016fdfe450 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: libsystem_platform.dylib &&//FUNC: _platform_memmove <<&&//FRAME, stop reason = EXC_BAD_ACCESS (code=1, address=0x620fe0)
  * frame #0: 0x00000001afa1d180, 0x000000016fdfe450, 0x000000016fdfe450 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: libsystem_platform.dylib &&//FUNC: _platform_memmove <<&&//FRAME
    frame #1: 0x00000001000051b4, 0x000000016fdfe450, 0x000000016fdfe450 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: mormot2tests &&//FUNC: FPC_MOVE <<&&//FRAME
    frame #2: 0x0000000100073004, 0x000000016fdfe460, 0x000000016fdfe490 &&//FULL: /Users/scott/fpcupdeluxe/ccr/mORMot2/src/core/mormot.core.base.pas &&//SHORT: mormot.core.base.pas &&//LINE: 4178 &&//MOD: mormot2tests &&//FUNC: FastSetRawByteString(s="", p=0x0000000000620fe0, len=10662) <<&&//FRAME
    frame #3: 0x000000010021ac30, 0x000000016fdfe4a0, 0x000000016fdfe4d0 &&//FULL: /Users/scott/fpcupdeluxe/ccr/mORMot2/src/core/mormot.core.buffers.pas &&//SHORT: mormot.core.buffers.pas &&//LINE: 5963 &&//MOD: mormot2tests &&//FUNC: ResourceToRawByteString(ResName=<unavailable>, ResType=<unavailable>, buf="", Instance=<unavailable>) <<&&//FRAME
    frame #4: 0x00000001002ca184, 0x000000016fdfe4e0, 0x000000016fdfe6e0 &&//FULL: /Users/scott/fpcupdeluxe/ccr/mORMot2/src/core/mormot.core.search.pas &&//SHORT: mormot.core.search.pas &&//LINE: 5661 &&//MOD: mormot2tests &&//FUNC: LoadFromResource(this=0x000000010120ff00, Instance=0) <<&&//FRAME
    frame #5: 0x00000001002c9ac4, 0x000000016fdfe6f0, 0x000000016fdfe8a0 &&//FULL: /Users/scott/fpcupdeluxe/ccr/mORMot2/src/core/mormot.core.search.pas &&//SHORT: mormot.core.search.pas &&//LINE: 5580 &&//MOD: mormot2tests &&//FUNC: CreateDefault(this=0x000000010120ff00, $vmt=0x0000000000000001, dummycpp=0) <<&&//FRAME
    frame #6: 0x00000001000f9050, 0x000000016fdfe8b0, 0x000000016fdfebc0 &&//FULL: /Users/scott/fpcupdeluxe/ccr/mORMot2/test/test.core.base.pas &&//SHORT: test.core.base.pas &&//LINE: 5224 &&//MOD: mormot2tests &&//FUNC: TIMEZONES(this=0x0000000101208280) <<&&//FRAME
    frame #7: 0x00000001000aad00, 0x000000016fdfebd0, 0x000000016fdff400 &&//FULL: /Users/scott/fpcupdeluxe/ccr/mORMot2/src/core/mormot.core.test.pas &&//SHORT: mormot.core.test.pas &&//LINE: 1199 &&//MOD: mormot2tests &&//FUNC: Run(this=0x00000001010ba890) <<&&//FRAME
    frame #8: 0x0000000100004418, 0x000000016fdff410, 0x000000016fdff660 &&//FULL: /Users/scott/fpcupdeluxe/ccr/mORMot2/test/mormot2tests.dpr &&//SHORT: mormot2tests.dpr &&//LINE: 86 &&//MOD: mormot2tests &&//FUNC: RUN(this=0x00000001010ba890) <<&&//FRAME
    frame #9: 0x00000001000abec8, 0x000000016fdff670, 0x000000016fdff860 &&//FULL: /Users/scott/fpcupdeluxe/ccr/mORMot2/src/core/mormot.core.test.pas &&//SHORT: mormot.core.test.pas &&//LINE: 1393 &&//MOD: mormot2tests &&//FUNC: RunAsConsole(self=0x0000000100510008, CustomIdent="", withLogs=<unavailable>, options=<unavailable>, workdir="\U00000018\U00000016\U0000000f\U00000001\U00000001") <<&&//FRAME
    frame #10: 0x00000001000046ac, 0x000000016fdff870, 0x000000016fdff940 &&//FULL: /Users/scott/fpcupdeluxe/ccr/mORMot2/test/mormot2tests.dpr &&//SHORT: mormot2tests.dpr &&//LINE: 135 &&//MOD: mormot2tests &&//FUNC: PASCALMAIN <<&&//FRAME
(lldb) version
lldb-1205.0.27.3
Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55)

Offline

#19 2022-04-21 21:50:44

sstillwell
Member
From: Kansas City, MO, USA
Registered: 2019-06-18
Posts: 27

Re: Building/running for Apple Silicon M1 (aarch64-darwin)

Unfortunately, it does look like the test/fpc/bin/aarch64-darwin/data/ directory is there and populated with what looks like the same files as on an aarch64-linux machine that passed the tests with zero errors.

If I look at the log files that are created with each run, it looks like the errors occurring are almost all consequences of openssl libs not being there, but it's failing without noting the cause of the exception on the console as it does on, let's say, x86_64-darwin.

Last edited by sstillwell (2022-04-22 15:07:05)

Offline

Board footer

Powered by FluxBB