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

Make JSThread stack traces more informative

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 3.1.8
    • 3.1.7
    • JavaScript
    • None
    • Fully Compatible
    • ALL
    • Platform 8 08/28/15

    Description

      We have some pretty poor error reporting for interrupted $where's and map reduces. We should fix the interruption bit and accumulate stack's across threads

      Something like:

      Turn:

       I QUERY    [thread4] js thread raised js exception: JSInterpreterFailure Error: error: { "$err" : "Unknown Failure from JSInterpreter", "code" : 8 } :
      _getErrorWithCode@src/mongo/shell/utils.js:23:13
      DBQuery.prototype.next@src/mongo/shell/query.js:271:1
      DBCollection.prototype.findOne@src/mongo/shell/collection.js:212:15
      ____MongoToSM_newFunction_temp@:2:13
      

      Into:

      I QUERY    [thread4] js thread raised js exception: JSInterpreterFailure Error: error: { "$err" : "Interrupted by the host", "code" : 139 } :
      _getErrorWithCode@src/mongo/shell/utils.js:23:13
      DBQuery.prototype.next@src/mongo/shell/query.js:271:1
      DBCollection.prototype.findOne@src/mongo/shell/collection.js:212:15
      ____MongoToSM_newFunction_temp@:2:13
      ScopedThread@jstests/libs/parallelTester.js:15:9
      ____MongoToSM_newFunction_temp@:4:17
      ScopedThread@jstests/libs/parallelTester.js:15:9
      ____MongoToSM_newFunction_temp@:4:13
      ScopedThread@jstests/libs/parallelTester.js:15:9
      @repro.js:3:9
      

      For: (repro.js)

      load("jstests/libs/parallelTester.js");
       
      var x = new ScopedThread(function () {
          load("jstests/libs/parallelTester.js");
       
          var y = new ScopedThread(function () {
              load("jstests/libs/parallelTester.js");
       
              var z = new ScopedThread(function () {
                  db.test.findOne({ $where : "sleep(100000);"});
              });
       
              z.start();
              z.join();
          });
       
          y.start();
          y.join();
      });
       
      x.start();
      x.join();
      

      Attachments

        Activity

          People

            mira.carey@mongodb.com Mira Carey
            mira.carey@mongodb.com Mira Carey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: