v8 running out of memory when compiling large script

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: 2.3.2
    • Component/s: JavaScript
    • None
    • Fully Compatible
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      I have a 27MB file that basically has variations on this:

      t = db.bulk_test
      t.drop()
      t.ensureIndex({geo:'2dsphere'})
      node12989667 = {type: 'Point', coordinates: [-73.8998916, 40.9339637]}
      t.insert({geo : node12989667})
      // repeat above 2 statements until 27MB is hit, with different names/values etc.:
      

      If I run this normally, I get this:

      hk@bellona:~$ ./clean/mongo out.js 
      Fri Dec 14 11:42:18.202 In File::open(), ::open for '/etc/lsb-release' failed with errno:1 Operation not permitted
      MongoDB shell version: 2.3.2-pre-
      connecting to: test
      
      #
      # Fatal error in CALL_AND_RETRY_2
      # Allocation failed - process out of memory
      #
      
      Trace/breakpoint trap (core dumped)
      

      If I compile with --usesm, it works/doesn't crash.

        1. out.js
          26.68 MB

            Assignee:
            DO NOT USE - Backlog - Platform Team
            Reporter:
            hari.khalsa@10gen.com
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: