| Bug #68064 | mysql crashes when Solaris resource controls prevent memory from allocation | ||
|---|---|---|---|
| Submitted: | 10 Jan 2013 4:17 | Modified: | 22 Jan 2013 19:40 |
| Reporter: | Eugene Zheganin | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: InnoDB storage engine | Severity: | S3 (Non-critical) |
| Version: | 5.5.16, 5.5.31 | OS: | Solaris |
| Assigned to: | CPU Architecture: | Any | |
[10 Jan 2013 4:17]
Eugene Zheganin
[11 Jan 2013 13:01]
Sveta Smirnova
Thank you for the report. What is the output of ulimit -a and vm.overcommit_ratio on your system?
[11 Jan 2013 18:37]
Eugene Zheganin
I think vm.overcommit_ratio is a Linux kernel tunable.
[root@janus ~]# su - mysql
$ ulimit -a
address space limit (kbytes) (-M) unlimited
core file size (blocks) (-c) unlimited
cpu time (seconds) (-t) unlimited
data size (kbytes) (-d) unlimited
file size (blocks) (-f) unlimited
locks (-x) not supported
locked address space (kbytes) (-l) not supported
message queue size (kbytes) (-q) not supported
nice (-e) not supported
nofile (-n) 256
nproc (-u) 29995
pipe buffer size (bytes) (-p) 5120
max memory size (kbytes) (-m) not supported
rtprio (-r) not supported
socket buffer size (bytes) (-b) 5120
sigpend (-i) 32
stack size (kbytes) (-s) 10240
swap size (kbytes) (-w) not supported
threads (-T) not supported
process size (kbytes) (-v) unlimited
However, I believe you're asking about Solaris resource controls:
[root@janus ~]# ps -ef | grep mysql
root 29304 29289 0 22:21:11 pts/5 0:00 grep mysql
mysql 22263 21644 3 Jan 10 ? 3672:48 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mys
root 21644 1 0 Jan 10 ? 0:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --basedir=/usr/local/mysql --datadir=/
[root@janus ~]# prctl -n project.max-shm-memory -i process 22263
process: 22263: /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
project.max-shm-memory
privileged 9.00GB - deny -
system 16.0EB max deny -
[root@janus ~]# prctl -n project.max-shm-memory -i process 21644
process: 21644: /bin/sh /usr/local/mysql/bin/mysqld_safe --basedir=/usr/local/mysql --
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
project.max-shm-memory
privileged 9.00GB - deny -
system 16.0EB max deny
I agree that due to an error in a /etc/project the actual shared memory limit was far below the requested value.
However, I suppose that mysql should handle this situation correctly. This is still my mistake, but I believe the bug should stand.
Thanks.
[13 Jan 2013 19:08]
Valeriy Kravchuk
How do you want MySQL server to handle this situation? It can not start with a buffer pool of the size you've requested (as it can not allocate the memory). So, you'd like to see a clear error message instead of assertion failure and a stack trace or something else?
[14 Jan 2013 4:29]
Eugene Zheganin
Yup. At least that's what oracle db and pgsql do, so I could say "it's a standard approach". Every developer has a right to keep his own point of view (no questions here) but as engineer I usually report everything that's producing a backtrace or an assertion failure.
[22 Jan 2013 19:40]
Sveta Smirnova
Thank you for the feedback. Your request is reasonable. Verified as described.
