Hello,
While executing tests right after a fresh v1.0.12 install on CentOS7, i get a failed check. Even more worrying that its named “check-security-hardening” :
===== BEGIN: /usr/src/zcash/qa/zcash/check-security-hardening.sh
[...]
Checking binary security of [zcashd zcash-cli zcash-tx]...
zcash-cli: failed NX RELRO
zcash-tx: failed NX RELRO
make: *** [check-security] Erreur 1
[...]
===== FAILED: /usr/src/zcash/qa/zcash/check-security-hardening.sh
I’ll try to have a look at source code but i’m not an expert at all so i still need help at the moment.
Thanks for helping!
PS: I saw similar but unanswered topic from a year ago : Check-security-hardening failed
1 Like
daira
October 26, 2017, 12:32am
2
Versions:
GCC 4.9.2 20150212 (Red Hat 4.9.2-6) (gcc -v)
GNU ld version 2.24 (ld -v)
GNU assembleur 2.24 […] BFD version 2.24 (as -v)
And this is an enlighted version of yum list installed (i tried to remove everything i know was out of topic but let in-scl unknown packages). And yes i use autotools-latest scl with devtoolset-3 to avoid out of date centOS packages.
scl enable devtoolset-3 ‘scl enable autotools-latest bash’
autoconf.noarch 2.69-11.el7 @base
automake.noarch 1.13.4-3.el7 @base
autotools-latest.x86_64 1-14.el7.centos @praiskup-autotools-epel-7-x86_64
autotools-latest-autoconf.noarch 2.69-4.el7.centos @praiskup-autotools-epel-7-x86_64
autotools-latest-automake.noarch 1.15-4.el7.centos @praiskup-autotools-epel-7-x86_64
autotools-latest-libtool.x86_64 2.4.2-16.el7.centos @praiskup-autotools-epel-7-x86_64
autotools-latest-m4.x86_64 1.4.17-4.el7.centos @praiskup-autotools-epel-7-x86_64
autotools-latest-runtime.x86_64 1-14.el7.centos @praiskup-autotools-epel-7-x86_64
devtoolset-3.x86_64 3.1-12.el7 @centos-sclo-rh
devtoolset-3-binutils.x86_64 2.24-18.el7 @centos-sclo-rh
devtoolset-3-elfutils.x86_64 0.161-1.el7 @centos-sclo-rh
devtoolset-3-elfutils-libelf.x86_64 0.161-1.el7 @centos-sclo-rh
devtoolset-3-elfutils-libs.x86_64 0.161-1.el7 @centos-sclo-rh
devtoolset-3-gcc.x86_64 4.9.2-6.el7 @centos-sclo-rh
devtoolset-3-gcc-c++.x86_64 4.9.2-6.el7 @centos-sclo-rhh
devtoolset-3-gdb.x86_64 7.8.2-38.el7 @centos-sclo-rh
devtoolset-3-icu4j.noarch 1:54.1.1-4.4.el7 @centos-sclo-rh
devtoolset-3-ide.x86_64 3.1-12.el7 @centos-sclo-rhlo-rh
devtoolset-3-libstdc++-devel.x86_64 4.9.2-6.el7 @centos-sclo-rh
devtoolset-3-runtime.x86_64 3.1-12.el7 @centos-sclo-rh
devtoolset-3-toolchain.x86_64 3.1-12.el7 @centos-sclo-rh
devtoolset-3-xmlrpc-client.noarch 1:3.1.3-8.4.el7 @centos-sclo-rh
devtoolset-3-xmlrpc-common.noarch 1:3.1.3-8.4.el7 @centos-sclo-rh
devtoolset-3-xmlrpc-server.noarch 1:3.1.3-8.4.el7 @centos-sclo-rh
As i need to go, i’ll have a look later this day on the issue you linked.
Thanks for the help!
1 Like
daira
October 26, 2017, 10:47am
4
Those version numbers aren’t consistent with the current hypothesis about what causes #2212 , so it could be an independent problem.
I have another theory: I notice you’re running in a French-language locale, and the script might be too dependent on matching English output from the commands it uses. Can you try running in an English locale to check this?
[Edit: this theory is supported by the fact that in the previous forum post, the script ran in an Italian-language locale.]
2 Likes
Hello,
I confirm the “check-security-hardening” test suite is OK using en_US.utf8 and en_GB.utf8 locale. It could be a good thing to add in the wiki “User Guide” page to change locale for the testing part: i’ll try to commit a clean edit .
So now i’m just getting the bitcoin test suite error but as buildbot encouters the same error (test/rpc_wallet_tests.cpp(285): error: in “rpc_wallet_tests/rpc_wallet”: unexpected exception thrown by CallRPC(“getblock 0”)) i’m not worrying a lot about it.
Thanks for the tip, i didn’t think to this possibility!
1 Like
GitHub issue created to inform devs :
opened 06:31PM - 26 Oct 17 UTC
closed 06:19PM - 05 Feb 18 UTC
C-bug
I-SECURITY
A-testing
E-good-first-issue
### Issue description
After clean compilation from source on CentOS7 by followi… ng step-by-step "1.0 User Guide" wiki page, Executing the full test suite on a non-english locale gives some fails while changing local to en_GB or en_US, rebooting, relaunching full test suite gives clean output with no error.
### Issue is reproductible
#### Those steps are all made with the software versions described right below
```bash
$ git clone https://github.com/zcash/zcash.git
$ cd zcash/
$ git checkout v1.0.12
$ ./zcutil/fetch-params.sh
$ ./zcutil/build.sh --disable-rust -j 2
$ ./qa/zcash/full-test-suite.sh
```
I could reproduce the error with fr_FR, de_DE, es_ES, it_IT (all used as .utf8 variant)
### With en_US.utf8 or en_GB.utf8 locale : Partial output
``` bash
===== BEGIN: /usr/src/zcash/qa/zcash/check-security-hardening.sh
make: Entering directory `/usr/src/zcash/src'
Checking binary security of [zcashd zcash-cli zcash-tx]...
make: Leaving directory `/usr/src/zcash/src'
PASS: /usr/src/zcash/src/zcashd has no RPATH or RUNPATH.
PASS: /usr/src/zcash/src/zcash-cli has no RPATH or RUNPATH.
PASS: /usr/src/zcash/src/zcash-gtest has no RPATH or RUNPATH.
PASS: /usr/src/zcash/src/zcash-tx has no RPATH or RUNPATH.
PASS: /usr/src/zcash/src/test/test_bitcoin has no RPATH or RUNPATH.
PASS: /usr/src/zcash/src/zcash/GenerateParams has no RPATH or RUNPATH.
PASS: /usr/src/zcash/src/zcashd has FORTIFY_SOURCE.
PASS: /usr/src/zcash/src/zcash-cli has FORTIFY_SOURCE.
PASS: /usr/src/zcash/src/zcash-gtest has FORTIFY_SOURCE.
PASS: /usr/src/zcash/src/zcash-tx has FORTIFY_SOURCE.
PASS: /usr/src/zcash/src/test/test_bitcoin has FORTIFY_SOURCE.
PASS: /usr/src/zcash/src/zcash/GenerateParams has FORTIFY_SOURCE.
===== PASSED: /usr/src/zcash/qa/zcash/check-security-hardening.sh
```
### With fr_FR.utf8 locale : Partial output
``` bash
===== BEGIN: /usr/src/zcash/qa/zcash/check-security-hardening.sh
make: Entering directory `/usr/src/zcash/src'
Checking binary security of [zcashd zcash-cli zcash-tx]...
zcash-cli: failed NX RELRO
zcash-tx: failed NX RELRO
make: *** [check-security] Erreur 1
make: Leaving directory `/usr/src/zcash/src'
===== FAILED: /usr/src/zcash/qa/zcash/check-security-hardening.sh
```
### Build tool versions (Zcashd v1.0.12)
```
autoconf.noarch 2.69-11.el7 @base
automake.noarch 1.13.4-3.el7 @base
autotools-latest.x86_64 1-14.el7.centos @praiskup-autotools-epel-7-x86_64
autotools-latest-autoconf.noarch 2.69-4.el7.centos @praiskup-autotools-epel-7-x86_64
autotools-latest-automake.noarch 1.15-4.el7.centos @praiskup-autotools-epel-7-x86_64
autotools-latest-libtool.x86_64 2.4.2-16.el7.centos @praiskup-autotools-epel-7-x86_64
autotools-latest-m4.x86_64 1.4.17-4.el7.centos @praiskup-autotools-epel-7-x86_64
autotools-latest-runtime.x86_64 1-14.el7.centos @praiskup-autotools-epel-7-x86_64
devtoolset-3.x86_64 3.1-12.el7 @centos-sclo-rh
devtoolset-3-binutils.x86_64 2.24-18.el7 @centos-sclo-rh
devtoolset-3-elfutils.x86_64 0.161-1.el7 @centos-sclo-rh
devtoolset-3-elfutils-libelf.x86_64 0.161-1.el7 @centos-sclo-rh
devtoolset-3-elfutils-libs.x86_64 0.161-1.el7 @centos-sclo-rh
devtoolset-3-gcc.x86_64 4.9.2-6.el7 @centos-sclo-rh
devtoolset-3-gcc-c++.x86_64 4.9.2-6.el7 @centos-sclo-rhh
devtoolset-3-gdb.x86_64 7.8.2-38.el7 @centos-sclo-rh
devtoolset-3-icu4j.noarch 1:54.1.1-4.4.el7 @centos-sclo-rh
devtoolset-3-ide.x86_64 3.1-12.el7 @centos-sclo-rhlo-rh
devtoolset-3-libstdc++-devel.x86_64 4.9.2-6.el7 @centos-sclo-rh
devtoolset-3-runtime.x86_64 3.1-12.el7 @centos-sclo-rh
devtoolset-3-toolchain.x86_64 3.1-12.el7 @centos-sclo-rh
devtoolset-3-xmlrpc-client.noarch 1:3.1.3-8.4.el7 @centos-sclo-rh
devtoolset-3-xmlrpc-common.noarch 1:3.1.3-8.4.el7 @centos-sclo-rh
devtoolset-3-xmlrpc-server.noarch 1:3.1.3-8.4.el7 @centos-sclo-rh
```
### Machine specs:
- Virtualization Software : Virtualbox 5.1.30
- OS name + version: CentOS Linux release 7.4.1708 (Core) - Hosted on Windows 10
- CPU: Physical i5-4430 / Virtual Quad-Threaded
- RAM Setup1: Physical 8Go / Virtual 2Go + 25Go swap
- RAM Setup2: Physical 8Go / Virtual 5Go + 25Go swap
- Disk size: LVM PV 500Go + 20Go / LV 495Go Root + 25 Go Swap
- Disk Type (HD/SDD): Physical HDD 7200rpm
- Linux kernel version (uname -a): 3.10.0-693.5.2.el7.x86_64
- Compiler version (gcc -version): devtoolset-3-gcc.x86_64 - 4.9.2-6.el7
### Link to forum
https://forum.z.cash/t/test-check-security-hardening-failed-solved/22652 - My case
https://forum.z.cash/t/check-security-hardening-failed/3625 - Another case, may be related **(no proof!)**
### TODO Proposition
- If possible, temporarily set locale to en_US.utf8 (locale used by buildbot) during tests.
- Else, adapt wiki "1.0-User-Guide.md" and root "doc/unit-tests.md" to precise how to change locale so newcomers won't be destabilized.
_PS: Full log file will be attached tomorrow_
PS: I can’t edit my own posts, have to make a new one each time…
1 Like
mtve
October 26, 2017, 7:37pm
7
would you please try just of curiosity:
zcash-cli getblock {anything}
i suspect it’s broken regex of centos system gcc.
1 Like
mtve:
would you please try just of curiosity:
zcash-cli getblock {anything}
i suspect it’s broken regex of centos system gcc.
Here is the output (for info, i’m with en_GB.utf8 local but i guess it’s not coming from here this time) :
[root@cryptocurrency zcash]# src/zcash-cli getblock 1000 # In-range
error code: -1
error message:
regex_error
[root@cryptocurrency zcash]# src/zcash-cli getblock 100000 # Out of range
error code: -1
error message:
regex_error
[root@cryptocurrency zcash]# src/zcash-cli getblockchaininfo # Current downloaded blocks
{
"chain": "main",
"blocks": 1465,
[...]
daira
October 27, 2017, 6:52am
9
Please file a separate Github issue for the regex_error problem, thanks.