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

Shell segfaults when doing db.foo.find() from quickstart

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.0.2
    • Component/s: Shell, Stability
    • Labels:
    • Environment:
      Fedora 16 3.2.2-1.fc16.x86_64 #1 SMP Thu Jan 26 03:21:58 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
    • Linux

      I've just tried the Quickstart from http://www.mongodb.org/display/DOCS/Quickstart+Unix and the shell crashes with a segfault:

      [haro@foundation node]$ mongo
      MongoDB shell version: 2.0.2
      connecting to: test
      > db.foo.save(

      { a : 1 }

      )
      > db.foo.find()
      Thu Feb 2 22:55:57 mongo got signal 11 (Segmentation fault), stack trace:

      Thu Feb 2 22:55:57 0x46a9ef 0x462744 0x7f2312f14300 0x4c7590 0x7f23143ab23f 0x7f23143ae55b 0x7f23143af12c 0x7f2314396360 0x7f23143a5ae5 0x7f23143a7772 0x7f231431fcb5 0x7f231431fdb2 0x7f231431fe52 0x4d0549 0x467641 0x45ebae 0x7f2312eff69d 0x461699
      mongo(_ZN5mongo15printStackTraceERSo+0x1f) [0x46a9ef]
      mongo(_Z12quitAbruptlyi+0x334) [0x462744]
      /lib64/libc.so.6(+0x36300) [0x7f2312f14300]
      mongo(_ZN5mongo14bson_enumerateEP9JSContextP8JSObject11JSIterateOpPmPl+0x130) [0x4c7590]
      /usr/lib64/libmozjs185.so.1.0(+0xd923f) [0x7f23143ab23f]
      /usr/lib64/libmozjs185.so.1.0(+0xdc55b) [0x7f23143ae55b]
      /usr/lib64/libmozjs185.so.1.0(_Z18js_ValueToIteratorP9JSContextjPN2js5ValueE+0x5c) [0x7f23143af12c]
      /usr/lib64/libmozjs185.so.1.0(+0xc4360) [0x7f2314396360]
      /usr/lib64/libmozjs185.so.1.0(+0xd3ae5) [0x7f23143a5ae5]
      /usr/lib64/libmozjs185.so.1.0(+0xd5772) [0x7f23143a7772]
      /usr/lib64/libmozjs185.so.1.0(JS_EvaluateUCScriptForPrincipals+0xc5) [0x7f231431fcb5]
      /usr/lib64/libmozjs185.so.1.0(JS_EvaluateScriptForPrincipals+0x72) [0x7f231431fdb2]
      /usr/lib64/libmozjs185.so.1.0(JS_EvaluateScript+0x22) [0x7f231431fe52]
      mongo(_ZN5mongo7SMScope4execERKNS_10StringDataERKSsbbbi+0xf9) [0x4d0549]
      mongo(_Z5_mainiPPc+0x2001) [0x467641]
      mongo(main+0x1e) [0x45ebae]
      /lib64/libc.so.6(__libc_start_main+0xed) [0x7f2312eff69d]
      mongo() [0x461699]

      The server doesn't notice this:

      [root@foundation node-v0.6.9]# mongod
      mongod --help for help and startup options
      Thu Feb 2 22:44:48 [initandlisten] MongoDB starting : pid=10273 port=27017 dbpath=/data/db/ 64-bit host=foundation.localdomain
      Thu Feb 2 22:44:48 [initandlisten] db version v2.0.2, pdfile version 4.5
      Thu Feb 2 22:44:48 [initandlisten] git version: nogitversion
      Thu Feb 2 22:44:48 [initandlisten] build info: Linux x86-02.phx2.fedoraproject.org 2.6.32-220.el6.x86_64 #1 SMP Wed Nov 9 08:03:13 EST 2011 x86_64 BOOST_LIB_VERSION=1_47
      Thu Feb 2 22:44:48 [initandlisten] options: {}
      Thu Feb 2 22:44:48 [initandlisten] journal dir=/data/db/journal
      Thu Feb 2 22:44:48 [initandlisten] recover : no journal files present, no recovery needed
      Thu Feb 2 22:44:48 [websvr] admin web console waiting for connections on port 28017
      Thu Feb 2 22:44:48 [initandlisten] waiting for connections on port 27017
      Thu Feb 2 22:44:55 [initandlisten] connection accepted from 127.0.0.1:37853 #1
      Thu Feb 2 22:44:57 [conn1] end connection 127.0.0.1:37853
      Thu Feb 2 22:44:59 [initandlisten] connection accepted from 127.0.0.1:37854 #2
      Thu Feb 2 22:45:20 [conn2] end connection 127.0.0.1:37854
      Thu Feb 2 22:45:48 [clientcursormon] mem (MB) res:34 virt:905 mapped:80
      Thu Feb 2 22:50:48 [clientcursormon] mem (MB) res:34 virt:905 mapped:80
      Thu Feb 2 22:55:48 [clientcursormon] mem (MB) res:34 virt:905 mapped:80
      Thu Feb 2 22:55:48 [initandlisten] connection accepted from 127.0.0.1:37942 #3
      Thu Feb 2 22:55:57 [conn3] end connection 127.0.0.1:37942
      Thu Feb 2 22:56:48 [clientcursormon] mem (MB) res:34 virt:1065 mapped:160

            Assignee:
            miketheman Michael A. Fiedler
            Reporter:
            barigorokarl Hans-Rolf Harting
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: