ssbc / patchwork

A decentralized messaging and sharing app built on top of Secure Scuttlebutt (SSB).
https://www.scuttlebutt.nz
GNU Affero General Public License v3.0
3.58k stars 333 forks source link

over Quota and freezing issue #224

Closed wanderer closed 8 years ago

wanderer commented 8 years ago

When I start patchwork I get.

Log history read...
Indexes generated
Over Quota: @MCKev/sFgaFwgQHIdXMIZvwCu+pnNA485Nisgr2lUpk=.ed25519 { limit: 5242880, usage: 11398708, hops: 3, percent: '217.4%' }

Which is followed by electron using 100% cpu and pathwork freezing.

pfrazee commented 8 years ago

Hmm. https://github.com/ssbc/scuttlebot/issues/270. cc @dominictarr

Does it stay frozen?

wanderer commented 8 years ago

yep!

pfrazee commented 8 years ago

:/ ok, temporary fix: open ~/.ssb/rc and input:

{
  "party": true
}

or, possibly:

{
  "blobs": { "party": true }
}

I'm not sure, the code seems like it might be incorrectly reading config. That'll disable quotas.

wanderer commented 8 years ago

~/.ssb/rc didn't work for me. I ended up just edited the source. I noticed that filter is getting called at a high rate countinous when patchwork freezes.

wanderer commented 8 years ago

so its working fine now. I reverted all my changes the problem did not come back. I'm not sure what fixed it.

wanderer commented 8 years ago

I'm going to close this for now because I can't reproduce the error.

pfrazee commented 8 years ago

Im going to reopen, because this is still an issue. The error stopped because the quota limit was no longer getting triggered (due to the short period you disabled it). The bug is still there!

dominictarr commented 8 years ago

okay it looks like there needs to be test coverage for overquotaness.

bhaugen commented 8 years ago

I'm getting a series of

Over Quota: @vt8uK0++cpFioCCBeB3p3jdx4RIdQYJOL/imN1Hv0Wk=.ed25519 { limit: 20971520, usage: 23042021, hops: 2, percent: '109.9%' }

which precedes an eventual

info @iL6 SBOT  disconnect 

Sometimes I'll get

info @iL6 SBOT  disconnect 
info @iL6 REPL  success
  {
    "@iL6NzQoOLFP18pCpprkbY80DMtiG4JFFtVSVUaoGsOQ=.ed25519": 16,
  [...]
  }

but this morning, every try has ended up in a disconnect with a frozen patchwork window.

Other possible clues: when first loading:

(electron) ipc module is deprecated. Use require("electron").ipcMain instead.
Cannot find module 'chloridedown/build/Release/sodium'
(electron) loadUrl is deprecated. Use loadURL instead.

Result: can't stay connected or do anything, through about 5 tries. I'm running on Ubuntu 12.04, if that makes any diff.

pfrazee commented 8 years ago

@bhaugen a few suggestions. Try running the application with the --party switch, which ought to stop the quota stuff entirely. If you still see over-quota messages, let me know.

Also, try running npm install again for patchwork, since it's not finding chloridedown's module

bhaugen commented 8 years ago

Tried the --party switch (as in patchwork --party?) Still got over quota messages.

I'll try running npm install again in the morning, got guests and pizza in the oven... Do it like npm install ssb-patchwork -g again?

pfrazee commented 8 years ago

Hmm, yeah try installing (like that) again. What version are you running?

You ran the party switch correctly. That quota-limiting is just broken. I'm going to push a patch disabling it, tonight, so when you run install again you should have it disabled.

pfrazee commented 8 years ago

Oh real quick, try --blobs.party and see if that disables it

bhaugen commented 8 years ago

Tried. DId not disable, but I got up and running with patchwork and have not frozen yet. Still get a lot of disconnect/start combos.

Some variations on

info @iL6 SBOT 74.207.246.247:8008@omgyp7Pnrw+Qm0I6T6Fh5VvnKmodMXwnxTIesW2DgMg=.ed25519 connection failed
  Error: connect ECONNREFUSED 74.207.246.247:8008
      at Object.exports._errnoException (util.js:856:11)
      at exports._exceptionWithHostPort (util.js:879:20)
      at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1063:14)
or 
info @iL6 SBOT acab.mobi:5228@Ia0xWQGJSTjRfYjHDDAFizXR9e8l5RQctTqYcbtR+Es=.ed25519 connection failed
  Error: getaddrinfo ENOTFOUND acab.mobi acab.mobi:5228
      at errnoException (dns.js:26:10)
      at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:77:26)

P.S. I do seem to be operational though. Haven't died for awhile. Will do the reinstall in the am. Gotta go, but thanks a lot @pfraze

Oh, and while I did get some over quota message the first time I tried --blobs.party the second time I did it, I did not get any of them. Although I did get more connected failed and disconnect/start combos.

bhaugen commented 8 years ago

Re-installed doing

npm install ssb-patchwork -g 

This is still happening:

patchwork --blobs.party
(electron) ipc module is deprecated. Use require("electron").ipcMain instead.
Cannot find module 'chloridedown/build/Release/sodium'
(electron) loadUrl is deprecated. Use loadURL instead.

And still getting a lot of connection fails and disconnect/start combos in the log.

But I seem to stay up again.

pfrazee commented 8 years ago

The disconnect/connect messages are correct behavior. The gossip protocol connects to different known machines in the mesh with a weighted random selection. As long as you're not getting "over quota" messages, and patchwork isnt freezing, you should be good. (I think that means the --blobs.party switch worked.)

As for the reinstall, the (electron) messages are ok, those are just deprecation notices that wont go into effect until the major release of electron. The troubling one is Cannot find module. What platform are you using?

bhaugen commented 8 years ago

Ubuntu 12.04. Think that is part of the problem?

pfrazee commented 8 years ago

It might be. I'll mention it to @dominictarr, we're still sorting out the cryptobuilds on each platform. (I think your build will fallback to a js implementation, which works but is slower.)

bhaugen commented 8 years ago

What OS's/versions work best?

(But if it's only a little slower, I can live with that for now.)

pfrazee commented 8 years ago

I know OSX yosemite works, because I use that. I thought linux was good to go, so your error surprises me. We'll get it sorted soon!

bhaugen commented 8 years ago

You might be good the newer version of Ubuntu. I'm a version behind the latest LTS.

pfrazee commented 8 years ago

This may have been solved by https://github.com/ssbc/scuttlebot/pull/289

bhaugen commented 8 years ago

I haven't had this problem since the last -1 time I re-installed. So I think you can close the issue.

pfrazee commented 8 years ago

Gonna hang onto it just in case, but thats good to know

dominictarr commented 8 years ago

Oh, if you are using ubuntu you might need to update gcc. node bindings need some of the latest c++ features.

@bhaugen Can you try building http://github.com/dominictarr/chloridedown

https://github.com/dominictarr/chloridedown.git
cd chloridedown
npm install

and let me know (post an issue on chloridedown) what happens.