You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was using Patchbay this morning and noticed that Electron and my browser froze at the same time while using [email protected]. I think I tried to close Electron after a few seconds, but it may have crashed, and I found these logs:
> [email protected] start /home/christianbundy/src/ssbc/patchbay
> electron index.js -- --title patchbaySTARTING electronSTARTING SBOTLOADING configListening on undefined:8008 (multiserver net plugin)listening on socket unix:/home/christianbundy/.ssb/socketssb-friends: stream legacy api usedTrace: deprecated api used: ssb-ref.parseAddress at Object.parseAddress (/home/christianbundy/src/ssbc/patchbay/node_modules/ssb-ref/index.js:96:15) at Socket.<anonymous> (/home/christianbundy/src/ssbc/patchbay/node_modules/scuttlebot/plugins/local.js:55:22) at Socket.emit (events.js:182:13) at Socket.<anonymous> (/home/christianbundy/src/ssbc/patchbay/node_modules/broadcast-stream/index.js:51:12) at Socket.emit (events.js:182:13) at UDP.onMessage [as onmessage] (dgram.js:673:8){ [Error: ENOENT: no such file or directory, rename '/home/christianbundy/.ssb/gossip.json~' -> '/home/christianbundy/.ssb/gossip.json'] errno: -2, code: 'ENOENT', syscall: 'rename', path: '/home/christianbundy/.ssb/gossip.json~', dest: '/home/christianbundy/.ssb/gossip.json' }{ [Error: ENOENT: no such file or directory, rename '/home/christianbundy/.ssb/gossip.json~' -> '/home/christianbundy/.ssb/gossip.json'] errno: -2, code: 'ENOENT', syscall: 'rename', path: '/home/christianbundy/.ssb/gossip.json~', dest: '/home/christianbundy/.ssb/gossip.json' }{ [Error: ENOENT: no such file or directory, rename '/home/christianbundy/.ssb/gossip.json~' -> '/home/christianbundy/.ssb/gossip.json'] errno: -2, code: 'ENOENT', syscall: 'rename', path: '/home/christianbundy/.ssb/gossip.json~', dest: '/home/christianbundy/.ssb/gossip.json' }{ [Error: ENOENT: no such file or directory, rename '/home/christianbundy/.ssb/gossip.json~' -> '/home/christianbundy/.ssb/gossip.json'] errno: -2, code: 'ENOENT', syscall: 'rename', path: '/home/christianbundy/.ssb/gossip.json~', dest: '/home/christianbundy/.ssb/gossip.json' }
I checked my gossip.json file and I think there may have been some changes made: a few of them near the top of the file have the { duration, stateChange, client, ping, failure } keys, but most of them now look like this:
When writing a file, if the file is more than blocks it's possible that there is a failure causing the file to not be completely written. If you wrote straight to the target file, this would mean your original file is now invalid. If you write to a temp file, you can check it's all fully there and correct, then renaming it over the original file is a single operation that cannot fail part way through (it can only fully fail or fully succeed).
Oh, that makes perfect sense, thanks! I guess this was probably coming from atomic-file, which explains why I couldn't find any relevant code doing file renames in the SSBC org. Thanks again, I was convinced I'd never find an answer for this.
I was using Patchbay this morning and noticed that Electron and my browser froze at the same time while using [email protected]. I think I tried to close Electron after a few seconds, but it may have crashed, and I found these logs:
I checked my
gossip.json
file and I think there may have been some changes made: a few of them near the top of the file have the{ duration, stateChange, client, ping, failure }
keys, but most of them now look like this:After a quick
git grep '~'
I can't seem to figure out why a rename was happening, any chance someone else knows?The text was updated successfully, but these errors were encountered: