Bug #25686 LockPagesInMainMemory sometimes fails
Submitted: 17 Jan 2007 20:09 Modified: 25 Jan 2007 6:24
Reporter: Jonas Oreland Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S4 (Feature request)
Version: OS:
Assigned to: Jonas Oreland CPU Architecture:Any

[17 Jan 2007 20:09] Jonas Oreland
Description:
The "normal" lock pages does the following:
1) allocate all memory
2) mlockall(MCL_CURRENT)

this seems to fail sometimes...

Add new parameter LockPagesInMainMemory: 2
  (note change type from bool to int)
That does following:
1) mlockall(MCL_CURRENT | MCL_FUTURE)
2) allocate memory

How to repeat:
 

Suggested fix:
[17 Jan 2007 20:12] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/18284

ChangeSet@1.2087, 2007-01-17 21:11:31+01:00, jonas@perch.ndb.mysql.com +6 -0
  ndb - bug#25686
    Add support for doing mlockall(FUTURE) before malloc
      instead of mlockall(CURREENT) after malloc
    (mysql-5.1-wl2325-5.0)
[17 Jan 2007 20:16] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/18285

ChangeSet@1.2283, 2007-01-17 21:15:13+01:00, jonas@perch.ndb.mysql.com +6 -0
  ndb - bug#25686
    add support for doing mlockall before mallc instead of after
    (recommit in 5.0)
[17 Jan 2007 20:33] Jonas Oreland
pushed into 5.0-ndb, 5.1-ndb & 5.1-telco

NOTE to docs:
changes type of config variable LockPagesInMainMemory from bool to int
value 0 = N
value 1 = Y, old behavior, i.e lock after malloc
value 2 = new behavior, i.e. lock before malloc
[24 Jan 2007 2:10] Tomas Ulin
pushed to 5.1.15
[24 Jan 2007 7:56] Tomas Ulin
pushed to 5.0.36
[25 Jan 2007 6:24] Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html

Documented feature change in 5.0.36 and 5.1.15 changelogs.