[SERVER-23860] VS2015 Debug Builder Auth tests fail with exit code 3 Created: 21/Apr/16  Updated: 22/Jul/16  Resolved: 28/Apr/16

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 3.3.6

Type: Bug Priority: Major - P3
Reporter: Mark Benvenuto Assignee: Mark Benvenuto
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-25079 Bypass Windows CRT when exiting Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Platforms 13 (04/22/16), Platforms 14 (05/13/16)
Participants:

 Description   

On VS2015 Debug Builders, the CRT is statically linked to the binary, and during a call of _exit(0), the process returns 3. There are a few cases in the CRT where _exit(3) is called so the current assumption is that during exit, the CRT is causing the process to exit with 3.

Sample Log:

[js_test:auth_schema_upgrade] 2016-04-21T16:23:05.934+0000 c20012| 2016-04-21T16:23:05.935+0000 I CONTROL  [eventTerminate] QuickExit with 0
[js_test:auth_schema_upgrade] 2016-04-21T16:23:06.016+0000 2016-04-21T16:23:06.016+0000 I -        [thread1] shell: stopped mongo program on port 20012
[js_test:auth_schema_upgrade] 2016-04-21T16:23:06.016+0000 2016-04-21T16:23:06.016+0000 E QUERY    [thread1] StopError: MongoDB process on port 20012 exited with error code 3 :



 Comments   
Comment by Mark Benvenuto [ 22/Jul/16 ]

For reference, here is the actual stacktrace I got after I silent process monitoring working. See SERVER-24625.

# Call Site
00 ntdll!ZwWaitForSingleObject+0xa
01 ntdll! ?? ::FNODOBFM::`string'+0x17a8c
02 ntdll!RtlExitUserProcess+0x8b
03 mongod!exit_or_terminate_process+0x3a [d:\th\minkernel\crts\ucrt\src\appcrt\startup\exit.cpp @ 130]
04 mongod!common_exit+0x13c [d:\th\minkernel\crts\ucrt\src\appcrt\startup\exit.cpp @ 271]
05 mongod!_exit+0x19 [d:\th\minkernel\crts\ucrt\src\appcrt\startup\exit.cpp @ 288]
06 mongod!abort+0x7a [d:\th\minkernel\crts\ucrt\src\appcrt\startup\abort.cpp @ 90]
07 mongod!__vcrt_getptd+0x1b [f:\dd\vctools\crt\vcruntime\src\internal\per_thread_data.cpp @ 150]
08 mongod!__uncaught_exception+0x9 [f:\dd\vctools\crt\vcruntime\src\eh\frame.cpp @ 1900]
09 mongod!std::uncaught_exception+0x9 [f:\dd\vctools\crt\crtw32\stdcpp\uncaught.cpp @ 10]
0a mongod!std::basic_ostream<char,std::char_traits<char> >::sentry::{dtor}+0x5 [c:\program files (x86)\microsoft visual studio 14.0\vc\include\ostream @ 132]
0b mongod!std::operator<<<std::char_traits<char> >+0x20e [c:\program files (x86)\microsoft visual studio 14.0\vc\include\ostream @ 820]
0c mongod!mongo::`anonymous namespace'::printSignalAndBacktrace+0x34 [c:\data\mci\ba899de64792e08d66d5bc7dcacbca60\src\src\mongo\util\signal_handlers_synchronous.cpp @ 178]
0d mongod!mongo::`anonymous namespace'::abruptQuit+0x83 [c:\data\mci\ba899de64792e08d66d5bc7dcacbca60\src\src\mongo\util\signal_handlers_synchronous.cpp @ 237]
0e mongod!raise+0x468 [d:\th\minkernel\crts\ucrt\src\appcrt\misc\signal.cpp @ 522]
0f mongod!abort+0x39 [d:\th\minkernel\crts\ucrt\src\appcrt\startup\abort.cpp @ 71]
10 mongod!__vcrt_getptd+0x1b [f:\dd\vctools\crt\vcruntime\src\internal\per_thread_data.cpp @ 150]
11 mongod!__CxxFrameHandler3+0x3c [f:\dd\vctools\crt\vcruntime\src\eh\amd64\trnsctrl.cpp @ 182]
12 ntdll!RtlpExecuteHandlerForException+0xd
13 ntdll!RtlDispatchException+0x45a
14 ntdll!KiUserExceptionDispatch+0x2e
15 mongod!_isatty+0xf4 [d:\th\minkernel\crts\ucrt\src\appcrt\lowio\isatty.cpp @ 19]
16 mongod!__acrt_stdio_begin_temporary_buffering_nolock+0x79 [d:\th\minkernel\crts\ucrt\src\appcrt\stdio\_sftbuf.cpp @ 43]
17 mongod!__acrt_stdio_temporary_buffering_guard::__acrt_stdio_temporary_buffering_guard+0x25 [d:\th\minkernel\crts\ucrt\inc\corecrt_internal_stdio.h @ 399]
18 mongod!<lambda_dd75445284c072d0bd3768540cc698fa>::operator()+0x36 [d:\th\minkernel\crts\ucrt\src\appcrt\stdio\output.cpp @ 38]
19 mongod!__crt_seh_guarded_call<int>::operator()<<lambda_7b91131dde12e1c3dfc74ff76b3f2eac>,<lambda_dd75445284c072d0bd3768540cc698fa> & __ptr64,<lambda_16bc4ecb55b4718497c16bceaea2ceaf> >+0x35 [d:\th\minkernel\crts\ucrt\devdiv\vcruntime\inc\internal_shared.h @ 199]
1a mongod!__acrt_lock_stream_and_call<<lambda_dd75445284c072d0bd3768540cc698fa> >+0x5d [d:\th\minkernel\crts\ucrt\inc\corecrt_internal_stdio.h @ 256]
1b mongod!common_vfprintf<__crt_stdio_output::standard_base,wchar_t>+0x1b7 [d:\th\minkernel\crts\ucrt\src\appcrt\stdio\output.cpp @ 48]
1c mongod!__stdio_common_vfwprintf+0x3b [d:\th\minkernel\crts\ucrt\src\appcrt\stdio\output.cpp @ 70]
1d mongod!_vfwprintf_l+0x3e [f:\dd\externalapis\unifiedcrt\inc\corecrt_wstdio.h @ 305]
1e mongod!fwprintf+0x3e [f:\dd\externalapis\unifiedcrt\inc\corecrt_wstdio.h @ 500]
1f mongod!__crt_char_traits<wchar_t>::ftprintf<_iobuf * __ptr64,wchar_t const * __ptr64,wchar_t const * __ptr64 const & __ptr64,wchar_t const * __ptr64 const & __ptr64,unsigned int const & __ptr64>+0x48 [d:\th\minkernel\crts\ucrt\inc\corecrt_internal_traits.h @ 121]
20 mongod!common_assert_to_stderr<wchar_t>+0xa8 [d:\th\minkernel\crts\ucrt\src\appcrt\startup\assert.cpp @ 148]
21 mongod!common_assert<wchar_t>+0x68 [d:\th\minkernel\crts\ucrt\src\appcrt\startup\assert.cpp @ 383]
22 mongod!_wassert+0x2f [d:\th\minkernel\crts\ucrt\src\appcrt\startup\assert.cpp @ 405]
23 mongod!boost::`anonymous namespace'::make_external_thread_data+0x1f [c:\data\mci\ba899de64792e08d66d5bc7dcacbca60\src\src\third_party\boost-1.60.0\libs\thread\src\win32\thread.cpp @ 410]
24 mongod!boost::?A0x1887a378::get_or_make_current_thread_data+0x1e
25 mongod!boost::detail::add_new_tss_node+0x48 [c:\data\mci\ba899de64792e08d66d5bc7dcacbca60\src\src\third_party\boost-1.60.0\libs\thread\src\win32\thread.cpp @ 978]
26 mongod!boost::detail::set_tss_data+0xcb [c:\data\mci\ba899de64792e08d66d5bc7dcacbca60\src\src\third_party\boost-1.60.0\libs\thread\src\win32\thread.cpp @ 1010]
27 mongod!boost::thread_specific_ptr<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >::reset+0x46 [c:\data\mci\ba899de64792e08d66d5bc7dcacbca60\src\src\third_party\boost-1.60.0\boost\thread\tss.hpp @ 105]
28 mongod!mongo::setThreadName+0x7a [c:\data\mci\ba899de64792e08d66d5bc7dcacbca60\src\src\mongo\util\concurrency\thread_name.cpp @ 64]
29 mongod!mongo::getThreadName+0x291 [c:\data\mci\ba899de64792e08d66d5bc7dcacbca60\src\src\mongo\util\concurrency\thread_name.cpp @ 79]
2a mongod!mongo::`anonymous namespace'::log+0x30 [c:\data\mci\ba899de64792e08d66d5bc7dcacbca60\src\src\mongo\util\log.h @ 130]
2b mongod!mongo::`anonymous namespace'::logAndQuickExit+0x26 [c:\data\mci\ba899de64792e08d66d5bc7dcacbca60\src\src\mongo\util\exit.cpp @ 70]
2c mongod!mongo::shutdown+0x1ea [c:\data\mci\ba899de64792e08d66d5bc7dcacbca60\src\src\mongo\util\exit.cpp @ 138]
2d mongod!mongo::exitCleanly+0x7 [c:\data\mci\ba899de64792e08d66d5bc7dcacbca60\src\src\mongo\util\exit.h @ 81]
2e mongod!mongoDbMain+0x2b3 [c:\data\mci\ba899de64792e08d66d5bc7dcacbca60\src\src\mongo\db\db.cpp @ 1091]
2f mongod!wmain+0x35 [c:\data\mci\ba899de64792e08d66d5bc7dcacbca60\src\src\mongo\db\db.cpp @ 793]
30 mongod!invoke_main+0x34 [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl @ 80]
31 mongod!__scrt_common_main_seh+0x12e [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl @ 255]
32 mongod!__scrt_common_main+0xe [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl @ 300]
33 mongod!wmainCRTStartup+0x9 [f:\dd\vctools\crt\vcstartup\src\startup\exe_wmain.cpp @ 17]
34 kernel32!BaseThreadInitThunk+0xd
35 ntdll!RtlUserThreadStart+0x1d

Comment by Githook User [ 28/Apr/16 ]

Author:

{u'username': u'markbenvenuto', u'name': u'Mark Benvenuto', u'email': u'mark.benvenuto@mongodb.com'}

Message: SERVER-23860 VS2015 Debug Auth tests fail with exit code 3
Branch: master
https://github.com/mongodb/mongo/commit/167a06199ece7743400d169b9c22980be04dc60a

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