Open cr-marcstevens opened 3 weeks ago
@cr-marcstevens I will take a look into this.
Addressed by PR #1998.
% tests/speed_sig_stfl -d 49 -i LMS_SHA256_H10_W4_H5_W8
speed_sig_stfl(51199,0x202cfb840) malloc: nano zone abandoned due to inability to reserve vm space.
Configuration info
==================
Target platform: arm64-Darwin-24.1.0
Compiler: clang (16.0.0 (clang-1600.0.26.4))
Compile options: [-mcpu=native;-Wa,--noexecstack;-g3;-fno-omit-frame-pointer;-fno-optimize-sibling-calls;-fsanitize-address-use-after-scope;-fsanitize=address;-Wbad-function-cast;-Wcast-qual;-Wnarrowing;-Wconversion]
OQS version: 0.11.1-dev
Git commit: 507d03009cecc30a4aed78279d08ab7f8de813f8 (+ local modifications)
OpenSSL enabled: Yes (OpenSSL 1.1.1w 11 Sep 2023)
AES: OpenSSL
SHA-2: OpenSSL
SHA-3: C
OQS build flags: OQS_LIBJADE_BUILD USE_SANITIZER=Address OQS_OPT_TARGET=auto CMAKE_BUILD_TYPE=Debug
CPU exts compile-time: AES SHA2 SHA3 NEON
Speed test
==========
Started at 2024-11-19 09:33:48
Operation | Iterations | Total time (s) | Time (us): mean | pop. stdev | High-prec time (ns): mean | pop. stdev
------------------------------------ | ----------:| --------------:| ---------------:| ----------:| -------------------------:| ----------:
LMS_SHA256_H10_W4_H5_W8 | | | | | |
keypair | 94 | 49.370 | 525210.798 | 4673.927 | 525210599 | 4673832
sign | 61 | 49.353 | 809066.164 | 43784.960 | 809065963 | 43784936
verify | 23965 | 49.002 | 2044.711 | 970.274 | 2044650 | 970268
public key bytes: 60, secret key bytes: 64, signature bytes: 3860
Ended at 2024-11-19 09:36:16
tests/speed_sig_stfl -d 49 -i LMS_SHA256_H5_W8_H5_W8
speed_sig_stfl(54425,0x202cfb840) malloc: nano zone abandoned due to inability to reserve vm space.
Configuration info
==================
Target platform: arm64-Darwin-24.1.0
Compiler: clang (16.0.0 (clang-1600.0.26.4))
Compile options: [-mcpu=native;-Wa,--noexecstack;-g3;-fno-omit-frame-pointer;-fno-optimize-sibling-calls;-fsanitize-address-use-after-scope;-fsanitize=address;-Wbad-function-cast;-Wcast-qual;-Wnarrowing;-Wconversion]
OQS version: 0.11.1-dev
Git commit: 507d03009cecc30a4aed78279d08ab7f8de813f8 (+ local modifications)
OpenSSL enabled: Yes (OpenSSL 1.1.1w 11 Sep 2023)
AES: OpenSSL
SHA-2: OpenSSL
SHA-3: C
OQS build flags: OQS_LIBJADE_BUILD USE_SANITIZER=Address OQS_OPT_TARGET=auto CMAKE_BUILD_TYPE=Debug
CPU exts compile-time: AES SHA2 SHA3 NEON
Speed test
==========
Started at 2024-11-19 09:43:05
Operation | Iterations | Total time (s) | Time (us): mean | pop. stdev | High-prec time (ns): mean | pop. stdev
------------------------------------ | ----------:| --------------:| ---------------:| ----------:| -------------------------:| ----------:
LMS_SHA256_H5_W8_H5_W8 | | | | | |
keypair | 406 | 49.003 | 120697.039 | 2169.650 | 120696921 | 2169603
sign | 130 | 49.018 | 377064.923 | 35585.543 | 377064838 | 35585534
verify | 12401 | 49.001 | 3951.385 | 1247.185 | 3951331 | 1247183
public key bytes: 60, secret key bytes: 64, signature bytes: 2644
Ended at 2024-11-19 09:45:33
tests/speed_sig_stfl -d 49 -i LMS_SHA256_H5_W8_H5_W8
Configuration info
==================
Target platform: arm64-Darwin-24.1.0
Compiler: clang (16.0.0 (clang-1600.0.26.4))
Compile options: [-march=armv8-a+crypto;-Wall;-Wextra;-Wpedantic;-Wno-unused-command-line-argument;-Wa,--noexecstack;-O3;-fomit-frame-pointer;-Wbad-function-cast;-Wcast-qual;-Wnarrowing;-Wconversion]
OQS version: 0.11.1-dev
Git commit: 764f62d9add2742449d4b94113e514f4a72c3364
OpenSSL enabled: Yes (OpenSSL 1.1.1w 11 Sep 2023)
AES: OpenSSL
SHA-2: OpenSSL
SHA-3: C
OQS build flags: OQS_DIST_BUILD OQS_LIBJADE_BUILD OQS_OPT_TARGET=generic CMAKE_BUILD_TYPE=Release
CPU exts active: AES SHA2 SHA3 NEON
Speed test
==========
Started at 2024-11-19 12:23:29
Operation | Iterations | Total time (s) | Time (us): mean | pop. stdev | High-prec time (ns): mean | pop. stdev
------------------------------------ | ----------:| --------------:| ---------------:| ----------:| -------------------------:| ----------:
LMS_SHA256_H5_W8_H5_W8 | | | | | |
keypair | 1574 | 49.030 | 31150.048 | 632.895 | 31150021 | 632896
sign | 487 | 49.061 | 100741.156 | 9999.512 | 100741132 | 9999504
verify | 55355 | 49.001 | 885.209 | 15.356 | 885175 | 15356
During benchmarking of statefull signatures the only two enabled LMS multi-tree algorithms (LMS_SHA256_H5_W8_H5_W8 and LMS_SHA256_H10_W4_H5_W8) both crash during the signing benchmark loop.
It appears to only crash when the benchmark duration is sufficiently large to exhaust the first subtree. That is, for LMS_SHA256_H10_W4_H5_W8, generating 31 signatures is okay, but it crashes when generating 32 signatures.
Used command lines & output:
Note that the local changes to the repo are minimal and do not affect this bug:
Also note that the allocated virtual memory usage of LMS is huge: