question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

rebalance plugin crashes

See original GitHub issue
2021-01-23T23:44:33.003Z INFO    plugin-rebalance.py: Plugin rebalance initialized with 1000msat base / 10 ppm fee, cltv_final: 18
2021-01-23T23:45:35.890Z UNUSUAL plugin-rebalance.py: Exception in thread Thread-1:
2021-01-23T23:45:35.890Z UNUSUAL plugin-rebalance.py: Traceback (most recent call last):
2021-01-23T23:45:35.891Z UNUSUAL plugin-rebalance.py:   File \"/usr/lib/python3.8/threading.py\", line 932, in _bootstrap_inner
2021-01-23T23:45:35.897Z UNUSUAL plugin-rebalance.py:     self.run()
2021-01-23T23:45:35.898Z UNUSUAL plugin-rebalance.py:   File \"/usr/lib/python3.8/threading.py\", line 870, in run
2021-01-23T23:45:35.898Z UNUSUAL plugin-rebalance.py:     self._target(*self._args, **self._kwargs)
2021-01-23T23:45:35.898Z UNUSUAL plugin-rebalance.py:   File \"/home/user/plugins/rebalance/rebalance.py\", line 433, in rebalanceall_thread
2021-01-23T23:45:35.899Z UNUSUAL plugin-rebalance.py:     plugin.ideal_ratio = get_ideal_ratio(channels, plugin.enough_liquidity)
2021-01-23T23:45:35.899Z UNUSUAL plugin-rebalance.py:   File \"/home/user/plugins/rebalance/rebalance.py\", line 304, in get_ideal_ratio
2021-01-23T23:45:35.900Z UNUSUAL plugin-rebalance.py:     if smallest_channel[\"total_msat\"] * min(ratio, 1 - ratio) > enough_liquidity:
2021-01-23T23:45:35.900Z UNUSUAL plugin-rebalance.py:   File \"/usr/local/lib/python3.8/dist-packages/pyln/client/lightning.py\", line 180, in __mul__
2021-01-23T23:45:35.901Z UNUSUAL plugin-rebalance.py:     return Millisatoshi(self.millisatoshis * other)
2021-01-23T23:45:35.901Z UNUSUAL plugin-rebalance.py:   File \"/usr/local/lib/python3.8/dist-packages/pyln/client/lightning.py\", line 72, in __init__
2021-01-23T23:45:35.901Z UNUSUAL plugin-rebalance.py:     raise TypeError(
2021-01-23T23:45:35.901Z UNUSUAL plugin-rebalance.py: TypeError: Millisatoshi must be string with msat/sat/btc suffix or int

pinging @m-schmoock

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:19 (18 by maintainers)

github_iconTop GitHub Comments

1reaction
m-schmoockcommented, Feb 3, 2021

@aido I just merged https://github.com/lightningd/plugins/pull/211 . Can you retry with this changeset. If you still have remaining issues, can you try to construct testcases that cover this? Because the our == total is now covered by test_rebalance_all and its not causing the issues you describe (which is why I did not take all of your suggestions).

1reaction
aidocommented, Feb 1, 2021

Hi @m-schmoock

There is an infinite loop that removes objects from a list until there are zero objects left resulting in a division by zero error… By changing:

https://github.com/lightningd/plugins/blob/abbdeabec6504b1f1771473296b7656f53293723/rebalance/rebalance.py#L301

to

   while len(chs) > 0:

ensures the loop stops before the list is empty.

This fixes the divide by zero error but now the following result needs investigation:

2021-02-01T23:10:55.893Z INFO    plugin-rebalance.py: Automatic rebalance is running with enough liquidity threshold: 0msat, ideal liquidity ratio: 100.00%, min rebalancable amount: 50000000msat, feeratio: 0.5
2021-02-01T23:10:56.130Z INFO    plugin-feeadjuster.py: 0 channels adjusted
2021-02-01T23:10:56.132Z INFO    plugin-rebalance.py: Feeadjust succeeded: 0 channels adjusted
2021-02-01T23:10:56.149Z INFO    plugin-rebalance.py: Automatic rebalance finished: 0 successful rebalance, 0msat fee spent, it took 0:00:00.346
Read more comments on GitHub >

github_iconTop Results From Across the Web

iZotope RX8-9 Music Rebalance Can't Batch? - Effects Forum
As soon as I start the batch my memory fills up to the max then the crash happens. It'll be nice when they...
Read more >
RTL crash when parsing JSON-RPC response #134 - GitHub
I was trying to use the Rebalance plugin but after restarting Lightningd, RTL stops working. Below there is the Systemctl status output.
Read more >
Izotope RX 9 Advanced crashing constantly : r/AudioPost
today I bought RX 9 Advanced and it is completely unusable. Making a selection and pressing delete key results in a crash.
Read more >
[MB-11572] [System test] memcached crashes during rebalance-in ...
Setup a 7 Node cluster, 2 buckets, 1 ddoc2 views 2. Load 10M and 8 M items 3. Rebalance in 1 node –...
Read more >
RX 7 and 8 crashing - iZotope Support
If you're not using any of those plug-ins and you're still seeing crashes, this likely means there's a permissions issue with the installation....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found