From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 662A38A7 for ; Fri, 14 Aug 2015 16:54:57 +0000 (UTC) X-Greylist: delayed 00:16:53 by SQLgrey-1.7.6 Received: from wp059.webpack.hosteurope.de (wp059.webpack.hosteurope.de [80.237.132.66]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 9F17522C for ; Fri, 14 Aug 2015 16:54:55 +0000 (UTC) Received: from [81.0.112.130] (helo=[192.168.0.106]); authenticated by wp059.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) id 1ZQHzT-0000PP-4d; Fri, 14 Aug 2015 18:37:59 +0200 Content-Type: multipart/signed; boundary="Apple-Mail=_D85D2123-6AF8-47A1-B6AE-EA5A82853EE2"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\)) X-Pgp-Agent: GPGMail 2.5 From: Tamas Blummer In-Reply-To: Date: Fri, 14 Aug 2015 18:37:57 +0200 Message-Id: <499C1F46-5EB8-4846-86B6-0B3F2E02D972@bitsofproof.com> References: <09C8843E-8379-404D-8357-05BDB1F749C1@me.com> To: bitcoin-dev@lists.linuxfoundation.org X-Mailer: Apple Mail (2.2102) X-bounce-key: webpack.hosteurope.de; tamas@bitsofproof.com; 1439571295; 0b8e01bc; X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [bitcoin-dev] libconsensus assertion fails if used in multiple threads X-BeenThere: bitcoin-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Bitcoin Development Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2015 16:54:57 -0000 --Apple-Mail=_D85D2123-6AF8-47A1-B6AE-EA5A82853EE2 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 We integrated libconsensus into bits of proof. It works well, in-line = for all test cases with our Java engine and is about 50% faster on a = single thread. The performance advantage unfortunatelly reverses if libconsensus is = executed on several threads simultaneously as we do with the Java = engine, since an error: Assertion failed: (pkey !=3D NULL), function CECKey, file = ecwrapper.cpp, line 96. arises under that stress. I guess that the cause is that thread callbacks as advised for OpenSSL = on https://www.openssl.org/docs/crypto/threads.html are not registered. Registering those however would require access to OpenSSL functions, not = exported from the lib. I=E2=80=99d be thankful for a pointer to a workaround. Tamas Blummer --Apple-Mail=_D85D2123-6AF8-47A1-B6AE-EA5A82853EE2 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJVzhlmAAoJEPZykcUXcTkcuukH/32A1jeyEb305yJH/pv0fiJC TlROamqF3QWiWZsvaAu/3+aOOKXKjd0Vxa9T7rW7+xIKpiQbFDu8671SSU/JNCsi Uisl52oABWU6Q21KoW76KhVJD4Nb70b5796RBTQfAPWtnZSSARKfLKxFBJNBvjMm L/9DfA8vHHF0Mdi7DxDvyWLdyzH3Gt3qDjdtnbJpCzP/OkABlVTjQjuOQsX1ZqTY ojMPpsCr1m2OCCdETBgTfTzYdPtNJ4u9SoMIlbRrk3KzY2Sf0ZqxUETyI+Ux8czG qcJla1YSyLpqjNg/e866WUTrDm/BRtFRS51bxu4Vr4GZcBe3gauAj2YddkqSxIE= =P9xg -----END PGP SIGNATURE----- --Apple-Mail=_D85D2123-6AF8-47A1-B6AE-EA5A82853EE2--