extension icon indicating copy to clipboard operation
extension copied to clipboard

Sentry : too much recursion

Open JalilArfaoui opened this issue 4 years ago • 12 comments

One of our most recurring Sentry crash

Seems to occur only on Firefox on MacOS, since version 3.25.0 up to 3.60.1

Occurred 37 000 times, last time 11 minutes ago

https://sentry.io/organizations/lmem/issues/1804230636/

JalilArfaoui avatar Jan 27 '21 18:01 JalilArfaoui

Do we know when (where) this bug might occur?

felix-lambert avatar Mar 16 '21 09:03 felix-lambert

@felix-lambert Sentry is supposed to give you some context (at least code context), if it doesn't there might be config issue. But if I remember correctly, might be linked to the src/app/content/externalClickHandler.ts

If you're asking on which pages, I have no clues.

lutangar avatar Mar 16 '21 11:03 lutangar

Did anyone encounter this bug for real?

felix-lambert avatar Mar 16 '21 15:03 felix-lambert

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Too_much_recursion https://sentry.io/organizations/lmem/issues/1804230636/events/?project=1404847 https://stackoverflow.com/questions/6879238/a-too-much-recursion-error-in-firefox-only-sometimes

felix-lambert avatar Mar 16 '21 15:03 felix-lambert

Can someone tell me where we are using a recursion function?

felix-lambert avatar Mar 16 '21 15:03 felix-lambert

One thing you may have overlooked is version number: 3.25.0 You might want to check which commit is that and see what was added back then... yeah that's almost archaeology.

lutangar avatar Mar 16 '21 16:03 lutangar

Maybe here? https://github.com/dis-moi/extension/compare/v3.24.0...v3.25.0

felix-lambert avatar Mar 16 '21 18:03 felix-lambert

Sorry giving up this issue. Might take too much time for me to understand and reproduce the bug. I can see generators in the code... I think it might be for someone knowing well the codebase of the extension @lutangar maybe?

felix-lambert avatar Mar 17 '21 10:03 felix-lambert

I think gave up a while back already... Nonetheless, the possible outcome I see right is to ignore this error from Sentry. Could you make of this before moving on to smthing else?

lutangar avatar Mar 17 '21 11:03 lutangar

Ok but I think it could be fun to solve this issue together. It could trigger a problem in the code. We might need multiple brains for this. I let @christpet handle the priority of this issue. The best way would be to find the situation where this bug was encountered for real

felix-lambert avatar Mar 17 '21 12:03 felix-lambert

Good call to abandon @lutangar and @felix-lambert. Too much effort, too little impact. Let's come back to it later and use Felix's process. Thanks for looking into it!

christpet avatar Mar 17 '21 18:03 christpet

The recursion happens here:

webpack-internal:///./node_modules/@sentry/utils/esm/object.js in dropUndefinedKeys at line 334:31

It's probably iterating over an object tree that has a reference cycle in it.

In my case, I don't think I have any objects in my application that references eachother in cycles, and I'm also not sure exactly which object it's trying to process, but at least this is a place where I get multiple errors:

  • InternalError: too much recursion
  • Range Error: Maximum call stack size exceeded

I'm also currently using Firefox, but the error also happens on Safari

    "@sentry/tracing": "^6.16.1",
    "@sentry/vue": "^6.16.1",

boukeversteegh avatar Jan 20 '22 13:01 boukeversteegh