[MDEV-3697] LP:952714 - Broken timestamp in signal handler logging Created: 2012-03-12  Updated: 2015-02-02  Resolved: 2012-10-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Vladislav Vaintroub
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug952714.xml    

 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.



 Comments   
Comment by Rasmus Johansson (Inactive) [ 2012-03-12 ]

Launchpad bug id: 952714

Generated at Thu Feb 08 06:50:32 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.