bench_verify test condition failed #476

issue taolinke openend this issue on September 14, 2017
  1. taolinke commented at 2:41 am on September 14, 2017: none

    hey i use the master and found a problem.

     0[root@192.168.19.133 secp256k1]$ uname -a
     1Linux centos_8 2.6.32-431.el6.x86_64 [#1](/bitcoin-core-secp256k1/1/) SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
     2
     3[root@192.168.19.133 secp256k1]$ gcc -v
     4Using built-in specs.
     5Target: x86_64-redhat-linux
     6Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
     7Thread model: posix
     8gcc version 4.4.7 20120313 (Red Hat 4.4.7-17) (GCC)
     9
    10[root@192.168.19.133 secp256k1]$ ./configure --enable-benchmark --enable-experimental --enable-module-ecdh
    11
    12[root@192.168.19.133 secp256k1]$ ./bench_verify
    13ecdsa_verify: min 187us / avg 188us / max 188us
    14src/bench_verify.c:68: test condition failed: result
    15Aborted (core dumped) 
    

    I got some warning when running autogen.sh

    0warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
    
  2. apoelstra commented at 2:44 am on September 14, 2017: contributor

    I think this might be a problem with openssl RPMs not including some EC support. We had this with Fedora several years ago and it wouldn’t surprise me if centos is still affected.

    https://en.bitcoin.it/wiki/OpenSSL_and_EC_Libraries

    OpenSSL is only used in tests (and apparently in the benchmarks), so it won’t affect the soundness of the library if you simply compile without it using ./configure --enable-openssl-tests=no.

  3. taolinke commented at 3:04 am on September 14, 2017: none

    @apoelstra Thanks and you are right. Everything is ok after i recompile with openssl 1.1.0f.

     0[root@192.168.19.133 .libs]$ LD_LIBRARY_PATH=/zz/openssl-1.1.0f:. ldd bench_verify
     1        linux-vdso.so.1 =>  (0x00007fff0afff000)
     2        libsecp256k1.so.0 => ./libsecp256k1.so.0 (0x00007f2058b5e000)
     3        libcrypto.so.1.1 => /zz/openssl-1.1.0f/libcrypto.so.1.1 (0x00007f20586f6000)
     4        libc.so.6 => /lib64/libc.so.6 (0x00007f205835b000)
     5        libdl.so.2 => /lib64/libdl.so.2 (0x00007f2058157000)
     6        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f2057f39000)
     7        /lib64/ld-linux-x86-64.so.2 (0x00007f2058d8a000)
     8[root@192.168.19.133 .libs]$ LD_LIBRARY_PATH=/zz/openssl-1.1.0f:. ./bench_verify
     9ecdsa_verify: min 187us / avg 187us / max 188us
    10ecdsa_verify_openssl: min 477us / avg 478us / max 478us
    
  4. apoelstra commented at 3:06 am on September 14, 2017: contributor

    Great, thanks for trying that!

    I’ll leave this issue open to see what @gmaxwell or @sipa think about it. Maybe we can detect this at configure time and complain about it. But it sounds like problem solved for now.

  5. taolinke closed this on Sep 14, 2017

  6. taolinke reopened this on Sep 14, 2017

  7. taolinke commented at 3:07 am on September 14, 2017: none
    Yeah,it’s solved. Thanks.
  8. gmaxwell closed this on Feb 20, 2019


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-22 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me