Bug #77348 "mysqld got signal 11" at startup
Submitted: 14 Jun 2015 12:03 Modified: 24 May 2017 16:06
Reporter: db db Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.6.24 OS:FreeBSD (10.1-RELEASE-p12)
Assigned to: CPU Architecture:Any

[14 Jun 2015 12:03] db db
Description:
If mysql does not have read access on the parent directory of the DB directory, it crashes at startup.

In my context:
- mysql databases are in /www/mysql-db/
- the "mysql" user as "--x" access rights on / and /www

Error log:
150614 11:16:47 mysqld_safe Starting mysqld daemon with databases from /www/mysql-db/
2015-06-14 11:16:48 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see 
2015-06-14 11:16:48 0 [Note] /usr/local/libexec/mysqld (mysqld 5.6.24) starting as process 35476 ...
2015-06-14 11:16:48 35476 [Warning] One can only use the --user switch if running as root

2015-06-14 11:16:48 35476 [Note] Plugin 'FEDERATED' is disabled.
2015-06-14 11:16:48 35476 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-06-14 11:16:48 35476 [Note] InnoDB: The InnoDB memory heap is disabled
2015-06-14 11:16:48 35476 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-06-14 11:16:48 35476 [Note] InnoDB: Memory barrier is not used
2015-06-14 11:16:48 35476 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-06-14 11:16:48 35476 [Note] InnoDB: Not using CPU crc32 instructions
2015-06-14 11:16:48 35476 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-06-14 11:16:48 35476 [Note] InnoDB: Completed initialization of buffer pool
2015-06-14 11:16:48 35476 [Note] InnoDB: Highest supported file format is Barracuda.
2015-06-14 11:16:48 35476 [Note] InnoDB: 128 rollback segment(s) are active.
2015-06-14 11:16:48 35476 [Note] InnoDB: Waiting for purge to start
11:16:48 UTC - mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed, 
something is definitely wrong and this may fail.

key_buffer_size=8388608
read_buffer_size=131072
max_used_connections=0
max_threads=151
thread_count=0
connection_count=0
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 68054 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

150614 11:16:48 mysqld_safe mysqld from pid file /www/mysql-db//plop.local.pid ended

How to repeat:
See description.

Suggested fix:
Grant read access to the system mysql user on the parent directory.

It would be better that mysql don't crash if it can't access this directory. I'm also a bit be surprised that it need to access to this directory.
[14 Jun 2016 7:02] Hartmut Holzgraefe
Can't reproduce this, I did the following steps:

* created a /foobar directory
* moved over the datadir of an existing mysql to /foobar/data
* set datadir=/foobar/data in my.cnf
* changed /foobar permissions to --x--x--x
* started mysqld, as "root" and as "mysql"
* started mysqld after deleting ibdata and iblog files

Never ran into a crash with this ...
[14 Jun 2016 7:06] MySQL Verification Team
re http://bugs.mysql.com/bug.php?id=81827
and sadly there is no stack trace on freebsd to point us in right direction.
gdb or corefile would be needed..
[14 Jun 2016 7:57] Hartmut Holzgraefe
Ah, I totally overlooked the OS information, I tested on Linux ...
[25 May 2017 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".