Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make check errors on v0.8.2rc2 #3672

Closed
grubles opened this issue Apr 27, 2020 · 6 comments
Closed

Make check errors on v0.8.2rc2 #3672

grubles opened this issue Apr 27, 2020 · 6 comments

Comments

@grubles
Copy link
Contributor

grubles commented Apr 27, 2020

Issue and Steps to Reproduce

Running $ make check results in this error.

[user@box lightning]$ make full-check
lightningd: WARNING: default network changing in 2020: please set network=testnet in config!
VALGRIND=1 valgrind -q --error-exitcode=7 --track-origins=yes --leak-check=full --show-reachable=yes --errors-for-leak-kinds=all bitcoin/test/run-tx-encode > /dev/null
VALGRIND=1 valgrind -q --error-exitcode=7 --track-origins=yes --leak-check=full --show-reachable=yes --errors-for-leak-kinds=all bitcoin/test/run-bitcoin_block_from_hex > /dev/null
VALGRIND=1 valgrind -q --error-exitcode=7 --track-origins=yes --leak-check=full --show-reachable=yes --errors-for-leak-kinds=all bitcoin/test/run-secret_eq_consttime > /dev/null
VALGRIND=1 valgrind -q --error-exitcode=7 --track-origins=yes --leak-check=full --show-reachable=yes --errors-for-leak-kinds=all common/test/run-key_derive > /dev/null
VALGRIND=1 valgrind -q --error-exitcode=7 --track-origins=yes --leak-check=full --show-reachable=yes --errors-for-leak-kinds=all common/test/run-sphinx > /dev/null
VALGRIND=1 valgrind -q --error-exitcode=7 --track-origins=yes --leak-check=full --show-reachable=yes --errors-for-leak-kinds=all common/test/run-softref > /dev/null
VALGRIND=1 valgrind -q --error-exitcode=7 --track-origins=yes --leak-check=full --show-reachable=yes --errors-for-leak-kinds=all common/test/run-cryptomsg > /dev/null
VALGRIND=1 valgrind -q --error-exitcode=7 --track-origins=yes --leak-check=full --show-reachable=yes --errors-for-leak-kinds=all common/test/run-funding_tx > /dev/null
VALGRIND=1 valgrind -q --error-exitcode=7 --track-origins=yes --leak-check=full --show-reachable=yes --errors-for-leak-kinds=all common/test/run-bolt11 > /dev/null
VALGRIND=1 valgrind -q --error-exitcode=7 --track-origins=yes --leak-check=full --show-reachable=yes --errors-for-leak-kinds=all common/test/run-gossip_rcvd_filter > /dev/null
VALGRIND=1 valgrind -q --error-exitcode=7 --track-origins=yes --leak-check=full --show-reachable=yes --errors-for-leak-kinds=all common/test/run-bigsize > /dev/null
==30055== Invalid read of size 4
==30055==    at 0x10027E88: main (run-bigsize.c:295)
==30055==  Address 0x477bd4e is 9,262 bytes inside a block of size 9,265 alloc'd
==30055==    at 0x40842AC: malloc (vg_replace_malloc.c:309)
==30055==    by 0x10021E57: allocate (tal.c:250)
==30055==    by 0x10022B5F: tal_alloc_ (tal.c:428)
==30055==    by 0x10022C97: tal_alloc_arr_ (tal.c:471)
==30055==    by 0x10023A27: tal_dup_ (tal.c:799)
==30055==    by 0x10020F0B: tal_strdup_ (str.c:18)
==30055==    by 0x100213B7: tal_strsplit_ (str.c:156)
==30055==    by 0x10027CBB: main (run-bigsize.c:289)
==30055== 
make: *** [Makefile:456: unittest/common/test/run-bigsize] Error 7

OS: CentOS 8
Arch: ppc64le

note: I did not run into this on Ubuntu 18.04 (on same arch) so it's possible it's something CentOS specific.

@niftynei niftynei added this to the Next Release milestone Apr 27, 2020
@niftynei
Copy link
Collaborator

Failed to repro on a centos x86_64 box (4.18.0-147.3.1.el8_1.x86_64)

@niftynei
Copy link
Collaborator

per discussion with @rustyrussell, this is likely due to a bug/oversight in the PPC-Valgrind implementation. (Successfully reproduced on centos ppc64le).

In the meantime, I'd suggest running the checks with the address sanitizer enabled instead (though i'm not 100% sure it works since it's using cc not gcc?)

/.configure --disable-valgrind --enable-address-sanitizer

@mpe
Copy link

mpe commented Apr 28, 2020

I agree this is probably a ppc64le/valgrind issue.

I can reproduce on Fedora 31 with valgrind 3.15:

VALGRIND=1 valgrind -q --error-exitcode=7 --track-origins=yes --leak-check=full --show-reachable=yes --errors-for-leak-kinds=all common/test/run-bigsize > /dev/null
==22135== Invalid read of size 4
==22135==    at 0x100278A8: main (run-bigsize.c:295)
==22135==  Address 0x477bd5e is 9,262 bytes inside a block of size 9,265 alloc'd
==22135==    at 0x40841AC: malloc (vg_replace_malloc.c:309)
==22135==    by 0x10021C67: allocate (tal.c:250)
==22135==    by 0x10022703: tal_alloc_ (tal.c:428)
==22135==    by 0x1002283B: tal_alloc_arr_ (tal.c:471)
==22135==    by 0x100235B7: tal_dup_ (tal.c:799)
==22135==    by 0x10020AAB: tal_strdup_ (str.c:18)
==22135==    by 0x10020F57: tal_strsplit_ (str.c:156)
==22135==    by 0x100277A3: main (run-bigsize.c:289)
==22135== 

@mpe
Copy link

mpe commented Apr 28, 2020

And also with valgrind git 0788b1cf7 NEWS: Mention the MinGW include/valgrind.h fix.

@shenki
Copy link

shenki commented Apr 28, 2020

There was a fix made for a similar (same?) issue a few years ago:

https://bugs.kde.org/show_bug.cgi?id=386945

However it indicates the issue was fixed, which @mpe has shown it is not.

@rustyrussell
Copy link
Contributor

Thanks to @shenki and @mpe I've filed a bug at https://bugs.kde.org/show_bug.cgi?id=420780

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants