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

mongo dies with Segmentation fault in Solaris 11.3 / Illumos February 2016

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.3.10
    • Affects Version/s: 3.1.6, 3.2.0
    • Component/s: JavaScript
    • Fully Compatible
    • ALL
    • v3.2
    • Hide

      Download any source after 3.1.6.
      Build the binaries with
      scons core CCFLAGS=-m64 LINKFLAGS=-m64 -j 16 --prefix=$PREFIX --js-engine=none
      Start mongo in Debugger with

      1. gdb build/opt/mongo/mongo
        > run
        CRASH
        > where
      Show
      Download any source after 3.1.6. Build the binaries with scons core CCFLAGS=-m64 LINKFLAGS=-m64 -j 16 --prefix=$PREFIX --js-engine=none Start mongo in Debugger with gdb build/opt/mongo/mongo > run CRASH > where
    • Platforms 13 (04/22/16), Platforms 14 (05/13/16), Platforms 15 (06/03/16), Platforms 16 (06/24/16), Platforms 17 (07/15/16)

      I downloaded the Solaris binaries for 3.3.2 and used them in Solaris 11.3 and OpenIndiana (Illumos kernel from February 2016).

      Mongodb starts and works without problems. Also mongostat.

      The shell mongo dies with segmentation fault.
      The last working version of mongo is 3.1.6.

      To debug I downloaded the source for 3.2.3 and compiled it with the following statement:
      scons core CCFLAGS=-m64 LINKFLAGS=-m64 -j 16 --prefix=$PREFIX --js-engine=none

      The debugger shows where mongo dies.
      Apparently the js engine mozjs-38.
      Firefox 43 is available in Illumos and so it is possible to compile the javascript engine in a better fashion.

      GNU gdb (GDB) 7.6.2
      Copyright (C) 2013 Free Software Foundation, Inc.
      License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
      This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
      and "show warranty" for details.
      This GDB was configured as "i386-pc-solaris2.11".
      For bug reporting instructions, please see:
      <http://www.gnu.org/software/gdb/bugs/>...
      Reading symbols from /export/builds/mongodb-src-r3.2.3/build/opt/mongo/mongo...done.
      (gdb) run
      Starting program: /export/builds/mongodb-src-r3.2.3/build/opt/mongo/mongo
      [Thread debugging using libthread_db enabled]
      MongoDB shell version: 3.2.3
      [New Thread 1 (LWP 1)]
      [New LWP    2        ]
      [New LWP    3        ]
      [New Thread 3 (LWP 3)]
      
      Program received signal SIGSEGV, Segmentation fault.
      [Switching to Thread 3 (LWP 3)]
      0x0000000000c8b75a in js::NativeObject::setSlot(unsigned int, JS::Value const&) ()
      (gdb) where
      #0  0x0000000000c8b75a in js::NativeObject::setSlot(unsigned int, JS::Value const&) ()
      #1  0x000000000105d77e in setSlotWithType (overwriting=false, value=..., shape=0xfffffd7ffda21100, cx=0x157c370, this=0xfffffd7ffda22060)
          at src/third_party/mozjs-38/extract/js/src/vm/NativeObject-inl.h:314
      #2  UpdateShapeTypeAndValue (cx=cx@entry=0x157c370, obj=0xfffffd7ffda22060, shape=0xfffffd7ffda21100, value=...)
          at src/third_party/mozjs-38/extract/js/src/vm/NativeObject.cpp:1113
      #3  0x000000000107ea3a in DefinePropertyOrElement (cx=cx@entry=0x157c370, obj=obj@entry=..., id=..., id@entry=..., getter=0x0, setter=0x0, attrs=<optimized out>,
          value=..., callSetterAfterwards=false, setterIsStrict=false) at src/third_party/mozjs-38/extract/js/src/vm/NativeObject.cpp:1200
      #4  0x000000000107f344 in js::NativeDefineProperty (cx=0x157c370, obj=..., id=..., value=..., getter=0x0, setter=0x0, attrs=<optimized out>)
          at src/third_party/mozjs-38/extract/js/src/vm/NativeObject.cpp:1487
      #5  0x0000000000f9b503 in js::DefineProperty (cx=<optimized out>, obj=..., id=..., value=..., getter=<optimized out>, setter=<optimized out>, attrs=6)
          at src/third_party/mozjs-38/extract/js/src/jsobj.cpp:3212
      #6  0x0000000000f48db2 in DefinePropertyById (cx=cx@entry=0x157c370, obj=obj@entry=..., id=id@entry=..., value=..., value@entry=..., get=..., set=..., attrs=6,
          flags=0) at src/third_party/mozjs-38/extract/js/src/jsapi.cpp:2155
      #7  0x0000000000f49d5f in DefineProperty (cx=cx@entry=0x157c370, obj=..., name=name@entry=0x1291e41 "std_iterator", value=..., getter=..., setter=..., attrs=6,
          flags=0) at src/third_party/mozjs-38/extract/js/src/jsapi.cpp:2298
      #8  0x0000000000f49ee3 in JS_DefineProperty (cx=cx@entry=0x157c370, obj=..., obj@entry=..., name=name@entry=0x1291e41 "std_iterator", value=..., value@entry=...,
          attrs=attrs@entry=6, getter=getter@entry=0x0, setter=0x0) at src/third_party/mozjs-38/extract/js/src/jsapi.cpp:2346
      #9  0x000000000105d4a6 in js::GlobalObject::initSelfHostingBuiltins (cx=cx@entry=0x157c370, global=global@entry=...,
          builtins=builtins@entry=0x137b780 <intrinsic_functions>) at src/third_party/mozjs-38/extract/js/src/vm/GlobalObject.cpp:381
      #10 0x0000000000d6be90 in JSRuntime::createSelfHostingGlobal (cx=cx@entry=0x157c370) at src/third_party/mozjs-38/extract/js/src/vm/SelfHosting.cpp:1041
      #11 0x0000000000d6bfec in JSRuntime::initSelfHosting (this=this@entry=0x1583420, cx=cx@entry=0x157c370)
          at src/third_party/mozjs-38/extract/js/src/vm/SelfHosting.cpp:1065
      #12 0x0000000000f61843 in js::NewContext (rt=0x1583420, stackChunkSize=stackChunkSize@entry=8192) at src/third_party/mozjs-38/extract/js/src/jscntxt.cpp:126
      #13 0x0000000000f61895 in JS_NewContext (rt=<optimized out>, stackChunkSize=stackChunkSize@entry=8192) at src/third_party/mozjs-38/extract/js/src/jsapi.cpp:569
      #14 0x0000000000a8e23d in mongo::mozjs::MozJSImplScope::MozRuntime::MozRuntime (this=0x1580af8, engine=<optimized out>)
          at src/mongo/scripting/mozjs/implscope.cpp:268
      #15 0x0000000000a8e4ed in mongo::mozjs::MozJSImplScope::MozJSImplScope (this=0x1580a70, engine=0x14ec8a0) at src/mongo/scripting/mozjs/implscope.cpp:325
      #16 0x0000000000ab2fa1 in mongo::mozjs::MozJSProxyScope::implThread (arg=0x14e0670) at src/mongo/scripting/mozjs/proxyscope.cpp:330
      #17 0x0000000000a73346 in nspr::Thread::ThreadRoutine (arg=0x14d9c50) at src/mongo/scripting/mozjs/PosixNSPR.cpp:56
      #18 0xfffffd7fe909a201 in std::(anonymous namespace)::execute_native_thread_routine (__p=<optimized out>)
          at /jenkins/jobs/oi-userland/workspace/components/gcc49/gcc-4.9.3/libstdc++-v3/src/c++11/thread.cc:84
      #19 0xfffffd7ff83a6f5a in _thrp_setup () from /lib/64/libc.so.1
      #20 0xfffffd7ff83a7270 in ?? () from /lib/64/libc.so.1
      #21 0x0000000000000000 in ?? ()
      

            Votes:
            0 Vote for this issue
            Watchers:
            16 Start watching this issue

              Created:
              Updated:
              Resolved: