From: Tamas Blummer <tamas@bitsofproof.com>
To: bitcoin-dev@lists.linuxfoundation.org
Subject: [bitcoin-dev] libconsensus assertion fails if used in multiple threads
Date: Fri, 14 Aug 2015 18:37:57 +0200 [thread overview]
Message-ID: <499C1F46-5EB8-4846-86B6-0B3F2E02D972@bitsofproof.com> (raw)
In-Reply-To: <D018B1B0-B613-4C05-84BB-02CE6E2FEA3E@me.com>
[-- Attachment #1: Type: text/plain, Size: 742 bytes --]
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 != 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’d be thankful for a pointer to a workaround.
Tamas Blummer
[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 496 bytes --]
next prev parent reply other threads:[~2015-08-14 16:54 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-14 9:59 [bitcoin-dev] Adjusted difficulty depending on relative blocksize Jakob Rönnbäck
2015-08-14 13:32 ` Angel Leon
2015-08-14 14:19 ` Jakob Rönnbäck
2015-08-14 16:37 ` Tamas Blummer [this message]
2015-08-14 21:10 ` [bitcoin-dev] libconsensus assertion fails if used in multiple threads Cory Fields
2015-08-18 5:03 ` Cory Fields
2015-08-18 10:31 ` Tamas Blummer
2015-08-18 17:25 ` Cory Fields
2015-08-18 17:50 ` Cory Fields
2015-08-18 21:40 ` Eric Voskuil
2015-08-14 14:20 ` [bitcoin-dev] Adjusted difficulty depending on relative blocksize Anthony Towns
[not found] ` <A6B32C22-4006-434E-9B89-D7C99B5743A8@me.com>
2015-08-14 14:48 ` Jakob Rönnbäck
2015-08-14 15:00 ` Anthony Towns
2015-08-14 15:03 ` Adam Back
2015-08-14 15:14 ` Jakob Rönnbäck
2015-09-09 3:27 ` Tom Harding
2015-09-09 18:59 ` Warren Togami Jr.
2015-09-09 19:53 ` Tom Harding
2015-08-14 22:12 ` Tom Harding
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=499C1F46-5EB8-4846-86B6-0B3F2E02D972@bitsofproof.com \
--to=tamas@bitsofproof.com \
--cc=bitcoin-dev@lists.linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox