[SERVER-8827] JSTests::TypeConservation unit test segfaults on Spidermonkey Created: 01/Mar/13  Updated: 11/Jul/16  Resolved: 05/Mar/13

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

Type: Bug Priority: Major - P3
Reporter: Shaun Verch Assignee: Ben Becker
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-8784 Autocomplete segfaults in SpiderMonke... Closed
Operating System: ALL
Participants:

 Description   

Verified that this worked at least before --usev8 was the default.

To reproduce:

Compile latest version:

scons --usesm=USESM test

Run javascript unit tests:

./test js

Error output:

...
JSTests::TypeConservation
Segmentation fault: 11
...



 Comments   
Comment by auto [ 05/Mar/13 ]

Author:

{u'date': u'2013-03-05T17:21:18Z', u'name': u'Ben Becker', u'email': u'ben.becker@10gen.com'}

Message: SERVER-8827: fix SpiderMonkey function cache map
Branch: master
https://github.com/mongodb/mongo/commit/18de1d56412bfb89a6b3f95b18eeb770184fda15

Comment by Tad Marshall [ 02/Mar/13 ]

Seems to be the same failure as SERVER-8784, though in a different program. The code is trying to read from address 1.

Windows "test.exe js" in scons --usesm build:

Sat Mar 02 10:11:36.498 [testsuite]      going to run test: class JSTests::TypeConservation
Sat Mar 02 10:11:36.501 [testsuite] *** unhandled exception (access violation) at 0x000000013FB341F7, terminating
Sat Mar 02 10:11:36.502 [testsuite] *** access violation was a read from 0x0000000000000001
Sat Mar 02 10:11:36.502 [testsuite] *** stack trace for unhandled exception:
Sat Mar 02 10:11:37.683 [testsuite] test.exe      ...\src\third_party\js-1.7\jsapi.c(4310)                             JS_CallFunction+0x57
Sat Mar 02 10:11:37.683 [testsuite] test.exe      ...\src\mongo\scripting\engine_spidermonkey.cpp(1709)                mongo::spidermonkey::SMScope::invoke+0x370
Sat Mar 02 10:11:37.684 [testsuite] test.exe      ...\src\mongo\scripting\engine_spidermonkey_internal.h(282)          mongo::spidermonkey::SMScope::invoke+0x6f
Sat Mar 02 10:11:37.684 [testsuite] test.exe      ...\src\mongo\scripting\engine.cpp(93)                               mongo::Scope::invoke+0xb6
Sat Mar 02 10:11:37.684 [testsuite] test.exe      ...\src\mongo\dbtests\jstests.cpp(533)                               JSTests::TypeConservation::run+0x902
Sat Mar 02 10:11:37.684 [testsuite] test.exe      ...\src\mongo\unittest\unittest.h(290)                               mongo::unittest::Suite::runTestObject<JSTests::TypeConservation>+0x1f
Sat Mar 02 10:11:37.684 [testsuite] test.exe      ...\src\third_party\boost\boost\function\function_template.hpp(113)  boost::detail::function::void_function_invoker0<void (__cdecl*)(void),void>::invoke+0x2f
Sat Mar 02 10:11:37.685 [testsuite] test.exe      ...\src\third_party\boost\boost\function\function_template.hpp(761)  boost::function0<void>::operator()+0x87
Sat Mar 02 10:11:37.685 [testsuite] test.exe      ...\src\mongo\unittest\unittest.h(187)                               mongo::unittest::TestHolder::run+0x2f
Sat Mar 02 10:11:37.685 [testsuite] test.exe      ...\src\mongo\unittest\unittest.cpp(143)                             mongo::unittest::Suite::run+0x6d4
Sat Mar 02 10:11:37.685 [testsuite] test.exe      ...\src\mongo\unittest\unittest.cpp(207)                             mongo::unittest::Suite::run+0x497
Sat Mar 02 10:11:37.685 [testsuite] test.exe      ...\src\mongo\dbtests\framework.cpp(260)                             mongo::dbtests::runDbTests+0x1235
Sat Mar 02 10:11:37.686 [testsuite] test.exe      ...\src\mongo\dbtests\dbtests.cpp(35)                                main+0xd0
Sat Mar 02 10:11:37.686 [testsuite] test.exe      f:\dd\vctools\crt_bld\self_64_amd64\crt\src\crt0.c(278)              __tmainCRTStartup+0xe2
Sat Mar 02 10:11:37.686 [testsuite] test.exe      f:\dd\vctools\crt_bld\self_64_amd64\crt\src\crt0.c(189)              mainCRTStartup+0xe
Sat Mar 02 10:11:37.686 [testsuite] kernel32.dll                                                                       BaseThreadInitThunk+0xd
Sat Mar 02 10:11:37.687 [testsuite] writing minidump diagnostic file mongo.dmp
Sat Mar 02 10:11:37.732 [testsuite] *** immediate exit due to unhandled exception

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