[SERVER-3676] JSTests::NumberLong fails Created: 23/Aug/11  Updated: 11/Jul/16  Resolved: 06/Oct/11

Status: Closed
Project: Core Server
Component/s: JavaScript
Affects Version/s: 1.8.2, 1.8.3
Fix Version/s: 2.1.0

Type: Bug Priority: Minor - P4
Reporter: Antonin Kral Assignee: Antoine Girbal
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

debian sid on i386


Operating System: Linux
Participants:

 Description   

I've switched debian packages to v8 due to upcomming changes in xulrunner in debian. Test suite fails on i386 (it is working on amd64) with

Tue Aug 23 07:43:49 [testsuite] going to run suite: js
cannot write to read-only object
cannot write to read-only object
cannot write to read-only object
cannot delete from read-only object

{ "a" : NumberLong("-4991432399172682752") }

-4991432399172683043
-4991432399172682752

{ b: -4991432399172682752 }

Tue Aug 23 07:43:49 [testsuite] dbtests/jstests.cpp:541 val != out.firstElement().numberLong() assertion: dbtests/jstests.cpp:541 val != out.firstElement().numberLong() -4991432399172683043 != -4991432399172682752

Tue Aug 23 07:43:49 [testsuite] FAIL: JSTests::NumberLong assertion: dbtests/jstests.cpp:541 val != out.firstElement().numberLong() -4991432399172683043 != -4991432399172682752

I am trying to build mongo with libv8-3.1.8.22_3.1.8.22-1_i386.deb, I haven't seen any relevant warning during build.

Reported as http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=637370



 Comments   
Comment by auto [ 06/Oct/11 ]

Author:

{u'login': u'agirbal', u'name': u'agirbal', u'email': u'antoine@10gen.com'}

Message: - SERVER-3676: JSTests::NumberLong fails
Branch: master
https://github.com/mongodb/mongo/commit/fedce713e91f0a664cf244bafa730898f73d98c8

Comment by Antoine Girbal [ 06/Oct/11 ]

this is most likely due to V8 issue 1339
http://code.google.com/p/v8/issues/detail?id=1339
we do a test see if the long can convert well back and forth from double.
If so we use a single V8 Number, otherwise we split into 2 32bit Numbers.
It seems that the test is not reliable on 32bit, we need to always split for values above 2^53.

Comment by Eliot Horowitz (Inactive) [ 23/Aug/11 ]

v8 is not a supported working config at that option and should only be used for experiments, not production

Generated at Thu Feb 08 03:03:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.