Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-3697

LP:952714 - Broken timestamp in signal handler logging

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • None
    • None
    • None

    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.

      Attachments

        Activity

          People

            wlad Vladislav Vaintroub
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.