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

jstests/core/and.js fails with SEGFAULT in the JS engine intermittently on OS X 10.11 when compiled with --opt=off

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.3.8
    • Component/s: JavaScript, MapReduce
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Hide

      1. git checkout r3.3.8
      2. Compile mongod using optimization off, debug on: scons --opt=off --dbg=on core.
      3. Execute and.js: /buildscripts/resmoke.py --dbpathPrefix=$(mktemp -d) jstests/core/and.js | tee and.log
      4. Repeat the prior step until a segmentation fault is observed.
      5. The stack trace can be obtained by running xcrun atos -o mongod -l <A> <ADDRS...>, where <A> is the first value of "b" in the backtrace JSON output, and <ADDRS...> is the space separated list of addresses just before ----- BEGIN BACKTRACE ----- in the log output. In the stack trace example, <A> is 100F4A000, <ADDRS...> is 0x1023c65c4 0x1023c6045....

      Show
      1. git checkout r3.3.8 2. Compile mongod using optimization off, debug on: scons --opt=off --dbg=on core . 3. Execute and.js: /buildscripts/resmoke.py --dbpathPrefix=$(mktemp -d) jstests/core/and.js | tee and.log 4. Repeat the prior step until a segmentation fault is observed. 5. The stack trace can be obtained by running xcrun atos -o mongod -l <A> <ADDRS...> , where <A> is the first value of "b" in the backtrace JSON output, and <ADDRS...> is the space separated list of addresses just before ----- BEGIN BACKTRACE ----- in the log output. In the stack trace example, <A> is 100F4A000 , <ADDRS...> is 0x1023c65c4 0x1023c6045... .
    • Platforms 2017-01-23

      This issue affects JS tests that run the javascript engine on mongod, that is, anything utilizing mapReduce or $where. It occurs in 3.3.8, but I have not tested prior releases.

      This test failure is reliably reproducible when running jstests/core/and.js. Although some runs succeed, most result in failure.

      I have been unable to reproduce the issue on any platform other than OS X 10.11, and the issue is not present when compiled with optimizations off. I've attached log output, and a symbolized stack trace. I've also attached jscore.log, which shows an example of another JS test failing in a similar fashion.

      The issue seems to stem from within the JS engine, during a garbage collection sweep.

      clang version:

      Apple LLVM version 7.3.0 (clang-703.0.31)
      Target: x86_64-apple-darwin15.5.0
      

        1. and.log
          39 kB
        2. jscore.log
          814 kB
        3. spider-monkey-dbg.log
          484 kB
        4. stacktrace.txt
          3 kB

            Assignee:
            backlog-server-platform DO NOT USE - Backlog - Platform Team
            Reporter:
            david.hatch David Hatch
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: