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

Illegal math operations computing in JS V8

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical - P2 Critical - P2
    • None
    • 2.1.0
    • JavaScript
    • FC15 x86-64
    • Linux

    Description

      For Intensives findAndModify operations which use a service call $inc in some cases there is a loss 0.00000000000000005, 0.00000000000000001, 0.66666666666666667 and 0.33333333333333333. This effect is mistery! No memory leak detected, memory and CPU working correctly. Test also working on other OS.

      example for node.js (db already connected for database)

      begin:
      db.collection("test").save(

      {a: 1, test:10000000}

      );

      test:
      for(var i=0;i<1000000;i++) {
      db.collection("test").findAndModify(

      {a:1}

      ,[], {$inc: {test: -0.01}},

      {new:true}

      ,function(err,v)

      {if(v!=null)console.log(v);}

      );
      }

      After approximately 10 to 10000 operations - there is a loss on the error
      This is math error, maybe in V8 engine
      P.S. SpiderMonkey engine don't have this bug - I'm already test it.

      Attachments

        Activity

          People

            antoine Antoine Girbal
            qxfusion Vitaly qxFusion
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: