[SERVER-2500] --dur fails with createPrivateMap on windows Created: 09/Feb/11  Updated: 12/Jul/16  Resolved: 22/Feb/11

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: 1.7.5
Fix Version/s: 1.8.0-rc0

Type: Bug Priority: Major - P3
Reporter: Scott Hernandez (Inactive) Assignee: Dwight Merriman
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-2502 createPrivateMap fails, leads to repe... Closed
Operating System: Windows
Participants:

 Description   

Starting up on windows with --dur failes to load existing database.

> show dbs
Tue Feb 08 20:59:24 uncaught exception: listDatabases failed:{
"errmsg" : "exception: createPrivateMap failed (look in log for error)",
"code" : 13636,
"ok" : 0
}

Tue Feb 08 20:59:24 [conn1] checking size file /data/db/market_data.ns
Accessing: market_data for the first time
Tue Feb 08 20:59:24 [conn1] createPrivateMap failed /data/db/market_data.5 errno:1455 The paging file is too small for this operation to complete.
Tue Feb 08 20:59:24 [conn1] Assertion: 13636:createPrivateMap failed (look in log for error)
Tue Feb 08 20:59:24 [conn1] query admin.$cmd ntoreturn:1 command:

{ listDatabases: 1.0 }

reslen:134 153ms
Tue Feb 08 20:59:24 [conn1] query: admin.$cmd

{ replSetGetStatus: 1 }

Tue Feb 08 20:59:24 [conn1] run command admin.$cmd

{ replSetGetStatus: 1 }

Tue Feb 08 20:59:24 [conn1] command:

{ replSetGetStatus: 1 }

Without --dur, it works:

> show dbs
...
market_data 5.951171875GB
...

Tue Feb 08 21:07:52 [conn1] checking size file /data/db/market_data.ns
Accessing: market_data for the first time
Tue Feb 08 21:07:52 [conn1] checking size file /data/db/mongosv.ns
Accessing: mongosv for the first time
Tue Feb 08 21:07:52 [conn1] checking size file /data/db/morphia_test.ns
Accessing: morphia_test for the first time
Tue Feb 08 21:07:52 [conn1] checking size file /data/db/my_database.ns
Accessing: my_database for the first time
Tue Feb 08 21:07:52 [conn1] checking size file /data/db/ResultsDB.ns
Accessing: ResultsDB for the first time
Tue Feb 08 21:07:52 [conn1] checking size file /data/db/test.ns
Accessing: test for the first time
Tue Feb 08 21:07:52 [conn1] checking size file /data/db/testing.ns
Accessing: testing for the first time
Tue Feb 08 21:07:52 [conn1] query admin.$cmd ntoreturn:1 command:

{ listDatabases: 1.0 }

reslen:703 82ms
Tue Feb 08 21:07:52 [conn1] query: admin.$cmd

{ replSetGetStatus: 1 }

 Comments   
Comment by Dwight Merriman [ 23/Feb/11 ]

just for future reference here is why the changes were made:

"When copy-on-write access is specified, the system and process commit charge taken is for the entire view because the calling process can potentially write to every page in the view, making all pages private. The contents of the new page are never written back to the original file and are lost when the view is unmapped."
http://msdn.microsoft.com/en-us/library/aa366761(v=vs.85).aspx

Comment by Scott Hernandez (Inactive) [ 22/Feb/11 ]

Works.

> show dbs
ResultsDB 0.078125GB
admin 0.078125GB
davpix 2.0771484375GB
java_threading_tests 0.078125GB
local 0.078125GB
market_data 5.951171875GB
mongosv 0.078125GB
morphia_test 0.078125GB
my_database 0.203125GB
test 0.203125GB
testing 0.078125GB
> use market_data
switched to db market_data

Although, there is something else weird going on which I bring up in another issue.

Comment by auto [ 21/Feb/11 ]

Author:

{u'login': u'dwight', u'name': u'dwight', u'email': u'dwight@10gen.com'}

Message: SERVER-2500 windows - eliminate mapaligned
https://github.com/mongodb/mongo/commit/af363697167c103374d7534b1af4b92f6eb3270c

Comment by Scott Hernandez (Inactive) [ 17/Feb/11 ]

New error from nightly (night before last).
...
Thu Feb 17 14:41:05 [initandlisten] db version v1.7.7-pre-, pdfile version 4.5
Thu Feb 17 14:41:05 [initandlisten] git version: e1636f4e771d164822d10ded32cf581bddf9ccac
Thu Feb 17 14:41:05 [initandlisten] sys info: windows (6, 1, 7600, 2, '') BOOST_LIB_VERSION=1_42

Thu Feb 17 14:45:58 [initandlisten] connection accepted from 127.0.0.1:49845 #1
Thu Feb 17 14:46:05 [conn1] couldn't align mapped view of file len:16MB errno:487
Thu Feb 17 14:46:05 [conn1] createPrivateMap failed /data/db/testing.ns errno:0 The operation completed successfully.
Thu Feb 17 14:46:05 [conn1] Assertion: 13636:createPrivateMap failed (look in log for error)
Thu Feb 17 14:46:05 [conn1] query admin.$cmd ntoreturn:1 command:

{ listDatabases: 1.0 }

reslen:134 2151ms

Comment by auto [ 15/Feb/11 ]

Author:

{u'login': u'dwight', u'name': u'dwight', u'email': u'dwight@10gen.com'}

Message: SERVER-2500 private map was using too much memory on windows
https://github.com/mongodb/mongo/commit/9bd9f144b33253773973f3253684d7c627492f0d

Comment by Dwight Merriman [ 09/Feb/11 ]

i'll probably start with making private maps roll out when not needed. this may still require a swap file increase but puts an upper bound on the needed space.

Comment by auto [ 09/Feb/11 ]

Author:

{u'login': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}

Message: fix mismatched new[] and delete SERVER-2500
https://github.com/mongodb/mongo/commit/ab45f42f14be3c6934edd4cbb1a857e9ee209adf

Comment by Dwight Merriman [ 09/Feb/11 ]

ok i can reproduce

Comment by Scott Hernandez (Inactive) [ 09/Feb/11 ]

64bit windows 7

Comment by Dwight Merriman [ 09/Feb/11 ]

i take it this is a 32 bit version of mongod?

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