ssbc / ssb-gossip

Schedule connections randomly with a peerlist constructed from config, multicast UDP announcements, feed announcements, and API-calls
MIT License
10 stars 3 forks source link

Cannot read property 'name' of null #9

Open qypea opened 5 years ago

qypea commented 5 years ago

Overnight a few times this week my ssb instance has crashed. I managed to catch the stack trace this time and it appears to be a null value being de-referenced in ssb-gossip.

scuttle-shell: 1.0.1 ssb-gossip: 1.0.5 ssb-server: 14.1.6

/home/q/.npm/lib/node_modules/scuttle-shell/node_modules/ssb-gossip/index.js:344
            if(err.name === 'TypeError') peer.ping.fail = true
                   ^

TypeError: Cannot read property 'name' of null
    at /home/q/.npm/lib/node_modules/scuttle-shell/node_modules/ssb-gossip/index.js:344:20
    at /home/q/.npm/lib/node_modules/scuttle-shell/node_modules/ssb-server/node_modules/muxrpc/pull-weird.js:18:14
    at /home/q/.npm/lib/node_modules/scuttle-shell/node_modules/ssb-server/node_modules/muxrpc/pull-weird.js:10:5
    at PacketStreamSubstream.weird.read (/home/q/.npm/lib/node_modules/scuttle-shell/node_modules/ssb-server/node_modules/muxrpc/pull-weird.js:37:15)
    at PacketStream._onstream (/home/q/.npm/lib/node_modules/scuttle-shell/node_modules/ssb-server/node_modules/packet-stream/index.js:200:12)
    at PacketStream.write (/home/q/.npm/lib/node_modules/scuttle-shell/node_modules/ssb-server/node_modules/packet-stream/index.js:135:41)
    at /home/q/.npm/lib/node_modules/scuttle-shell/node_modules/ssb-server/node_modules/muxrpc/pull-weird.js:56:15
    at /home/q/.npm/lib/node_modules/scuttle-shell/node_modules/ssb-server/node_modules/pull-stream/sinks/drain.js:24:37
    at /home/q/.npm/lib/node_modules/scuttle-shell/node_modules/ssb-server/node_modules/pull-goodbye/node_modules/pull-stream/throughs/filter.js:17:11
    at Object.cb (/home/q/.npm/lib/node_modules/scuttle-shell/node_modules/ssb-server/node_modules/packet-stream-codec/index.js:111:11
thurloat commented 5 years ago

I'm running into the same thing on my ssb-pub server, exact same call trace as well.

thurloat commented 5 years ago

FYI I was able to get my pub back up and running by taking an axe to my gossip.json.

based on where in the code it was failing, i removed all the client: true records that had ANY failures recorded, and it booted up the next time around.

cryptix commented 5 years ago

should be handled better as of e596abb69e4adfc528929b300d789d7203dc7cc8 or v1.0.9