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

db.eval fails mongodb process if called with object parameter

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.0.7
    • Component/s: Shell
    • None
    • ALL

      Hello!
      An inexplicable error.

      When I do in console on Gentoo (Linux 4.2.3-gentoo x86_64) it is ok

      > db.eval(function (p) {return p;}, 1)
      WARNING: db.eval is deprecated
      1
      

      But when I'm trying to pass object as parameter, it crash mongodb process totally! Wo I need to restart it after it!

      > db.eval(function (p) {return p;}, {one: 1})
      WARNING: db.eval is deprecated
      2015-10-21T03:45:38.515+0000 I NETWORK  DBClientCursor::init call() failed
      2015-10-21T03:45:38.515+0000 E QUERY    Error: error doing query: failed
          at DBQuery._exec (src/mongo/shell/query.js:83:36)
          at DBQuery.hasNext (src/mongo/shell/query.js:240:10)
          at DBCollection.findOne (src/mongo/shell/collection.js:187:19)
          at DB.runCommand (src/mongo/shell/db.js:58:41)
          at DB.eval (src/mongo/shell/db.js:461:20)
          at (shell):1:4 at src/mongo/shell/query.js:83
      

      But on MacOS X El Capitan (Darwin 15.0.0 x86_64) it's ok in both cases.

      So I am in in bad situation: on developer's machine all works fine, but in production mongodb crashes every time application calling eval through driver (NodeJS 4.1.1, mongoose 4.1.11)

            Assignee:
            stephen.steneker@mongodb.com Stennie Steneker (Inactive)
            Reporter:
            klimashkin Paul Klimashkin
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: