Bug #64345 | mysqld crashes on shutdown when slow log is a pipe | ||
---|---|---|---|
Submitted: | 15 Feb 2012 17:02 | Modified: | 5 Jun 2012 16:26 |
Reporter: | Jaroslav Nadenicek | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Logging | Severity: | S3 (Non-critical) |
Version: | 5.5.20 | OS: | Linux |
Assigned to: | CPU Architecture: | Any | |
Tags: | 5.1.62 |
[15 Feb 2012 17:02]
Jaroslav Nadenicek
[16 Feb 2012 12:57]
Sveta Smirnova
Thank you for the report. Verified, although mysqld hangs at startup when I try to use pipe, then crashes after I try to read this pipe. Crash information in 5.5: ./bin/mysqld: Can't seek in file '/tmp/testpipe' (Errcode: 29) mysqld: /home/sveta/src/mysql-5.5/mysys/mf_iocache.c:180: init_io_cache: Assertion `seek_offset == 0' failed. 12:55:32 UTC - mysqld got signal 6 ; ... Thread pointer: 0x0 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... stack_bottom = 0 thread_stack 0x20000 ./bin/mysqld(my_print_stacktrace+0x35)[0x8ceba1] ./bin/mysqld(handle_fatal_signal+0x408)[0x75931c] /lib64/libpthread.so.0[0x31d780f520] /lib64/libc.so.6(gsignal+0x35)[0x31d7432a45] /lib64/libc.so.6(abort+0x175)[0x31d7434225] /lib64/libc.so.6(__assert_fail+0xf5)[0x31d742b9d5] ./bin/mysqld(init_io_cache+0x18f)[0x8aff14] ./bin/mysqld(_ZN9MYSQL_LOG4openEjPKc13enum_log_typeS1_10cache_type+0x22c)[0x801cb0] ./bin/mysqld(_ZN15MYSQL_QUERY_LOG13open_slow_logEPKc+0x77)[0x6f3d17] ./bin/mysqld(_ZN25Log_to_file_event_handler4initEv+0x4c)[0x7fed9e] ./bin/mysqld(_ZN6LOGGER15init_log_tablesEv+0x8c)[0x7ff182] ./bin/mysqld[0x55a928] ./bin/mysqld(_Z11mysqld_mainiPPc+0x503)[0x55b582] ./bin/mysqld(main+0x20)[0x5543c4] /lib64/libc.so.6(__libc_start_main+0xfd)[0x31d741ec9d] ./bin/mysqld[0x5542e9] The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains information that should help you find out what is causing the crash.
[16 Feb 2012 17:15]
Jaroslav Nadenicek
Yes, I know that mysqld hangs on startup when slow log is a pipe and no one is reading from it - since man 7 fifo says "Normally, opening the FIFO blocks until the other end is opened also.", I didn't consider it as a bug. Moreover in my case mysqld starts correctly when I open the pipe for reading (see times in log below) and I'm trying to open the pipe for reading first anyway, so startup behaviour isn't a problem for me. 120216 17:51:16 [Note] Plugin 'FEDERATED' is disabled. 120216 17:51:16 InnoDB: The InnoDB memory heap is disabled 120216 17:51:16 InnoDB: Mutexes and rw_locks use GCC atomic builtins 120216 17:51:16 InnoDB: Compressed tables use zlib 1.2.3.4 120216 17:51:16 InnoDB: Using Linux native AIO 120216 17:51:16 InnoDB: Initializing buffer pool, size = 512.0M 120216 17:51:16 InnoDB: Completed initialization of buffer pool 120216 17:51:16 InnoDB: highest supported file format is Barracuda. 120216 17:51:16 InnoDB: Waiting for the background threads to start 120216 17:51:17 InnoDB: 1.1.8 started; log sequence number 1595675 /usr/sbin/mysqld: Can't seek in file '/var/log/mysql/slow_query.pipe' (Errcode: 29) 120216 17:51:59 [Note] Event Scheduler: Loaded 0 events 120216 17:51:59 [Note] /usr/sbin/mysqld: ready for connections. Version: '5.5.20-1~dotdeb.0-log' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Debian)
[5 Jun 2012 16:26]
Paul DuBois
Noted in 5.6.6 changelog. The server crashed at shutdown if the slow query log file was a named pipe.