Closed nzwallaby closed 4 years ago
You ran out of memory. We don't handle that gracefully, but it's very unusual. How much RAM do you have?
It's actually not an out-of-memory condition. I've run into this problem before. It comes about because your libwallycore was compiled with a different value of BUILD_ELEMENTS
than your C-Lightning was. That causes the size of struct wally_tx_output
to differ between the shared library and the executable, and thus when C-Lightning tries to examine wtx->outputs[1]
(or any subsequent output), it's not looking in the correct location, and KABOOM!
Arguably this is poor ABI design on the part of libwallycore. It shouldn't be possible for the ABI to silently break depending on a preprocessor definition in the consuming code. But that's the case with libwallycore.
To resolve your problem, be sure you are configuring libwallycore with --enable-elements
. And if you have any other programs linked against libwallycore, you'll have to recompile them with -DBUILD_ELEMENTS=1
so that they understand libwallycore's structures in the same way as libwallycore does.
Oh, and one other thing I should mention: libwallycore's configure.ac
contains Bashisms, so if your /bin/sh
isn't Bash, you'll have to set CONFIG_SHELL=/bin/bash
before configuring libwallycore. If you don't do that, then things break. The BUILD_ELEMENTS
setting is one of them, if I recall correctly.
It's actually not an out-of-memory condition. I've run into this problem before. It comes about because your libwallycore was compiled with a different value of
BUILD_ELEMENTS
than your C-Lightning was.
My understanding is that libwallycore is compiled automatically when compiling c-lightning, so I'm not sure I understand how it would have been compiled with a different value of BUILD_ELEMENTS
? I did this on a fresh extract of the zip file with the source.
libwallycore configures using Autotools. C-Lightning uses ccan configurator. Just set CONFIG_SHELL=/bin/bash
in your environment before starting the build.
Issue and Steps to Reproduce
I'm running an up to date install of Void Linux voidlinux.org. I've compiled the program from the release source v0.8.1, all seems fine.
I can run lightningd, and it start off well for a little while but then I get a bunch of BROKEN messages with FATAL SIGNAL 6. Sorry for not including too detailed logs, I'm not sure what all the hex messages mean and I don't want to expose any secrets. I replaced all the hexes with 0xg, except for the final one in the stacktrace which is
0xffffffffffffffff