Bug 81378 - memlock option not working
memlock option not working
Status: CLOSED UPSTREAM
Product: Red Hat Linux
Classification: Retired
Component: mysql (Show other bugs)
7.3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tom Lane
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-01-08 11:52 EST by Ion Badulescu
Modified: 2013-07-02 22:59 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-02-03 13:35:30 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
fix for memlock problem (1.02 KB, patch)
2003-01-08 11:54 EST, Ion Badulescu
no flags Details | Diff

  None (edit)
Description Ion Badulescu 2003-01-08 11:52:54 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003

Description of problem:
If the mysql daemon is runing as a non-root user, it calls mlockall() after
switching uid's and consequently it fails to lock itself into memory.

All mysql versions are affected, from rh72 through rawhide.

The patch I'm attaching is against 3.23.54a (rawhide). It may not be the ideal
fix, but it is obviously correct and works for me.


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. add "memlock" to the [mysqld] section in /etc/my.cnf
2. start mysqld
3. check its memlocked status (the L flag in the "ps ax" output)
    

Actual Results:  11958 pts/0    S      0:01  \_ /usr/libexec/mysqld


Expected Results:  12228 pts/0    SL     0:02  \_ /usr/libexec/mysqld


Additional info:

Non-working memlock causes mysqld to get paged out occassionally, with the
expected negative effects on performance.
Comment 1 Ion Badulescu 2003-01-08 11:54:18 EST
Created attachment 89216 [details]
fix for memlock problem
Comment 2 Tom Lane 2004-02-03 13:35:30 EST
Since this is a fairly noncritical issue, I don't think we should
maintain a private fix for it.  The bug should be filed upstream, that
is with MySQL AB.  (A quick look suggests that the issue is still
present in MySQL 4.0.17.)

Note You need to log in before you can comment on or make changes to this bug.