mutiny-web icon indicating copy to clipboard operation
mutiny-web copied to clipboard

Very high memory usage & lost balance in fedimint

Open Yonle opened this issue 1 year ago • 37 comments

Lost lot of sats and Mutiny just kept crashes in my phone during transaction due to out of memory, leading to numbers of sats being lost.

When opened in desktop, The balance only recovers at the small amount, but then also reveals that the memory usage is very big. Chromium tab on mutiny with developer tools showing console logs This is from 799 sats to this amount.

Yonle avatar Apr 27 '24 11:04 Yonle

It just looks like it can't connect to the internet? Check your connections.

AnthonyRonning avatar Apr 27 '24 12:04 AnthonyRonning

It just looks like it can't connect to the internet? Check your connections.

Connection is fine. Disconnection is mostly caused due to laggy machine when the browser starts taking my SWAP.

Yonle avatar Apr 27 '24 12:04 Yonle

This also reproduceable in Firefox with no connection error

Yonle avatar Apr 27 '24 12:04 Yonle

Upload logs.

AnthonyRonning avatar Apr 27 '24 12:04 AnthonyRonning

See whenever it's possible. Quite complicated to navigate or even getting the log at this point.

Anyway, I could not send sats via the web too. It immediately consume lot of RAM usages and the invoice became pending. Federation is "freedom one".

Yonle avatar Apr 27 '24 13:04 Yonle

[Download Logs] Barely works at this point while the memory usage is slowly increasing to 1.9 GB again

Yonle avatar Apr 27 '24 13:04 Yonle

Sorry. I could not get the log for now. The button just does nothing at this point.

Yonle avatar Apr 27 '24 13:04 Yonle

@futurepaul what's the URL for the emergency page that doesn't load the node and other things?

AnthonyRonning avatar Apr 27 '24 13:04 AnthonyRonning

Could only get this for now. Will look forward for more logs again mutiny-logs.txt

Yonle avatar Apr 27 '24 14:04 Yonle

mutiny-logs (20).txt

Yonle avatar Apr 27 '24 14:04 Yonle

I guess me losing my balance and the payment freezes because mutiny still tries to send sats with insufficient amount of sats for the fee. Still that should never happen but it ended up happening and ended up badly

Yonle avatar Apr 27 '24 14:04 Yonle

Checking the pending invoice gives 0 information about fees. it only slows 0

Yonle avatar Apr 27 '24 14:04 Yonle

refetching activity
index-DY19UVd9.js:123 ERROR mutiny-core/src/logging.rs:1372f33 2024-04-27 14:34:33.586 ERROR [mutiny_core::networking::socket:69] got an error reading event: Peer Sent Invalid Data
t.wbg.__wbg_error_8cf137381b3af25f @ index-DY19UVd9.js:123
6index-DY19UVd9.js:123 refetching activity
index-DY19UVd9.js:123 ERROR mutiny-core/src/logging.rs:1372f33 2024-04-27 14:35:18.069 ERROR [mutiny_core::networking::socket:69] got an error reading event: Peer Sent Invalid Data
t.wbg.__wbg_error_8cf137381b3af25f @ index-DY19UVd9.js:123
index-DY19UVd9.js:123 ERROR mutiny-core/src/logging.rs:1372f33 2024-04-27 14:35:34.597 ERROR [mutiny_core::networking::socket:69] got an error reading event: Peer Sent Invalid Data
t.wbg.__wbg_error_8cf137381b3af25f @ index-DY19UVd9.js:123
index-DY19UVd9.js:123 ERROR mutiny-core/src/logging.rs:1372f33 2024-04-27 14:35:34.606 ERROR [mutiny_core::networking::socket:69] got an error reading event: Peer Sent Invalid Data
t.wbg.__wbg_error_8cf137381b3af25f @ index-DY19UVd9.js:123

In console log

Yonle avatar Apr 27 '24 14:04 Yonle

mutiny-logs (41).txt

Yonle avatar Apr 27 '24 14:04 Yonle

@futurepaul what's the URL for the emergency page that doesn't load the node and other things?

app.mutinywallet.com/settings/emergencykit

futurepaul avatar Apr 27 '24 15:04 futurepaul

[at this point, my mutiny wallet is practically unusable in my phone]

Yonle avatar Apr 27 '24 15:04 Yonle

This issue is either caused by misbehaving fedimint federation or something messed up in mutiny-node.

So usually, When payment is failed, Mutiny then will restore the balance to your wallet. But if you keep doing it over and over again, which then randomly crashes at the pending stage, Mutiny will not restore your balance for some weird reasons.

That part is where weird things happen. As you try to zap without preserving atleast 1% of your balance (even with fedimint), Sometime fee checking just fails and gives 0 to mutiny. When that happens, You could basically try to send the entire balance of your wallet. But that will make another big disaster, which is what happend to me.

Once the second bug happens, The Fedimint federation that you joined will basically says "no" to every single [send] requests that you want to, and the balance will somewhat recover, except it wasn't and will consume A LOT of memory without reasons, which then leading to crash due to out of memory.

If you try to open again, Your balance will looks like it was cutted. Your previous sats invoice that pending or failed will never restored to your balance again. If only you try to send sats again, The memory usage will go spike up to 110% and then crashes your app or browser, again.

Trying to open again will make it refresh the balance. But still you will not be able to do anything with it as every single payment attempts that you try will simply gives pending result while the memory usage goes spiking up.

If that happens, congratulations. The only way out is to get out from the federation and use on-chain or other federation.

Yonle avatar Apr 27 '24 15:04 Yonle

Try the new version released yesterday and upload logs again if that doesn't work. It's possible it's just due to a stuck payment and it'll resolve itself when it times out.

AnthonyRonning avatar Apr 28 '24 14:04 AnthonyRonning

Try the new version released yesterday and upload logs again if that doesn't work. It's possible it's just due to a stuck payment and it'll resolve itself when it times out.

Noticed same slowdown at startup as previous version did. Setup Loading took more than 5 minutes to finish still. Will report further

Yonle avatar Apr 28 '24 14:04 Yonle

Some pending invoices are succesfully sent.

Yonle avatar Apr 28 '24 14:04 Yonle

Memory usage still goes high to 1 GB at some point (especially sending invoice) which is unusual. Will check on mutiny-logs tomorrow as i am away from laptop

Yonle avatar Apr 28 '24 14:04 Yonle

On Android app, 0.6.8, app got killed due to OOM during Loading: Setup. Unable to get logs from it.

Yonle avatar Apr 28 '24 14:04 Yonle

Note

Memory usage and startup duration dropped when defederated. Trying to join to the same federation again will lead to the same problem with the memory usage and startup duration

Yonle avatar Apr 28 '24 15:04 Yonle

Memory usage is in 900 MB after startup image Then drops to 600 MB after this image

Several seconds later, Goes up to 1 GB and freezes my laptop. Unable to get log as the Mutiny button freezes.

Yonle avatar Apr 29 '24 10:04 Yonle

Pressing [Download Logs] instantly spikes the memory usage to 3.2 GB.

Update: Jumps to 4.5 GB for no reason

Yonle avatar Apr 29 '24 11:04 Yonle

mutiny-logs (45).txt

Yonle avatar Apr 29 '24 11:04 Yonle

Chrome freezes. No result even after waiting for minutes for chrome to resolve. Screenshot from 2024-04-29 19-03-46

Force stopping the chrome: image

Yonle avatar Apr 29 '24 12:04 Yonle

We'll take a look at the logs this week to see if we can find anything. Thank you for providing that.

AnthonyRonning avatar Apr 29 '24 15:04 AnthonyRonning

Every now and then I see connection issues when it starts up. I also see some times where the nodes and everything shuts down. Are you manually stopping the node by chance?

It also seems like it occasionally works? I still see some times where invoices are created or attempted to be paid. I'm unsure if you're seeing issues every single time you start up, or if it's occasionally working, because the logs indicate that it occasionally works.

AnthonyRonning avatar Apr 29 '24 15:04 AnthonyRonning

Could you describe your network setup? Are you using tor, what are you internet speeds, location, etc? All of this seems connectivity related. If it can't save to remote storage, or connect to the federations, all of this will cause issues.

AnthonyRonning avatar Apr 29 '24 16:04 AnthonyRonning