"""
RLIMIT_FSIZE
This is the maximum size of a file, in bytes, that
may be created by a process. If a write or truncate operation would cause this limit to be exceeded, SIGXFSZ shall be generated for the thread. If the thread is blocking, or the process
is catching or ignoring SIGXFSZ, continued attempts
to increase the size of a file from end-of-file to beyond the limit shall fail with errno
set to [EFBIG].
"""
So, SIGXFSZ is delivered and the errno should be EFBIG in this
case.
As per the report, there is no error printed and/or not handled
gracefully.
sudo gdb --args mysqld --user=mysql
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-56.el6)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/sbin/mysqld...Reading symbols from /usr/lib/debug/usr/sbin/mysqld.debug...done.
done.
r(gdb) run
Starting program: /usr/sbin/mysqld --user=mysql
[Thread debugging using libthread_db enabled]
[New Thread 0x7ffff7fea700 (LWP 2700)]
[Thread 0x7ffff7fea700 (LWP 2700) exited]
121210 15:29:15 [Warning] The syntax '--log-slow-queries' is deprecated and will be removed in a future release. Please use '--slow-query-log'/'--slow-query-log-file' instead.
121210 15:29:15 [Note] Flashcache bypass: disabled
121210 15:29:15 [Note] Flashcache setup error is : ioctl failed
121210 15:29:15 [Warning] option 'innodb-log-files-in-group': signed value 1 adjusted to 2
121210 15:29:15 [Note] Plugin 'FEDERATED' is disabled.
121210 15:29:15 InnoDB: The InnoDB memory heap is disabled
121210 15:29:15 InnoDB: Mutexes and rw_locks use GCC atomic builtins
121210 15:29:15 InnoDB: Compressed tables use zlib 1.2.3
121210 15:29:15 InnoDB: Using Linux native AIO
121210 15:29:15 InnoDB: Initializing buffer pool, size = 500.0M
121210 15:29:15 InnoDB: Completed initialization of buffer pool
[New Thread 0x7ffff7fea700 (LWP 2701)]
[New Thread 0x7fffcb7ee700 (LWP 2702)]
[New Thread 0x7fffcaded700 (LWP 2703)]
[New Thread 0x7fffca3ec700 (LWP 2704)]
[New Thread 0x7fffc99eb700 (LWP 2705)]
[New Thread 0x7fffc8fea700 (LWP 2706)]
[New Thread 0x7fffc85e9700 (LWP 2707)]
[New Thread 0x7fffc7be8700 (LWP 2708)]
[New Thread 0x7fffc71e7700 (LWP 2709)]
[New Thread 0x7fffc67e6700 (LWP 2710)]
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
121210 15:29:15 InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
121210 15:29:15 InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 2048 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Progress in MB: 100 200 300 400 500 600 700 800 900
Program received signal SIGXFSZ, File size limit exceeded.
0x00000037e3c0eec3 in pwrite64 () from /lib64/libpthread.so.0
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.80.el6_3.5.x86_64 libaio-0.3.107-10.el6.x86_64 libgcc-4.4.6-4.el6.x86_64 nss-softokn-freebl-3.12.9-11.el6.x86_64
(gdb) bt
#0 0x00000037e3c0eec3 in pwrite64 () from /lib64/libpthread.so.0
#1 0x0000000000902219 in os_file_pwrite (name=0x7fffffffac00 "./ib_logfile0", file=8, buf=0x24e0000, offset=1023410176, offset_high=0, n=1048576)
at /usr/src/debug/Percona-Server-5.5.27-rel28.1/Percona-Server-5.5.27-rel28.1/storage/innobase/os/os0file.c:2402
#2 os_file_write_func (name=0x7fffffffac00 "./ib_logfile0", file=8, buf=0x24e0000, offset=1023410176, offset_high=0, n=1048576)
at /usr/src/debug/Percona-Server-5.5.27-rel28.1/Percona-Server-5.5.27-rel28.1/storage/innobase/os/os0file.c:2920
#3 0x000000000090405c in pfs_os_file_write_func (name=0x7fffffffac00 "./ib_logfile0", file=8, size=<value optimized out>, size_high=<value optimized out>)
at /usr/src/debug/Percona-Server-5.5.27-rel28.1/Percona-Server-5.5.27-rel28.1/storage/innobase/include/os0file.ic:357
#4 os_file_set_size (name=0x7fffffffac00 "./ib_logfile0", file=8, size=<value optimized out>, size_high=<value optimized out>)
at /usr/src/debug/Percona-Server-5.5.27-rel28.1/Percona-Server-5.5.27-rel28.1/storage/innobase/os/os0file.c:1994
#5 0x000000000083d881 in open_or_create_log_file () at /usr/src/debug/Percona-Server-5.5.27-rel28.1/Percona-Server-5.5.27-rel28.1/storage/innobase/srv/srv0start.c:657
#6 innobase_start_or_create_for_mysql () at /usr/src/debug/Percona-Server-5.5.27-rel28.1/Percona-Server-5.5.27-rel28.1/storage/innobase/srv/srv0start.c:1679
#7 0x00000000007fe2a8 in innobase_init (p=<value optimized out>) at /usr/src/debug/Percona-Server-5.5.27-rel28.1/Percona-Server-5.5.27-rel28.1/storage/innobase/handler/ha_innodb.cc:3015
#8 0x0000000000689e08 in ha_initialize_handlerton (plugin=0x1322e80) at /usr/src/debug/Percona-Server-5.5.27-rel28.1/Percona-Server-5.5.27-rel28.1/sql/handler.cc:576
#9 0x00000000005946ea in plugin_initialize (plugin=0x1322e80) at /usr/src/debug/Percona-Server-5.5.27-rel28.1/Percona-Server-5.5.27-rel28.1/sql/sql_plugin.cc:1100
#10 0x0000000000598c0d in plugin_init (argc=0x105e928, argv=0x12e1258, flags=0) at /usr/src/debug/Percona-Server-5.5.27-rel28.1/Percona-Server-5.5.27-rel28.1/sql/sql_plugin.cc:1386
#11 0x000000000051856a in init_server_components () at /usr/src/debug/Percona-Server-5.5.27-rel28.1/Percona-Server-5.5.27-rel28.1/sql/mysqld.cc:3950
#12 0x000000000051c07d in mysqld_main (argc=35, argv=0x12e1258) at /usr/src/debug/Percona-Server-5.5.27-rel28.1/Percona-Server-5.5.27-rel28.1/sql/mysqld.cc:4672
#13 0x00000037e381ecdd in __libc_start_main () from /lib64/libc.so.6
#14 0x00000000005118b9 in _start ()
This requires both EFBIG (in os_file_write_func to print the name of the file) and SIGXFSZ
(since this kills the process before anything can be printed) to
be handled.
Another way to trigger is to use limits.
"""
operation would cause this limit to be exceeded,
SIGXFSZ shall be generated for the
thread. If the thread is blocking, or the process
beyond the limit shall fail with errno
RLIMIT_FSIZE
This is the maximum size of a file, in bytes, that
may be created by a process. If a write or truncate
is catching or ignoring SIGXFSZ, continued attempts
to increase the size of a file from end-of-file to
set to [EFBIG].
"""
So, SIGXFSZ is delivered and the errno should be EFBIG in this
case.
As per the report, there is no error printed and/or not handled
gracefully.
Added
"* hard fsize 1000000" to limits file
and then set innodb_ log_file_ size to 2048M.
Following is the gdb backtrace:
======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ==
sudo gdb --args mysqld --user=mysql gnu.org/ licenses/ gpl.html> redhat- linux-gnu" . www.gnu. org/software/ gdb/bugs/>... mysqld. ..Reading symbols from /usr/lib/ debug/usr/ sbin/mysqld. debug.. .done. slow-queries' is deprecated and will be removed in a future release. Please use '--slow- query-log' /'--slow- query-log- file' instead.
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-56.el6)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-
For bug reporting instructions, please see:
<http://
Reading symbols from /usr/sbin/
done.
r(gdb) run
Starting program: /usr/sbin/mysqld --user=mysql
[Thread debugging using libthread_db enabled]
[New Thread 0x7ffff7fea700 (LWP 2700)]
[Thread 0x7ffff7fea700 (LWP 2700) exited]
121210 15:29:15 [Warning] The syntax '--log-
121210 15:29:15 [Note] Flashcache bypass: disabled
121210 15:29:15 [Note] Flashcache setup error is : ioctl failed
121210 15:29:15 [Warning] option 'innodb- log-files- in-group' : signed value 1 adjusted to 2 libpthread. so.0 12-1.80. el6_3.5. x86_64 libaio- 0.3.107- 10.el6. x86_64 libgcc- 4.4.6-4. el6.x86_ 64 nss-softokn- freebl- 3.12.9- 11.el6. x86_64 libpthread. so.0 fac00 "./ib_logfile0", file=8, buf=0x24e0000, offset=1023410176, offset_high=0, n=1048576) debug/Percona- Server- 5.5.27- rel28.1/ Percona- Server- 5.5.27- rel28.1/ storage/ innobase/ os/os0file. c:2402 fac00 "./ib_logfile0", file=8, buf=0x24e0000, offset=1023410176, offset_high=0, n=1048576) debug/Percona- Server- 5.5.27- rel28.1/ Percona- Server- 5.5.27- rel28.1/ storage/ innobase/ os/os0file. c:2920 file_write_ func (name=0x7ffffff fac00 "./ib_logfile0", file=8, size=<value optimized out>, size_high=<value optimized out>) debug/Percona- Server- 5.5.27- rel28.1/ Percona- Server- 5.5.27- rel28.1/ storage/ innobase/ include/ os0file. ic:357 fac00 "./ib_logfile0", file=8, size=<value optimized out>, size_high=<value optimized out>) debug/Percona- Server- 5.5.27- rel28.1/ Percona- Server- 5.5.27- rel28.1/ storage/ innobase/ os/os0file. c:1994 create_ log_file () at /usr/src/ debug/Percona- Server- 5.5.27- rel28.1/ Percona- Server- 5.5.27- rel28.1/ storage/ innobase/ srv/srv0start. c:657 start_or_ create_ for_mysql () at /usr/src/ debug/Percona- Server- 5.5.27- rel28.1/ Percona- Server- 5.5.27- rel28.1/ storage/ innobase/ srv/srv0start. c:1679 debug/Percona- Server- 5.5.27- rel28.1/ Percona- Server- 5.5.27- rel28.1/ storage/ innobase/ handler/ ha_innodb. cc:3015 handlerton (plugin=0x1322e80) at /usr/src/ debug/Percona- Server- 5.5.27- rel28.1/ Percona- Server- 5.5.27- rel28.1/ sql/handler. cc:576 debug/Percona- Server- 5.5.27- rel28.1/ Percona- Server- 5.5.27- rel28.1/ sql/sql_ plugin. cc:1100 debug/Percona- Server- 5.5.27- rel28.1/ Percona- Server- 5.5.27- rel28.1/ sql/sql_ plugin. cc:1386 components () at /usr/src/ debug/Percona- Server- 5.5.27- rel28.1/ Percona- Server- 5.5.27- rel28.1/ sql/mysqld. cc:3950 debug/Percona- Server- 5.5.27- rel28.1/ Percona- Server- 5.5.27- rel28.1/ sql/mysqld. cc:4672
121210 15:29:15 [Note] Plugin 'FEDERATED' is disabled.
121210 15:29:15 InnoDB: The InnoDB memory heap is disabled
121210 15:29:15 InnoDB: Mutexes and rw_locks use GCC atomic builtins
121210 15:29:15 InnoDB: Compressed tables use zlib 1.2.3
121210 15:29:15 InnoDB: Using Linux native AIO
121210 15:29:15 InnoDB: Initializing buffer pool, size = 500.0M
121210 15:29:15 InnoDB: Completed initialization of buffer pool
[New Thread 0x7ffff7fea700 (LWP 2701)]
[New Thread 0x7fffcb7ee700 (LWP 2702)]
[New Thread 0x7fffcaded700 (LWP 2703)]
[New Thread 0x7fffca3ec700 (LWP 2704)]
[New Thread 0x7fffc99eb700 (LWP 2705)]
[New Thread 0x7fffc8fea700 (LWP 2706)]
[New Thread 0x7fffc85e9700 (LWP 2707)]
[New Thread 0x7fffc7be8700 (LWP 2708)]
[New Thread 0x7fffc71e7700 (LWP 2709)]
[New Thread 0x7fffc67e6700 (LWP 2710)]
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
121210 15:29:15 InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
121210 15:29:15 InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 2048 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Progress in MB: 100 200 300 400 500 600 700 800 900
Program received signal SIGXFSZ, File size limit exceeded.
0x00000037e3c0eec3 in pwrite64 () from /lib64/
Missing separate debuginfos, use: debuginfo-install glibc-2.
(gdb) bt
#0 0x00000037e3c0eec3 in pwrite64 () from /lib64/
#1 0x0000000000902219 in os_file_pwrite (name=0x7ffffff
at /usr/src/
#2 os_file_write_func (name=0x7ffffff
at /usr/src/
#3 0x000000000090405c in pfs_os_
at /usr/src/
#4 os_file_set_size (name=0x7ffffff
at /usr/src/
#5 0x000000000083d881 in open_or_
#6 innobase_
#7 0x00000000007fe2a8 in innobase_init (p=<value optimized out>) at /usr/src/
#8 0x0000000000689e08 in ha_initialize_
#9 0x00000000005946ea in plugin_initialize (plugin=0x1322e80) at /usr/src/
#10 0x0000000000598c0d in plugin_init (argc=0x105e928, argv=0x12e1258, flags=0) at /usr/src/
#11 0x000000000051856a in init_server_
#12 0x000000000051c07d in mysqld_main (argc=35, argv=0x12e1258) at /usr/src/
#13 0x00000037e381ecdd in __libc_start_main () from /lib64/libc.so.6
#14 0x00000000005118b9 in _start ()
======= ======= ======= ======= ======= ======= ======= =====
This requires both EFBIG (in os_file_write_func to print the name of the file) and SIGXFSZ
(since this kills the process before anything can be printed) to
be handled.