STATUS won't breathe
rico666 opened this issue · 9 comments
# python run_analysis.py
Traceback (most recent call last):
File "run_analysis.py", line 1, in <module>
from bitcoin_tools.analysis.status.data_dump import transaction_dump, utxo_dump
File "/usr/lib64/python2.7/bitcoin_tools/analysis/status/data_dump.py", line 3, in <module>
from bitcoin_tools.analysis.status.utils import check_multisig, get_min_input_size, roundup_rate, check_multisig_type, \
File "/usr/lib64/python2.7/bitcoin_tools/analysis/status/utils.py", line 3, in <module>
import ujson
ImportError: /root/.local/lib64/python2.7/site-packages/ujson.so: undefined symbol: Buffer_AppendShortHexUnchecked
What am I doing wrong?
Looks like there's a problem with the ujson library. It may be related to ultrajson/ultrajson#237
May be also related to ultrajson/ultrajson#277. Are you compiling it with gcc5+? Try to compile ujson with gcc4 as suggested by @yurijmikhalevich in the last comment.
Indeed. Using gcc 7.2.0 here. Thanks for the pointer - I'll investigate this weekend and report.
Did you managed to work it around?
Unfortunately not yet. Using Arch Linux and Gentoo here, Everything below GCC-6 is hard masked in the latter. I also had some trouble with the python part, given the fact that 3.6 is default on the servers I am testing.
Will play around a little but in general it would be nice if a more modern/recent infrastructure would be supported by this project. (as it does support the most recent chainstate format).
Feel free to close - or ping me if you need testing on new compiler/python versions.
We are not planning on adding Python 3 support (not in the near future at least), PRs are more than welcome though.
Regarding ujson, I'll open an issue and look for workarounds, it is used basically to speed up all the utxo ser parsing process, so ultimately it can be replaced by any other fast json library than behaves in a similar way. I'll ping you if I find a solution.
@rico666 Can you tell me the versions of gcc, python and ujson you are using in your Arch?
I just tested it in mine under GCC 6.4.1, Python 2.7.14 and ujson 1.35 and it's working fine.
[sdelgado@sdelgado status]$ python --version
Python 2.7.14
[sdelgado@sdelgado status]$ gcc --version
gcc (GCC) 6.4.1 20171003
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[sdelgado@sdelgado status]$ pip2.7 show ujson
Name: ujson
Version: 1.35
Summary: Ultra fast JSON encoder and decoder for Python
Home-page: http://www.esn.me
Author: Jonas Tarnstrom
Author-email: jonas.tarnstrom@esn.me
License: BSD License
Location: /usr/lib/python2.7/site-packages
Requires:
[sdelgado@sdelgado status]$ python run_analysis.py
Parsing the chainstate.
Same with Debian, gcc 6.3.0, python 2.7.13, ujson 1.35
sdelgado@deic-satoshi:~$ gcc --version
gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
sdelgado@deic-satoshi:~$ pip show ujson
Name: ujson
Version: 1.35
Summary: Ultra fast JSON encoder and decoder for Python
Home-page: http://www.esn.me
Author: Jonas Tarnstrom
Author-email: jonas.tarnstrom@esn.me
License: BSD License
Location: /home/sdelgado/.local/lib/python2.7/site-packages
Requires:
sdelgado@deic-satoshi:~$ python --version
Python 2.7.13
sdelgado@deic-satoshi:~$ cat /etc/*-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
sdelgado@deic-satoshi:~/git/bitcoin_tools/bitcoin_tools/analysis/status$ python run_analysis.py
Parsing the chainstate.
Closing due to inactivity.