[SERVER-34762] Unclean shutdown prevents startup (iOS) Created: 30/Apr/18  Updated: 29/Oct/23  Resolved: 13/Jun/18

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: 4.0.0-rc6, 4.1.1

Type: Bug Priority: Major - P3
Reporter: Jason Flax Assignee: Henrik Edin
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Storage NYC 2018-05-21, Platforms 2018-06-18, Storage NYC 2018-06-04
Participants:

 Description   

Received the following error log after terminating an iOS application (signal 9):

[storage] Detected unclean shutdown - /Users/jasonflax/Library/Developer/CoreSimulator/Devices/A8328A47-7C7E-4CB7-A96A-A0DC3D50AFA1/data/Containers/Data/Application/E51E8B25-71B5-4862-833A-CB98B45B0082/mongod.lock is not empty.

It appears that `MongoMobile.close()` was not called as `deinit` is not called when an application is terminated.

 

This was replicated on an iOS simulator.



 Comments   
Comment by Githook User [ 13/Jun/18 ]

Author:

{'username': 'henrikedin', 'name': 'Henrik Edin', 'email': 'henrik.edin@mongodb.com'}

Message: SERVER-34762 Remove lock file on embedded.

(cherry picked from commit 85477a157ab217912eec55422a9d7b2d0e7b0d47)
Branch: v4.0
https://github.com/mongodb/mongo/commit/aaea3d23d7846af05b71c5f416bda2665606bc44

Comment by Githook User [ 13/Jun/18 ]

Author:

{'username': 'henrikedin', 'name': 'Henrik Edin', 'email': 'henrik.edin@mongodb.com'}

Message: SERVER-34762 Remove lock file on embedded.
Branch: master
https://github.com/mongodb/mongo/commit/85477a157ab217912eec55422a9d7b2d0e7b0d47

Comment by Geert Bosch [ 07/Jun/18 ]

We had a discussion tonight with the world-wide storage team and came to the conclusion that the decision of whether to use a lock file or not is really not storage-engine specific, but instead related to the specific platform / mongod build. A mobile phone may require no lock file, but the same Mobile storage engine in a different embedded Linux environment might still require one.

We also discussed the fact that many storage engines have their own protection against concurrent use of the same data directory, but that is not really sufficient as the check has to happen earlier, and of course also wouldn't protect against starting a mongod with two different storage engines.

So your conclusion was that the decision on whether to use a lock file or not should be a build time decision depending on the platform. One suggested solution was a scons build option. In any case it seems clear that this is an area owned by the platform team and does not really involve storage.

acm, I'm reassigning to platforms for triage.

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