Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-4449

syntax error in function stored in system.db.js terminates mongod (v8)

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: JavaScript
    • Labels:
      None
    • ALL

      stored function as: 'print("yo"); return "yo";'
      Upon calling db.eval("myprint()") the db terminates:

      yo
      <unknown>:46: Uncaught SyntaxError: Illegal return statement
      Wed Dec 7 09:35:25 Invalid access at address: 0

      Wed Dec 7 09:35:25 Got signal: 11 (Segmentation fault).

      Wed Dec 7 09:35:25 Backtrace:
      0x953633 0x9491c0 0x9494f3 0x7f4af2481c60 0x9b603b 0xab4c89 0x9b638a 0x96abda 0x6bb7c0 0x69966c 0x6b9acd 0x7c2827 0x7c5d11 0x8869ce 0x888f00 0x889453 0x8666fa 0x868e5a 0x7dadab 0x954572
      ./mongod(_ZN5mongo15printStackTraceERSo+0x23) [0x953633]
      ./mongod(_ZN5mongo10abruptQuitEi+0x380) [0x9491c0]
      ./mongod(_ZN5mongo24abruptQuitWithAddrSignalEiP7siginfoPv+0x1f3) [0x9494f3]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0xfc60) [0x7f4af2481c60]
      ./mongod() [0x9b603b]
      ./mongod() [0xab4c89]
      ./mongod() [0x9b638a]
      ./mongod() [0x96abda]
      ./mongod(_ZN5mongo7V8Scope10setElementEPKcRKNS_11BSONElementE+0xa0) [0x6bb7c0]
      ./mongod(_ZN5mongo5Scope10loadStoredEb+0x49c) [0x69966c]
      ./mongod(_ZN5mongo7V8Scope12localConnectEPKc+0x28d) [0x6b9acd]
      ./mongod(_ZN5mongo6dbEvalERKSsRNS_7BSONObjERNS_14BSONObjBuilderERSs+0xe7) [0x7c2827]
      ./mongod(_ZN5mongo7CmdEval3runERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb+0x4a1) [0x7c5d11]
      ./mongod(_ZN5mongo12_execCommandEPNS_7CommandERKSsRNS_7BSONObjEiRNS_14BSONObjBuilderEb+0x3e) [0x8869ce]
      ./mongod(_ZN5mongo11execCommandEPNS_7CommandERNS_6ClientEiPKcRNS_7BSONObjERNS_14BSONObjBuilderEb+0x620) [0x888f00]
      ./mongod(_ZN5mongo12_runCommandsEPKcRNS_7BSONObjERNS_11_BufBuilderINS_16TrivialAllocatorEEERNS_14BSONObjBuilderEbi+0x263) [0x889453]
      ./mongod(_ZN5mongo11runCommandsEPKcRNS_7BSONObjERNS_5CurOpERNS_11_BufBuilderINS_16TrivialAllocatorEEERNS_14BSONObjBuilderEbi+0x3a) [0x8666fa]
      ./mongod(ZN5mongo8runQueryERNS_7MessageERNS_12QueryMessageERNS_5CurOpES1+0x120a) [0x868e5a]
      ./mongod(_ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE+0xc7b) [0x7dadab]
      ./mongod(_ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE+0x92) [0x954572]

            Assignee:
            Unassigned Unassigned
            Reporter:
            antoine Antoine Girbal
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: