[SERVER-6073] WIndows service installation hits assertion failure in src\mongo\db\client.h(262) Created: 12/Jun/12  Updated: 11/Jul/16  Resolved: 12/Jun/12

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

Type: Bug Priority: Major - P3
Reporter: Tad Marshall Assignee: Tad Marshall
Resolution: Done Votes: 0
Labels: Windows, crash
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows


Operating System: Windows
Participants:

 Description   

The --install option to install mongod.exe as a Windows service hits an assertion failure due to not having a client context when it calls dbexit(). With other changes to the code, it should not be calling dbexit() in this case, it should just call ::_exit().



 Comments   
Comment by auto [ 12/Jun/12 ]

Author:

{u'date': u'2012-06-12T09:34:14-07:00', u'email': u'tad@10gen.com', u'name': u'Tad Marshall'}

Message: SERVER-6073 call ::_exit() instead of dbexit() after Windows service change

When processing the --install, --reinstall or --remove command line options,
just call ::_exit() to exit instead of dbexit(). We haven't done anything
to make dbexit() required, and the code that called us just uses ::_exit().
Branch: master
https://github.com/mongodb/mongo/commit/40a00a7595606e850af4c5b4734bfa850b8342ff

Comment by Tad Marshall [ 12/Jun/12 ]

This is what you see in the log file:

Tue Jun 12 10:22:33 Trying to install Windows service 'MongoDB'
Tue Jun 12 10:22:33 Service 'MongoDB' (Mongo DB) installed with command line '"C:\Users\Tad\Documents\Visual Studio 2010\Projects\mongo\src\mongo\db\x64\Debug\mongod.exe" --service --dbpath "C:\data\db200Test" --logpath "C:\data\db200Test\testlog.txt" --logappend '
Tue Jun 12 10:22:33 Service can be started from the command line with 'net start MongoDB'
Tue Jun 12 10:22:33 dbexit: 
Tue Jun 12 10:22:33 shutdown: going to close listening sockets...
Tue Jun 12 10:22:33 shutdown: going to flush diaglog...
Tue Jun 12 10:22:33 shutdown: going to close sockets...
Tue Jun 12 10:22:33 shutdown: waiting for fs preallocator...
Tue Jun 12 10:22:33 shutdown: lock for final commit...
Tue Jun 12 10:22:33   Assertion failure c c:\users\tad\documents\visual studio 2010\projects\mongo\src\mongo\db\client.h 262
mongod.exe    ...\src\mongo\util\stacktrace.cpp(172)                   mongo::printStackTrace+0x107
mongod.exe    ...\src\mongo\util\log.cpp(457)                          mongo::logContext+0x72
mongod.exe    ...\src\mongo\util\assert_util.cpp(109)                  mongo::verifyFailed+0x190
mongod.exe    ...\src\mongo\db\client.h(262)                           mongo::cc+0x5c
mongod.exe    ...\src\mongo\db\d_concurrency.cpp(52)                   mongo::lockState+0x1a
mongod.exe    ...\src\mongo\db\d_concurrency.cpp(281)                  mongo::Lock::ParallelBatchWriterSupport::ParallelBatchWriterSupport+0x37
mongod.exe    ...\src\mongo\db\d_concurrency.cpp(285)                  mongo::Lock::ScopedLock::ScopedLock+0x5d
mongod.exe    ...\src\mongo\db\d_concurrency.cpp(437)                  mongo::Lock::GlobalRead::GlobalRead+0x40
mongod.exe    ...\src\mongo\db\d_concurrency.cpp(751)                  mongo::readlocktry::readlocktry+0x81
mongod.exe    ...\src\mongo\db\instance.cpp(958)                       mongo::shutdownServer+0x26a
mongod.exe    ...\src\mongo\db\instance.cpp(1041)                      mongo::dbexit+0x26b
mongod.exe    ...\src\mongo\util\ntservice.cpp(157)                    mongo::serviceParamsCheck+0xfcd
mongod.exe    ...\src\mongo\db\db.cpp(1112)                            mongoDbMain+0x4140
mongod.exe    ...\src\mongo\db\db.cpp(607)                             main+0x2f
mongod.exe    f:\dd\vctools\crt_bld\self_64_amd64\crt\src\crt0.c(278)  __tmainCRTStartup+0xe2
mongod.exe    f:\dd\vctools\crt_bld\self_64_amd64\crt\src\crt0.c(189)  mainCRTStartup+0xe
kernel32.dll                                                           BaseThreadInitThunk+0xd

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