vincenzopalazzo / lampo.rs

lampo (lightning in Italian) is a experimental implementation of a tiny lightning node
http://lampo.devcrew.cc
BSD 3-Clause "New" or "Revised" License
37 stars 14 forks source link

python ffi: crash whire running inside lnprototest #132

Open vincenzopalazzo opened 11 months ago

vincenzopalazzo commented 11 months ago

We can fix lnprototest to use the Unix socket but I think we have a bug inside the python library or inside the lnprototest runner

DEBUG    root:lampo.py:102 call to `getinfo` return {'node_id': '03f37129559621cbb4f8f4d4be5dff76ec21c220d7d274a6407683eafb996d97ae', 'peers': 0, 'channels': 0}
INFO     root:runner.py:144 run lampod with node id 03f37129559621cbb4f8f4d4be5dff76ec21c220d7d274a6407683eafb996d97ae
INFO     root:event.py:59 # running {'event': 'Sequence', 'file': 'runner.py', 'pos': '97'}:
DEBUG    root:structure.py:49 receiving event {"event": "Block", "file": "ln_spec_utils.py", "pos": "65"}
INFO     root:event.py:59 # running {'event': 'Block', 'file': 'ln_spec_utils.py', 'pos': '65'}:
DEBUG    root:bitcoind.py:39 Calling getblockcount with arguments ()
DEBUG    root:bitcoind.py:43 Result for getblockcount call: 101
DEBUG    root:bitcoind.py:39 Calling getblockcount with arguments ()
DEBUG    root:bitcoind.py:43 Result for getblockcount call: 101
DEBUG    root:bitcoind.py:39 Calling sendrawtransaction with arguments ('0200000000010184591a56720aabc8023cecf71801c5e0f9d049d0c550ab42412ad12a67d89f3a0000000000feffffff0780841e0000000000160014fd9658fbd476d318f3b825b152b152aafa49bc9240420f000000000016001483440596268132e6c99d44dae2d151dabd9a2b232c180a2901000000160014d295f76da2319791f36df5759e45b15d5e105221c0c62d000000000016001454d14ae910793e930d8e33d3de0b0cbf05aa533300093d00000000001600141b42e1fc7b1cd93a469fa67ed5eabf36ce354dd620a107000000000016001406afd46bcdfd22ef94ac122aa11f2[4124](https://github.com/vincenzopalazzo/lampo.rs/actions/runs/6672698800/job/18137115547?pr=131#step:3:4125)4a37ecc808d5b000000000022002000b068df6e0e0542e776cea5ebe8f5f1a9b40b531ddd8e94b1a7ff9829b5bbaa024730440220367b9bfed0565bad2137124f736373626fa3135e59b20a7b5c1d8f2b8f1b26bb02202f664de39787082a376d222487f02ef19e45696c041044a6d579eecabb68e94501210356609a904a7026c7391d3fbf71ad92a00e04b4cd2fb6a8d1e69cbc0998f6690a65000000',)
DEBUG    root:bitcoind.py:43 Result for sendrawtransaction call: 363f75c27a18d5f9c7a5644aa2f6c7792ea98d3a28f5186d88c3b7af384a142f
DEBUG    root:bitcoind.py:39 Calling getnewaddress with arguments ()
DEBUG    root:bitcoind.py:43 Result for getnewaddress call: bcrt1q6774zx8c47ex7ueddskn39ayv8as2krs43alnz
DEBUG    root:bitcoind.py:39 Calling generatetoaddress with arguments (1, 'bcrt1q6774zx8c47ex7ueddskn39ayv8as2krs43alnz')
DEBUG    root:bitcoind.py:43 Result for generatetoaddress call: ['26cd8ab29cca45507cf7d3f018dd3b2be64c9e11d94966c5c45aa0921b50fbb1']
DEBUG    root:bitcoind.py:39 Calling getblockcount with arguments ()
DEBUG    root:bitcoind.py:43 Result for getblockcount call: 102
DEBUG    root:structure.py:49 receiving event {"event": "Connect", "file": "ln_spec_utils.py", "pos": "66"}
INFO     root:event.py:59 # running {'event': 'Connect', 'file': 'ln_spec_utils.py', 'pos': '66'}:
Fatal Python error: Aborted

Current thread 0x00007f910127d740 (most recent call first):
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/cryptography/hazmat/primitives/kdf/hkdf.py", line 36 in _extract
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/cryptography/hazmat/primitives/kdf/hkdf.py", line 42 in derive
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/pyln/proto/wire.py", line 36 in hkdf
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/pyln/proto/wire.py", line 122 in handshake_act_one_initiator
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/pyln/proto/wire.py", line 282 in shake
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/pyln/proto/wire.py", line 352 in connect
  File "/workdir/tests/lnprototest/lampo_lnprototest/runner.py", line 39 in __init__
  File "/workdir/tests/lnprototest/lampo_lnprototest/runner.py", line 111 in connect
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/lnprototest/event.py", line 135 in action
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/lnprototest/structure.py", line 55 in action
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/lnprototest/runner.py", line 100 in run
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/lnprototest/utils/utils.py", line 95 in run_runner
  File "/workdir/tests/lnprototest/tests/test_bolt2-01-open_channel.py", line 174 in test_open_channel_from_accepter_side
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/_pytest/python.py", line 192 in pytest_pyfunc_call
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/pluggy/_callers.py", line 39 in _multicall
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/pluggy/_manager.py", line 80 in _hookexec
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/pluggy/_hooks.py", line 265 in __call__
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/_pytest/python.py", line 1718 in runtest
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/_pytest/runner.py", line 168 in pytest_runtest_call
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/pluggy/_callers.py", line 39 in _multicall
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/pluggy/_manager.py", line 80 in _hookexec
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/pluggy/_hooks.py", line 265 in __call__
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/_pytest/runner.py", line 261 in <lambda>
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/_pytest/runner.py", line 340 in from_call
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/_pytest/runner.py", line 260 in call_runtest_hook
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/_pytest/runner.py", line 221 in call_and_report
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/_pytest/runner.py", line 132 in runtestprotocol
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/_pytest/runner.py", line 113 in pytest_runtest_protocol
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/pluggy/_callers.py", line 39 in _multicall
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/pluggy/_manager.py", line 80 in _hookexec
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/pluggy/_hooks.py", line 265 in __call__
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/_pytest/main.py", line 347 in pytest_runtestloop
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/pluggy/_callers.py", line 39 in _multicall
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/pluggy/_manager.py", line 80 in _hookexec
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/pluggy/_hooks.py", line 265 in __call__
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/_pytest/main.py", line 322 in _main
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/_pytest/main.py", line 268 in wrap_session
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/_pytest/main.py", line 315 in pytest_cmdline_main
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/pluggy/_callers.py", line 39 in _multicall
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/pluggy/_manager.py", line 80 in _hookexec
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/pluggy/_hooks.py", line 265 in __call__
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/_pytest/config/__init__.py", line 165 in main
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/lib/python3.8/site-packages/_pytest/config/__init__.py", line 188 in console_main
  File "/root/.cache/pypoetry/virtualenvs/lampo-lnprototest-k07BGr3V-py3.8/bin/pytest", line 8 in <module>
Aborted (core dumped)
vincenzopalazzo commented 11 months ago

Ok there is a double free

========================= 6 passed in 64.10s (0:01:04) =========================
double free or corruption (!prev)
Aborted (core dumped)
make: *** [Makefile:11: check] Error 134

Also if lnprototest succeded!

vincenzopalazzo commented 6 months ago

Moving this to the next release in june