Similar to #89 but seems different enough to be its own issue
Versions
Manyverse desktop on master branch today (2022-10-24), maybe reproducible on 0.2210.3
OS: Linux
Node runtime: 12.19.0
ssb-db2: 6.2.5
jitdb: 7.0.5
async-append-only-log: 4.3.7
random-access-file: 2.2.1
Reproduction
Block someone and wait for Manyverse to use ssb-friends-purge to call db2 deleteFeed() (and in turn,) AAOL del().
Stack trace
RangeError [ERR_OUT_OF_RANGE]: The value of "position" is out of range. It must be an integer. Received NaN
at Object.read (node:fs:653:3)
at RandomAccessFile._read (/home/staltz/oss/manyverse/desktop/index.js:20533:6)
at Request._run (/home/staltz/oss/manyverse/desktop/index.js:114867:40)
at RandomAccessFile.RandomAccess.run (/home/staltz/oss/manyverse/desktop/index.js:114775:12)
at RandomAccessFile.RandomAccess.read (/home/staltz/oss/manyverse/desktop/index.js:114720:8)
at getBlock (/home/staltz/oss/manyverse/desktop/index.js:93605:11)
at del (/home/staltz/oss/manyverse/desktop/index.js:93665:7)
at Object.waitForLogLoaded [as del] (/home/staltz/oss/manyverse/desktop/index.js:93984:12)
at Timeout._onTimeout (/home/staltz/oss/manyverse/desktop/index.js:5522:38)
at listOnTimeout (node:internal/timers:557:17)
Stack trace expanded
(not an actual git diff, I'm just using diff syntax to show the line that throws)
1 random-access-file
RandomAccessFile.prototype._read = function (req) {
var self = this
var data = req.data || this._alloc(req.size)
var fd = this.fd
if (!req.size) return process.nextTick(readEmpty, req)
- fs.read(fd, data, 0, req.size, req.offset, onread)
function onread (err, read) {
if (err) return req.callback(err)
if (!read) return req.callback(createReadError(self.filename, req.offset, req.size))
req.size -= read
req.offset += read
if (!req.size) return req.callback(null, data)
fs.read(fd, data, data.length - req.size, req.size, req.offset, onread)
}
}
2 random-access-storage
Request.prototype._run = function () {
var ra = this.storage
ra._pending++
this._sync = true
switch (this.type) {
case READ_OP:
- if (this._openAndNotClosed()) ra._read(this)
break
3 random-access-storage
RandomAccess.prototype.run = function (req) {
if (this._needsOpen) this.open(noop)
if (this._queued.length) this._queued.push(req)
- else req._run()
}
Similar to #89 but seems different enough to be its own issue
Versions
master
branch today (2022-10-24), maybe reproducible on 0.2210.3Reproduction
Block someone and wait for Manyverse to use ssb-friends-purge to call db2
deleteFeed()
(and in turn,) AAOLdel()
.Stack trace
Stack trace expanded
(not an actual git diff, I'm just using diff syntax to show the line that throws)
1 random-access-file
2 random-access-storage
3 random-access-storage
4 random-access-storage
5 async-append-only-log
6 async-append-only-log