Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-709

Calling EJSON.stringify on a cursor results in stack overflow

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Critical - P2 Critical - P2
    • 0.13.2
    • Affects Version/s: 0.12.0
    • Component/s: Bson
    • Labels:
    • Not Needed
    • Iteration Chicago

      Enterprise replset [direct: primary]> EJSON.stringify(db.test.find())
      internal/async_hooks.js:189
      function emitInitNative(asyncId, type, triggerAsyncId, resource) {
                             ^
      
      RangeError: Maximum call stack size exceeded
      (Use `-- --trace-uncaught ...` to show where the exception was thrown)
      

      The async_hooks involvement may or may not be a red herring, it is used by the REPL under the hood for async tracking, but I suspect that the error itself would also reproduce in a non-REPL environment.

            Assignee:
            anna.henningsen@mongodb.com Anna Henningsen
            Reporter:
            anna.henningsen@mongodb.com Anna Henningsen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: