Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stack overflow in redis-oplog handling #124

Closed
jdgjsag67251 opened this issue Jun 20, 2024 · 1 comment
Closed

Stack overflow in redis-oplog handling #124

jdgjsag67251 opened this issue Jun 20, 2024 · 1 comment

Comments

@jdgjsag67251
Copy link

Hi, we recently updated to v2.49.2 It works great, but we do get multiple messages in Sentry about a call stack overflow in Monti in combination with redis-oplog: packages/montiapm:agent/lib/hijack/redis_oplog.js in MongoIDMap.store.constructor.compareWith at line 26:32.

Stacktrace
RangeError: Maximum call stack size exceeded
    at MongoIDMap.store.constructor.compareWith (packages/montiapm:agent/lib/hijack/redis_oplog.js:23:50)
    at MongoIDMap.store.constructor.compareWith (packages/montiapm:agent/lib/hijack/redis_oplog.js:26:32)
    at MongoIDMap.store.constructor.compareWith (packages/montiapm:agent/lib/hijack/redis_oplog.js:26:32)
    at MongoIDMap.store.constructor.compareWith (packages/montiapm:agent/lib/hijack/redis_oplog.js:26:32)
    at MongoIDMap.store.constructor.compareWith (packages/montiapm:agent/lib/hijack/redis_oplog.js:26:32)
    at MongoIDMap.store.constructor.compareWith (packages/montiapm:agent/lib/hijack/redis_oplog.js:26:32)
    at MongoIDMap.store.constructor.compareWith (packages/montiapm:agent/lib/hijack/redis_oplog.js:26:32)
    at MongoIDMap.store.constructor.compareWith (packages/montiapm:agent/lib/hijack/redis_oplog.js:26:32)
    at MongoIDMap.store.constructor.compareWith (packages/montiapm:agent/lib/hijack/redis_oplog.js:26:32)
    at MongoIDMap.store.constructor.compareWith (packages/montiapm:agent/lib/hijack/redis_oplog.js:26:32)
    at MongoIDMap.store.constructor.compareWith (packages/montiapm:agent/lib/hijack/redis_oplog.js:26:32)
    at MongoIDMap.store.constructor.compareWith (packages/montiapm:agent/lib/hijack/redis_oplog.js:26:32)
    at MongoIDMap.store.constructor.compareWith (packages/montiapm:agent/lib/hijack/redis_oplog.js:26:32)
    at MongoIDMap.store.constructor.compareWith (packages/montiapm:agent/lib/hijack/redis_oplog.js:26:32)
    at MongoIDMap.store.constructor.compareWith (packages/montiapm:agent/lib/hijack/redis_oplog.js:26:32)
    at MongoIDMap.store.constructor.compareWith (packages/montiapm:agent/lib/hijack/redis_oplog.js:26:32)

From the code I deduce that rewriteReloadRequeryFuncs is maybe called on a store multiple times causing it to overwrite the compareWith method multiple times?

Or maybe it's our combination of redis-oplog and changestream-to-redis?

@zodern
Copy link
Member

zodern commented Jun 20, 2024

Thanks for reporting this. I found a number of issues with the compareWith instrumentation. It's fixed in v2.49.3.

@zodern zodern closed this as completed Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants