Bug #67088 | When the general_log is a socket and the reader goes away, mysql quits working. | ||
---|---|---|---|
Submitted: | 4 Oct 2012 18:47 | Modified: | 28 Aug 2014 17:34 |
Reporter: | Rolf Martin-Hoster | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Logging | Severity: | S2 (Serious) |
Version: | 5.1.54, 5.1.67, 5.5.29, 5.7.0 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[4 Oct 2012 18:47]
Rolf Martin-Hoster
[12 Oct 2012 18:55]
Sveta Smirnova
Thank you for the report. Verified as described. Repeatable with release server only: debug server crashes like in bug #59847
[28 Aug 2014 17:34]
Paul DuBois
Noted in 5.5.40, 5.6.21, 5.7.5 changelogs. If the general query log or slow query log file was set to a FIFO or socket file, and the file reader went away, the server stopped executing statements. Now the server detects such files, logs an error message, and continues with the appropriate log disabled.
[24 Sep 2014 7:36]
Laurynas Biveinis
revno: 4688 committer: Praveenkumar Hulakund <praveenkumar.hulakund@oracle.com> branch nick: mysql-5.5 timestamp: Thu 2014-07-17 11:21:18 +0530 message: Bug#14757009: WHEN THE GENERAL_LOG IS A SOCKET AND THE READER GOES AWAY, MYSQL QUITS WORKING. Analysis: ----------------- Issue in this bug and in bug 11907705 is, the socket file or fifo file is set for general log at command line while starting the server. But currently, only regular file can be set for the general log. Instead of reporting any error, the provided files are opened for writing and continued. Because of this issues mentioned in the bug reports are seen. As mentioned, only when any non-regular file is set for general log at command line while starting the server, these issues are seen. If general log file is set to non-regular file from CLI using system variable general_log_file then error is reported. These issues can also be faced with slow query log file, if it is set to non-regular file. Fix: ----------------- Currently while starting the server if we fail to open log file then we report an error, disable logging to file and continue. To fix issue reported code is modified to check whether file is regular file or not before opening it. If file is not a regular file then error is logged to error log and logging to file is disabled.