git ssb


14+

cel / git-ssb-web



Crash while digging repo

%rBu56IqW1RopjM7yOQUI3ckPjVC36b14ax8rLei2jVM=.sha256
Closedarj opened this issue on 6/3/2016, 6:45:51 AM

I tried digging the downmark repo and got the following error and hard crash:

/home/arj/.nvm/versions/node/v6.1.0/lib/node_modules/git-ssb-web/node_modules/pull-stream/sinks/drain.js:22 throw end ^ NotFoundError: Key not found in database at /home/arj/.nvm/versions/node/v6.1.0/lib/node_modules/ssb-patchwork/node_modules/secure-scuttlebutt/node_modules/level-sublevel/shell.js:101:18 at /home/arj/.nvm/versions/node/v6.1.0/lib/node_modules/ssb-patchwork/node_modules/secure-scuttlebutt/node_modules/level-sublevel/nut.js:120:19

After I started up again I had digged the repo. Not sure if this is a problem in patchwork or git-ssb-web or both :)

%4CsOR3QHzlM+PrG9NiFS0fy0FkDCxIv+jENCBdeMc2o=.sha256 cel · 6/3/2016, 4:27:09 PM

It is probably a problem in git-ssb-web. Unfortunately I wasn't able to reproduce it and the stack trace does not shed much light on what code path is leading to the error.

This is with git-ssb-web running standalone, not as a sbot plugin, right?

%oBcW/GeFzS3YHZxzuLLXubgRJy6UuUlSNK6fi9s07oE=.sha256 arj · 6/3/2016, 6:05:32 PM

Yes, standalone

%xaVR77DyvGshKrywJuM9R0uRpOM5+vflJVpnyckz6JI=.sha256 wanderer · 6/5/2016, 8:11:24 PM

also undig trigger this for me

%obzAT0uWyaqO/HhxzZniQVMDa1a/Z4uKIJb9xabznbk=.sha256 amnovak · 6/14/2016, 5:59:44 AM

I've replicated this as well:

/usr/local/lib/node_modules/git-ssb/node_modules/ssb-keys/node_modules/chloride/node_modules/sodium-browserify/node_modules/libsodium-wrappers/node_modules/libsodium/dist/modules/libsodium.js:14
var Module;if(!Module)Module=(typeof Module!=="undefined"?Module:null)||{};var moduleOverrides={};for(var key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var ENVIRONMENT_IS_WEB=typeof window==="object";var ENVIRONMENT_IS_WORKER=typeof importScripts==="function";var ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;var ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){if(!Module["print"])Module["print"]=function print(x){process["stdout"].write(x+"\n")};if(!Module["printErr"])Module["printErr"]=function printErr(x){process["stderr"].write(x+"\n")};var nodeFS=require("fs");var nodePath=require("path");Module["read"]=function read(filename,binary){filename=no
NotFoundError: Key not found in database
    at /Users/anovak/Documents/Workspace/patchwork/node_modules/scuttlebot/node_modules/secure-scuttlebutt/node_modules/level-sublevel/shell.js:101:18
    at /Users/anovak/Documents/Workspace/patchwork/node_modules/scuttlebot/node_modules/secure-scuttlebutt/node_modules/level-sublevel/nut.js:120:19

This is with node 4.2.6 and these git ssb modules:

git-ssb@1.2.3 /usr/local/lib/node_modules/git-ssb
├── ssb-ref@2.3.0 (ip-regex@1.0.3, is-valid-domain@0.0.2)
├── ssb-config@2.0.0 (deep-extend@0.4.1, non-private-ip@1.3.0, osenv@0.1.3, rc@1.1.6)
├── stream-to-pull-stream@1.6.9 (pull-stream@3.4.2)
├── ssb-git-repo@1.7.0 (pull-reverse@0.0.0, pull-cache@0.0.0, pull-cat@1.1.9, pull-hash@0.0.0, multicb@1.2.1, pull-pushable@2.0.0, ssb-pull-requests@0.0.4, ssb-mentions@0.1.0, pull-git-pack@0.1.2, pull-git-repo@0.4.1, pull-stream@3.4.2)
├── git-remote-ssb@1.1.6 (pull-stream@3.4.2, pull-git-remote-helper@1.3.2)
├── git-ssb-web@1.15.2 (ssb-reconnect@0.1.0, asyncmemo@0.1.0, ssb-pull-requests@0.0.4, pull-paramap@1.1.6, pull-cat@1.1.9, multicb@1.2.1, node-polyglot@1.0.0, ssb-marked@0.6.0, ssb-issues@0.1.3, mime-types@2.1.11, ssb-mentions@0.1.0, diff@2.2.3, ssb-config@1.2.1, pull-identify-filetype@1.1.0, pull-many@1.0.6, ssb-msg-schemas@6.2.1, pull-git-pack@0.2.0, pull-stream@3.4.2, pull-git-repo@0.4.1, highlight.js@9.4.0)
├── ssb-keys@5.0.2 (private-box@0.0.3, hmac@1.0.1, blake2s@1.0.1, deep-equal@0.2.2, mkdirp@0.5.1, chloride@2.1.1)
└── ssb-client@3.1.1 (explain-error@1.0.1, secret-stack@2.5.1)
%augDVdgrjltf2qMoEkbnGjPag7maxM4mlZupm+q1S50=.sha256 amnovak · 6/14/2016, 6:00:18 AM

I should mention I'm on OS X, also. And using Patchwork as my main scuttlebot.

%Dafqz4p2T7/nhKBqFtC0rN837+ctWS7rcgYG30gLivY=.sha256 ev · 7/5/2016, 9:54:52 PM

I just got the 'dig crash' too a few times. I haven't been able to figure out if this is every time I dig, or just once in awhile. On crash what you see below appeared in my Terminal.


/home/ev/git-ssb-web/node_modules/pull-stream/sinks/drain.js:22
                throw end
                ^
NotFoundError: Key not found in database
    at /home/ev/builds/patchwork/node_modules/secure-scuttlebutt/node_modules/level-sublevel/shell.js:101:18
    at /home/ev/builds/patchwork/node_modules/secure-scuttlebutt/node_modules/level-sublevel/nut.js:120:19
%9WG21NYDJQhJps4UQIWdRw0XjdeenICt1dr4bhQqXto=.sha256 cel · 7/5/2016, 11:04:01 PM

Ok, the crash was because pull.drain wasn't getting an error handler in git-ssb-web/lib/votes.js and so the error was getting thrown. I've fixed this now in git-ssb-web v1.15.3 (5ae375979276cad11fd0ddde498c9a3467fec72b). The NotFoundError itself I think may be from a race condition in secure-scuttlebutt between fetching a value in the live ssb.links query and saving the value to the database. This would also explain %nARz1o5.... I will continue investigating.

cel closed this issue · 7/5/2016, 11:04:15 PM
Catch error getting vote links
%tgPk5kApNxGzayIuBTrUnXhBX05v/eg0A7tnh6Cb+4I=.sha256 cel · 7/5/2016, 11:34:37 PM

Attempting to fix the NotFoundError, but don't have any test cases: https://github.com/ssbc/secure-scuttlebutt/pull/152

%BawAXFdk48nrWGe9uLfNJ1l3Xkx4o6ZfAVdOqok6DBU=.sha256 ev · 7/5/2016, 11:47:58 PM

Confirmed, not crashing anymore. However, yes I'm still getting NotFoundError. Let me know if there's anything I can do to help.

ev mentioned this issue · 7/5/2016, 11:55:21 PM
Catch error getting vote links
%CVBNwOPnZU7somQAB33/M07ZqeL0WFbkE6QROTj6RIk=.sha256 cel · 7/6/2016, 3:56:44 PM

NotFoundError here and in %nARz1o5... should be fixed now after updating secure-scuttlebutt to 15.2.4.

%LR6lSB6vLSJaQLh9NqawymbaWYsNUP+W8pPCT9cOJGw=.sha256 cel · 7/6/2016, 5:42:54 PM

Ok, maybe not fixed...


Built with git-ssb-web