Bug #22860 Option --memlock should be revisited
Submitted: 30 Sep 2006 14:01 Modified: 7 May 2007 17:35
Reporter: Sinisa Milivojevic Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0 OS:Linux (Linux + most of Unices)
Assigned to: Sinisa Milivojevic CPU Architecture:Any
Tags: bfsm_2007_03_15

[30 Sep 2006 14:01] Sinisa Milivojevic
Description:
Usage of this option crashes MySQL server on many Unices.

How to repeat:
Use --memlock ... more in private comments
[30 Sep 2006 14:01] Sinisa Milivojevic
A crashing bug requiring disabling memlock on unstable platforms. There are platforms on which mlockall() does not exist, but memlock option is on, which leads to corruption, but there are also platforms (like most Linuces) where mlockall() exists, but it crashes server as it does not work correctly. Right now, it works properly only on Solaris
[5 Oct 2006 22:17] Omer Barnir
Following discussion w/Sinisa's, "large number of connections" is running a few hundred connections and the --memlock swich (to be used as ref for the time QA will run tests testing for this swich configuration.
[10 Nov 2006 16:31] 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/15147

ChangeSet@1.2544, 2006-11-10 11:31:25-05:00, cmiller@zippy.cornsilk.net +1 -0
  Bug #22860: Option --memlock should be revisited
  
  Support says that memlock doesn't work on OSes other than Solaris.  If 
  "memlock" command-line parameter is specified on an OS that doesn't
  reliably support it, then unset it and warn that it's unsupported.
[10 Nov 2006 17:14] 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/15149

ChangeSet@1.2544, 2006-11-10 12:14:26-05:00, cmiller@zippy.cornsilk.net +2 -0
  Bug #22860: Option --memlock should be revisited
  
  Support says that memlock doesn't work on OSes other than Solaris.  
  Remove it as a parameter altogether.
[10 Nov 2006 21:36] 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/15171

ChangeSet@1.2544, 2006-11-10 16:36:08-05:00, cmiller@zippy.cornsilk.net +2 -0
  Bug #22860: Option --memlock should be revisited
  
  Support says that memlock doesn't work on OSes other than Solaris.  
  Add a warning about --memlock to the crash monologue.
[11 Dec 2006 4:20] Paul Dubois
Noted in 4.1.23, 5.0.32, 5.1.15 changelogs.

The --memlock option relies on system calls that are unreliable on
some operating systems. If a crash occurs, the server now checks
whether --memlock was specified and if so issues some information about
possible workarounds.