git ssb


5+

Matt McKegg / patchwork



I'm getting a lot of these on the console whilst running patchwork-next:

%tntTQvMV9u+Ihd2X+ZjrwTNniScekKN7F745/YMxwoA=.sha256
Openktorn opened this issue on 11/15/2016, 2:43:17 AM

I'm getting a lot of these on the console whilst running patchwork-next:

Error: unexpected end of parent stream
    at PacketStream.destroy (/dev/patchwork-next/node_modules/packet-stream/index.js:68:7)
    at Object.ws.close (/dev/patchwork-next/node_modules/muxrpc/stream.js:134:23)
    at EventEmitter.emitter.close (/dev/patchwork-next/node_modules/muxrpc/index.js:69:8)
    at Object.peer.disconnect (/dev/patchwork-next/lib/persistent-gossip/index.js:193:13)
    at Object.<anonymous> (/dev/patchwork-next/lib/persistent-gossip/index.js:115:19)
    at apply (/dev/patchwork-next/node_modules/muxrpc-validation/index.js:171:15)
    at Object.disconnect (/dev/patchwork-next/node_modules/muxrpc-validation/index.js:82:14)
    at /dev/patchwork-next/lib/persistent-gossip/schedule.js:123:18
    at Array.forEach (native)
    at connect (/dev/patchwork-next/lib/persistent-gossip/schedule.js:122:10)
Error: unexpected end of parent stream
    at PacketStream.destroy (/dev/patchwork-next/node_modules/packet-stream/index.js:68:7)
    at Object.ws.close (/dev/patchwork-next/node_modules/muxrpc/stream.js:134:23)
    at EventEmitter.emitter.close (/dev/patchwork-next/node_modules/muxrpc/index.js:69:8)
    at /dev/patchwork-next/lib/persistent-gossip/index.js:171:20
    at Array.forEach (native)
    at EventEmitter.reconnect (/dev/patchwork-next/lib/persistent-gossip/index.js:170:30)
    at emitNone (events.js:86:13)
    at EventEmitter.emit (events.js:185:7)
    at /dev/patchwork-next/node_modules/on-wakeup/index.js:16:17
%DjYxY3VlwwE+nVSwQnHGDQnhxlBAWnacQDX3Gnpjv30=.sha256 arj · 11/17/2016, 12:38:08 PM

Same problem in original patchwork that also uses persistent-gossip.

%9PJjm6WBc9EZwqdeVnn41bb0T02u8Nz0AWaDOxovzAk=.sha256 cel · 11/17/2016, 3:52:01 PM

I've seen this also when running scuttlebot

%RmtjuPmpk81iLj8xN6/DZDIAW3Sd/rJDmHEpYpv9MjI=.sha256 cel · 11/17/2016, 4:58:12 PM

It looks like the gossip plugin passes true as an error when disconnecting from a peer,

    at Object.<anonymous> (/dev/patchwork-next/lib/persistent-gossip/index.js:115:19)

else peer.disconnect(true, function (err) {

and that goes all the way to packet-stream where it gets turned into Error: unexpected end of parent stream.r

In the stack traces, the first one is triggered by connect (/dev/patchwork-next/lib/persistent-gossip/schedule.js:122:10)
and the second by /dev/patchwork-next/node_modules/on-wakeup/index.js:16:17. I understand that on-wakeup is supposed to trigger disconnecting and reconnecting to peers. In my case I think I was seeing this because the sbot hanged or was running slowly enough that it missed some timeouts and caused on-wakeup to trigger. In the second stack trace it is something about a quota - looks like it is to try to keep the number of connections low.

I suggest changing the true to a null on *gossip/index.js line 115, and see if that messes anything up.

arj mentioned this issue in See %tntTQvMV9u+Ihd2X+ZjrwTNniScekKN7F745/YMxwoA=.sha256
%MHPn2Z3o6h4owMT0rJ1J/I7VQfUFFBsF0wPdQj3o/yU=.sha256 cryptop · 11/18/2016, 10:00:48 PM

guinea pi(g|ck)ing @cel's suggestion now. afaict much smoother sailing.

cel mentioned this issue in Fix spurious error on peer discconect r…

Built with git-ssb-web