Broken timestamp in signal handler logging

Bug #952714 reported by Elena Stepanova
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
Fix Released
Medium
Vladislav Vaintroub

Bug Description

Timestamp which precedes log record '[ERROR] mysqld got signal 6' is broken:

Version: '5.3.5-MariaDB-ga' socket: '/tmp/mysql.sock' port: 3306 (MariaDB - http://mariadb.com/)
2d2d2d d:2d:2d [ERROR] mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary

It worked fine on 5.3.4 and 5.2.10, but not on 5.3.5 or the current trees.

There was a code change which, besides moving the logging from mysqld.cc to signal_handler.cc, also replaced fprintf with my_safe_printf_stderr. It seems that the latter does not work well with the timestamp template "%02d%02d%02d %2d:%02d:%02d ".

To reproduce,
- start MariaDB server (run mysqld with whatever parameters you normally use);
- send a signal that causes server to attempt a coredump (e.g. run 'kill -6 <server pid>');
- in STDERR/console or error log file, depending on your settings, find the record 'mysqld got signal', see the timestamp.

Reproducible on recent 5.1 (revno 3133), 5.2 (revno 3122), 5.3 (revno 3455), 5.5 (revno 3316).

It is mainly a cosmetic bug, but becomes somewhat painful when you need to find out from the error log at what time exactly the server crashed.

Related branches

Changed in maria:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.