Fix OpenSSL related crashes on OSX and Arch#77
Fix OpenSSL related crashes on OSX and Arch#77petertodd wants to merge 1 commit intomasterpetertodd/python-bitcoinlib:masterfrom fix_osx_and_arch_crashespetertodd/python-bitcoinlib:fix_osx_and_arch_crashesCopy head branch name to clipboard
Conversation
Credit goes to Casey Rodarmor for the fix, which is copied from a MIT-licensed QA tests pull-req for Bitcoin Core that was written by him: https://github.com/casey/bitcoin/blob/fullblocktest/qa/rpc-tests/test_framework/key.py
|
I am still experiencing a segmentation fault on OS X 10.9.5. |
|
Thanks! Mind running those in verbose mode? -v switch. On 18 August 2015 15:55:15 GMT-07:00, Michael Goldstein notifications@github.com wrote:
|
|
Sure! |
|
I can verify @bitstein's results on OS X 10.9.5 for each of Python 2.7, Python 3.4, and PyPy 2.6.0 (all up-to-date compiled from sources via MacPorts). They all seg. fault in UPDATE: It also seg. faults in the same test when using OS X's native Python (version 2.7.5 from |
|
Thanks! What about without this patch, where does it segfault? |
|
It is segfaulting at the same place. |
|
Hmm, well, the sign message code is at least somewhat niche; what if you disable that test? Does it still segfault anywhere? |
|
I commented out that class: |
|
@bitstein Bah, sounds like it doesn't fit the issue then. :( |
|
@petertodd, it looks like you're missing specs for quite a few OpenSSL calls. This patch contains what I think are the bare minimum to get tests passing again, but there are yet more OpenSSL functions called from % comm -2 -3 <( grep '_ssl\.' bitcoin/core/key.py | grep -E -v '\.(argtypes|errcheck|restype)' | sed -E -e 's%^.*_ssl\.([^(]+)\(.*$%\1%' | sort | uniq ) <( grep -E '_ssl\..*\.(argtypes|errcheck|restype)' bitcoin/core/key.py | sed -E -e 's%^.*_ssl\.([^.]+)\.(argtypes|errcheck|restype).*$%\1%' | sort | uniq )
BN_zero
ECDSA_size
ERR_error_string_n
ERR_get_error
d2i_ECDSA_SIG
d2i_ECPrivateKey
i2d_ECPrivateKey
o2i_ECPublicKeyLet me know if you want this in a PR. |
|
I don't suppose this PR is helpful? Not too familiar with Macs, but I know similar issues (on an old Win7 64bit laptop) were ameliorated by using OpenSSL 32bit |
|
@simcity4242, is that the correct PR? It doesn't look like it addresses segfaults. You might be right about using 32-bit libraries, but I don't think this is a viable option for OS X (which I believe has been 64-bit only since 10.7). |
|
@bitstein, @petertodd: check out #79. I don't get any segfaults with that branch. |
|
@posita yeah, correct PR; I thought it may be tangentially related because I had similar issues with the code not finding the NIST SECP256K1 (I forget the exact param name). I raised it in case it helped as I eventually got it working but it was a combination of a few things and I didn't isolate which one |
|
Closing, obsoleted by #79 |
Allegedly this fixes OpenSSL-related crashes on OSX and Arch Linux, a persistent problem for those users. (see #30)
Unfortunately I don't have a OSX, or Arch Linux, machine to test with, so I can't reproduce the problem. But if some other users could chime in as to whether this fixes the issues seen before that'd be great; I'll make a new release if this gets merged.
CC: @casey @gavinandresen @dasmithii @jamespedwards42 @posita @HelloZeroNet