[SERVER-13173] core - fails with division by zero exception if test executes in less than a millisecond Created: 12/Mar/14  Updated: 11/Jul/16  Resolved: 13/Mar/14

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 2.6.0-rc2

Type: Bug Priority: Trivial - P5
Reporter: Kaloian Manassiev Assignee: Kaloian Manassiev
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: Windows
Participants:

 Description   

db2875aee3 Windows 32-bit core

http://mci.10gen.com/ui/task/mongodb_mongo_master_windows_32_db2875aee372ea08ed7b6e6ad91494b2df29154f_14_03_12_15_48_09_core_windows_32
http://buildlogs.mongodb.org/mci_0.9_windows_32/builds/29099/test/core_0/test.exe

Stack trace of importance:

2014-03-12T19:21:02.207+0000 [testsuite] *** unhandled exception 0xC0000094 at 0x00D66DF4, terminating
2014-03-12T19:21:02.207+0000 [testsuite] *** stack trace for unhandled exception:
2014-03-12 15:21:03 EDT	
2014-03-12T19:21:03.300+0000 [testsuite] test.exe      f:\dd\vctools\crt_bld\SELF_X86\crt\src\INTEL\ulldiv.asm(88)  _aulldiv+0x14
2014-03-12T19:21:03.300+0000 [testsuite] test.exe      ...\src\mongo\dbtests\perftests.cpp(230)                     PerfTests::B::say+0x6b
2014-03-12T19:21:03.300+0000 [testsuite] test.exe      ...\src\mongo\dbtests\perftests.cpp(356)                     PerfTests::B::run+0x30d
2014-03-12T19:21:03.300+0000 [testsuite] test.exe      ...\src\mongo\unittest\unittest.h(309)                       mongo::unittest::Suite::runTestObject<PerfTests::InsertBig>+0x3e
2014-03-12T19:21:03.300+0000 [testsuite] test.exe      ...\src\mongo\unittest\unittest.cpp(182)                     mongo::unittest::Suite::run+0x624
2014-03-12T19:21:03.301+0000 [testsuite] test.exe      ...\src\mongo\unittest\unittest.cpp(247)                     mongo::unittest::Suite::run+0x4fd
2014-03-12T19:21:03.301+0000 [testsuite] test.exe      ...\src\mongo\dbtests\framework.cpp(124)                     mongo::dbtests::runDbTests+0xca
2014-03-12T19:21:03.301+0000 [testsuite] test.exe      ...\src\mongo\dbtests\dbtests.cpp(59)                        dbtestsMain+0xd5
2014-03-12T19:21:03.301+0000 [testsuite] test.exe      ...\src\mongo\dbtests\dbtests.cpp(70)                        wmain+0x4f
2014-03-12T19:21:03.301+0000 [testsuite] test.exe      f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c(278)           __tmainCRTStartup+0x10b
2014-03-12T19:21:03.301+0000 [testsuite] kernel32.dll                                                               BaseThreadInitThunk+0x12
2014-03-12T19:21:03.301+0000 [testsuite] ntdll.dll                                                                  RtlInitializeExceptionChain+0x63

The code, which hits this is here - https://github.com/mongodb/mongo/blob/master/src/mongo/dbtests/perftests.cpp#L229. The reason is 'ms' is zero, due to just one iteration of the test executing here - https://github.com/mongodb/mongo/blob/master/src/mongo/dbtests/perftests.cpp#L229.



 Comments   
Comment by Githook User [ 13/Mar/14 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-13173 Use microseconds instead of millis in order to avoid a
division by zero exception.
Branch: v2.6
https://github.com/mongodb/mongo/commit/a53a7eec0594f065923a495a695cb5dde6679468

Comment by Githook User [ 13/Mar/14 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-13173 Use microseconds instead of millis in order to avoid a
division by zero exception.
Branch: master
https://github.com/mongodb/mongo/commit/74ae391fba961176ec63973cc9393e024a21661b

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