ExportXMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • DB Integration & Observability
    • ALL
    • Hide

       

      bazel run --spider_monkey_dbg=True //src/mongo/scripting:scripting_legacy_mozjs_test
      

       

      Show
        bazel run --spider_monkey_dbg=True //src/mongo/scripting:scripting_legacy_mozjs_test  
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Running this test with --spider_monkey_dbg=True first creates a bunch of compilation errors due to missing includes:

       

      src/third_party/mozjs/mongo_sources/jscustomallocator_oom.h:66:8: error: unknown type name 'JS_PUBLIC_API'
         66 | extern JS_PUBLIC_API uint32_t GetThreadType(void);
            |        ^
      src/third_party/mozjs/mongo_sources/jscustomallocator_oom.h:66:30: error: expected ';' after top level declarator
         66 | extern JS_PUBLIC_API uint32_t GetThreadType(void);
            |                              ^
      src/third_party/mozjs/mongo_sources/jscustomallocator_oom.h:110:3: error: unknown type name 'uint32_t'
        110 |   uint32_t targetThread_ = 0;
            |   ^
      src/third_party/mozjs/mongo_sources/jscustomallocator_oom.h:123:3: error: unknown type name 'uint32_t'
        123 |   uint32_t targetThread() const { return targetThread_; }
            |   ^
      src/third_party/mozjs/mongo_sources/jscustomallocator_oom.h:152:57: error: unknown type name 'uint32_t'
        152 |   void simulateFailureAfter(Kind kind, uint64_t checks, uint32_t thread,
            |                                                         ^
      ...

      After fixing this the test then hits multiple assertion failures because it follows a pattern which is officially not supported by SpiderMonkey, shutting down and the re-initializing multiple ScriptEngines within the same process. This leads errors with the engine state and potentially memory corruption issues.

       

      These issues are not related to the current ESR 153 upgrade. The test fails the same way on ESR 140 and on older versions of mongo.

       

            Assignee:
            Neil Veira
            Reporter:
            Neil Veira
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: