App Unresponsive with "RangeError: Maximum call stack size exceeded"
With no modification to my settings or folders whatsoever, it suddenly became impossible today to open Patchwork. The UI begins to load by the indexing never ends. When I open from command line, I see my config options loaded (with a null private key, I am not sure if this is the error or not) and then:
[26887:0805/181006.463040:ERROR:buffer_manager.cc(488)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : glBufferData: <- error from previous GL command
git-ssb is not installed, or not available in path
[26887:0805/181007.709306:ERROR:buffer_manager.cc(488)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : glBufferData: <- error from previous GL command
ssb-friends: stream legacy api used
After this, there are 186 lines that look like "Error {}" and then this:
RangeError: Maximum call stack size exceeded
at Function.[Symbol.hasInstance] (<anonymous>)
at Object.exports.isBuffer (/tmp/.mount_PatchwmNeSyF/resources/electron.asar/common/buffer-utils.js:39:47)
at valueToMeta (/tmp/.mount_PatchwmNeSyF/resources/electron.asar/renderer/api/remote.js:40:30)
at Array.map (<anonymous>)
at wrapArgs (/tmp/.mount_PatchwmNeSyF/resources/electron.asar/renderer/api/remote.js:103:17)
at remoteMemberFunction (/tmp/.mount_PatchwmNeSyF/resources/electron.asar/renderer/api/remote.js:124:99)
at console.error (file:///tmp/.mount_PatchwmNeSyF/resources/app.asar/assets/base.html:20:9)
at /tmp/.mount_PatchwmNeSyF/resources/app.asar/node_modules/flumedb/index.js:138:29
at /tmp/.mount_PatchwmNeSyF/resources/app.asar/node_modules/pull-write/index.js:40:31
at /tmp/.mount_PatchwmNeSyF/resources/app.asar/node_modules/pull-write/index.js:41:13
After which follow 194 lines of "Error {}" and then:
RangeError: Maximum call stack size exceeded
at /tmp/.mount_PatchwmNeSyF/resources/app.asar/node_modules/flumelog-offset/frame/recoverable.js:48:11
at Object.read (/tmp/.mount_PatchwmNeSyF/resources/app.asar/node_modules/aligned-block-file/blocks.js:49:14)
at next (/tmp/.mount_PatchwmNeSyF/resources/app.asar/node_modules/flumelog-offset/frame/recoverable.js:47:16)
at /tmp/.mount_PatchwmNeSyF/resources/app.asar/node_modules/flumelog-offset/frame/recoverable.js:43:11
at /tmp/.mount_PatchwmNeSyF/resources/app.asar/node_modules/aligned-block-file/blocks.js:96:11
at get (/tmp/.mount_PatchwmNeSyF/resources/app.asar/node_modules/aligned-block-file/blocks.js:29:7)
at Object.readUInt32BE (/tmp/.mount_PatchwmNeSyF/resources/app.asar/node_modules/aligned-block-file/blocks.js:93:9)
at /tmp/.mount_PatchwmNeSyF/resources/app.asar/node_modules/flumelog-offset/frame/recoverable.js:41:16
at /tmp/.mount_PatchwmNeSyF/resources/app.asar/node_modules/aligned-block-file/blocks.js:96:11
at get (/tmp/.mount_PatchwmNeSyF/resources/app.asar/node_modules/aligned-block-file/blocks.js:29:7)
Then, we see (you guessed it) 196 lines of "Error {}" again, then
RangeError: Maximum call stack size exceeded
at module.exports (/tmp/.mount_PatchwmNeSyF/resources/app.asar/node_modules/looper/index.js:1:1)
at /tmp/.mount_PatchwmNeSyF/resources/app.asar/node_modules/pull-cursor/skip.js:10:18
at /tmp/.mount_PatchwmNeSyF/resources/app.asar/node_modules/pull-looper/index.js:6:5
at /tmp/.mount_PatchwmNeSyF/resources/app.asar/node_modules/looper/index.js:11:9
at /tmp/.mount_PatchwmNeSyF/resources/app.asar/node_modules/pull-looper/index.js:11:5
at next (/tmp/.mount_PatchwmNeSyF/resources/app.asar/node_modules/pull-stream/throughs/filter.js:14:9)
at next (/tmp/.mount_PatchwmNeSyF/resources/app.asar/node_modules/pull-stream/throughs/async-map.js:27:9)
at /tmp/.mount_PatchwmNeSyF/resources/app.asar/node_modules/pull-looper/index.js:6:5
at /tmp/.mount_PatchwmNeSyF/resources/app.asar/node_modules/looper/index.js:11:9
at /tmp/.mount_PatchwmNeSyF/resources/app.asar/node_modules/pull-looper/index.js:11:5
and then we see 196 errors and then the previous block repeats again, perhaps indefinitely. My fan spins up as fast as it can and CPU usage skyrockets, but no loading is completed. I literally did not move anything in my .ssb folder at all, the only thing I did earlier was open Patchbay a single time on accident, but I did not interact with it at all. Is this possibly related to the "delete posts by blocked users" setting? I have a user that was unblocked a few days ago, could this be the cause? How do I repair this?
I am putting this bug here in hopes that others who run into the same problem will see this and read this to fix it as well, I suspect I could just nuke the folder and rebuild to get an instant fix, but I want to try to solve this.
Thank you in advance
Actually, I kept it running for a million years before submitting this, and I have additional info now. I eventually bottom out at what appears to be 100% completion on "Indexing database", but this appears in the terminal:
/tmp/.mount_PatchwttAmBz/resources/app.asar/node_modules/aligned-block-file/blocks.js:49
return cb(new Error('past end:'+start+'-'+end+' < '+file.offset.value), null, 0)
^
RangeError: Maximum call stack size exceeded
at Object.read (/tmp/.mount_PatchwttAmBz/resources/app.asar/node_modules/aligned-block-file/blocks.js:49:17)
at next (/tmp/.mount_PatchwttAmBz/resources/app.asar/node_modules/flumelog-offset/frame/recoverable.js:47:16)
at /tmp/.mount_PatchwttAmBz/resources/app.asar/node_modules/flumelog-offset/frame/recoverable.js:43:11
at /tmp/.mount_PatchwttAmBz/resources/app.asar/node_modules/aligned-block-file/blocks.js:96:11
at get (/tmp/.mount_PatchwttAmBz/resources/app.asar/node_modules/aligned-block-file/blocks.js:29:7)
at Object.readUInt32BE (/tmp/.mount_PatchwttAmBz/resources/app.asar/node_modules/aligned-block-file/blocks.js:93:9)
at /tmp/.mount_PatchwttAmBz/resources/app.asar/node_modules/flumelog-offset/frame/recoverable.js:41:16
at /tmp/.mount_PatchwttAmBz/resources/app.asar/node_modules/aligned-block-file/blocks.js:96:11
at get (/tmp/.mount_PatchwttAmBz/resources/app.asar/node_modules/aligned-block-file/blocks.js:29:7)
at Object.readUInt32BE (/tmp/.mount_PatchwttAmBz/resources/app.asar/node_modules/aligned-block-file/blocks.js:93:9)
TypeError: _read is not a function
at read (/tmp/.mount_PatchwttAmBz/resources/app.asar/node_modules/pull-defer/source.js:14:10)
at /tmp/.mount_PatchwttAmBz/resources/app.asar/node_modules/pull-abortable/index.js:34:7
at next (/tmp/.mount_PatchwttAmBz/resources/app.asar/node_modules/pull-stream/sinks/drain.js:16:11)
at sink (/tmp/.mount_PatchwttAmBz/resources/app.asar/node_modules/pull-stream/sinks/drain.js:37:9)
at pull (/tmp/.mount_PatchwttAmBz/resources/app.asar/node_modules/pull-stream/pull.js:41:14)
at Object.listen (/tmp/.mount_PatchwttAmBz/resources/app.asar/lib/mutant-pull-value.js:44:3)
at Object.addListener (/tmp/.mount_PatchwttAmBz/resources/app.asar/node_modules/mutant/lib/lazy-watcher.js:85:16)
at Object.MutantPullValue (/tmp/.mount_PatchwttAmBz/resources/app.asar/lib/mutant-pull-value.js:33:22)
at ProtoComputed.listen (/tmp/.mount_PatchwttAmBz/resources/app.asar/node_modules/mutant/computed.js:82:49)
at ProtoComputed.getValue (/tmp/.mount_PatchwttAmBz/resources/app.asar/node_modules/mutant/computed.js:196:12)
I almost managed to solve it with the ssb-first-aid repo's "Delete Indexes" and using Patchbay's "Initial Sync" feature, but, at the last MB to index, I got the errors in the above comment again. Now, I am at 385/770 MB with Error {} lines appearing about once a second.
Just to clarify: you have the "delete posts from blocked feeds" feature switched on in patchwork? And you recently unblocked a feed that had previously been blocked?
I'm not aware what patchbay's "initial sync" feature does. But in my mind yes, the combination of deleted messages and launching patchbay might cause confusion. If patchbay is not aware of the deleted data that is. I'm not sure if that's the case...
Yes, you are understanding correctly. I tried loading in Patchwork, but it appeared Patchwork was just as confused, so I attempted to clear the indices and have Patchbay do its "initial sync" since I found some previous bug reports saying that this may help. Patchbay is able to get mostly through rebuilding, Patchwork has issues almost immediately with whatever post this is.
But yes, I believe the issue lies in something Patchwork did when I unblocked the user that was never repaired, leading to a larger issue when I clumsily opened Patchbay. I am mostly curious right now how to repair the feed, but I also would be willing to wait a bit before taking any especially drastic measures in case those more experienced with this codebase could get useful information out of my case.
Hullo, I do not want to be pushy, but I am planning to fix my feed soon, so if anyone knows what data I should save for analysis, please tell me or I will probably destroy it.
In case it does get fixed before error-data is exfiltrated, my current output on running is a bunch of Error {} followed by
/tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/flumelog-offset/inject.js:42
frame.getMeta(offset, function (err, value, prev, next) {
^
RangeError: Maximum call stack size exceeded
at /tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/flumelog-offset/inject.js:42:36
at /tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/flumelog-offset/frame/recoverable.js:48:11
at Object.read (/tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/aligned-block-file/blocks.js:49:14)
at next (/tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/flumelog-offset/frame/recoverable.js:47:16)
at /tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/flumelog-offset/frame/recoverable.js:43:11
at /tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/aligned-block-file/blocks.js:96:11
at get (/tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/aligned-block-file/blocks.js:29:7)
at Object.readUInt32BE (/tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/aligned-block-file/blocks.js:93:9)
at /tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/flumelog-offset/frame/recoverable.js:41:16
at /tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/aligned-block-file/blocks.js:96:11
TypeError: _read is not a function
at read (/tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/pull-defer/source.js:14:10)
at /tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/pull-abortable/index.js:34:7
at next (/tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/pull-stream/sinks/drain.js:16:11)
at sink (/tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/pull-stream/sinks/drain.js:37:9)
at pull (/tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/pull-stream/pull.js:41:14)
at Object.listen (/tmp/.mount_PatchwYowxg0/resources/app.asar/lib/mutant-pull-value.js:44:3)
at Object.addListener (/tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/mutant/lib/lazy-watcher.js:85:16)
at Object.MutantPullValue (/tmp/.mount_PatchwYowxg0/resources/app.asar/lib/mutant-pull-value.js:33:22)
at ProtoComputed.listen (/tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/mutant/computed.js:82:49)
at ProtoComputed.getValue (/tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/mutant/computed.js:196:12)
which appears to be different from before.
Fix is here: https://github.com/flumedb/aligned-block-file/pull/11
On Sat, 08 Aug 2020 14:51:53 -0700 Alex Vermillion [email protected] wrote:
In case it does get fixed before error-data is exfiltrated, my current output on running is a bunch of
Error {}followed by ``` /tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/flumelog-offset/inject.js:42 frame.getMeta(offset, function (err, value, prev, next) { ^RangeError: Maximum call stack size exceeded at /tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/flumelog-offset/inject.js:42:36 at /tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/flumelog-offset/frame/recoverable.js:48:11 at Object.read (/tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/aligned-block-file/blocks.js:49:14) at next (/tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/flumelog-offset/frame/recoverable.js:47:16) at /tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/flumelog-offset/frame/recoverable.js:43:11 at /tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/aligned-block-file/blocks.js:96:11 at get (/tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/aligned-block-file/blocks.js:29:7) at Object.readUInt32BE (/tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/aligned-block-file/blocks.js:93:9) at /tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/flumelog-offset/frame/recoverable.js:41:16 at /tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/aligned-block-file/blocks.js:96:11 TypeError: _read is not a function at read (/tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/pull-defer/source.js:14:10) at /tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/pull-abortable/index.js:34:7 at next (/tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/pull-stream/sinks/drain.js:16:11) at sink (/tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/pull-stream/sinks/drain.js:37:9) at pull (/tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/pull-stream/pull.js:41:14) at Object.listen (/tmp/.mount_PatchwYowxg0/resources/app.asar/lib/mutant-pull-value.js:44:3) at Object.addListener (/tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/mutant/lib/lazy-watcher.js:85:16) at Object.MutantPullValue (/tmp/.mount_PatchwYowxg0/resources/app.asar/lib/mutant-pull-value.js:33:22) at ProtoComputed.listen (/tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/mutant/computed.js:82:49) at ProtoComputed.getValue (/tmp/.mount_PatchwYowxg0/resources/app.asar/node_modules/mutant/computed.js:196:12)
@clehner, many thanks, does that mean I am clear to wipe the bugged stuff at my own risk?
On Sat, 08 Aug 2020 15:03:38 -0700 Alex Vermillion [email protected] wrote:
@clehner, many thanks, does that mean I am clear to wipe the bugged stuff at my own risk?
Yes
Hello, I swear this is my last question.
@christianbundy , at least up until the point I have replicated, we are friends. Can you please confirm what my last message is so I can be certain I do not fork?
I am @ujT9G7p4h1zeFiq7qX79eAQDyL2pTo0rLgIA7iA4VIY=.ed25519 (Alex Vermillion)
For bug archeologists a long time from now when I don't remember this:
After resyncing from a blank slate as much as I can, the message that appears has morphed from Error {} to could not retrive msg: Error { notFound: true, status: 404 }, which is much more helpful.
@AVerm Last I've seen is
%NwuPKx7d9gWFgwKuqz25XjorFwHno3RfaRlbKlUjDGM=.sha256, sequence number 1407.
The issue is now double-closed, thank you Christian (who has confirmed I am not forked on the network as well) and Cel too.