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

LP:884728 - [ERROR] mysqld: Aria engine: log initialization failed

Details

    Description

      MariaDB failed to start on one of our systems:

      Nov  1 13:35:03 server1 mysqld_safe: Starting mysqld daemon with databases from /var/lib/mysql
      Nov  1 13:35:03 server1 mysqld: 111101 13:35:03 [Warning] 'master-host' is deprecated and will be removed in a future release. Please use ''CHANGE MASTER'' instead.
      Nov  1 13:35:03 server1 mysqld: 111101 13:35:03 [Note] Plugin 'BLACKHOLE' is disabled.
      Nov  1 13:35:03 server1 mysqld: 111101 13:35:03 [Note] Plugin 'CSV' is disabled.
      Nov  1 13:35:03 server1 mysqld: 111101 13:35:03 [Note] Plugin 'FEDERATED' is disabled.
      Nov  1 13:35:03 server1 mysqld: 111101 13:35:03 [ERROR] mysqld: Aria engine: log initialization failed
      Nov  1 13:35:03 server1 mysqld: 111101 13:35:03 [ERROR] Plugin 'Aria' init function returned error.
      Nov  1 13:35:03 server1 mysqld: 111101 13:35:03 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
      Nov  1 13:35:03 server1 mysqld: 111101 13:35:03 [ERROR] Failed to initialize plugins.
      Nov  1 13:35:03 server1 mysqld: 111101 13:35:03 [ERROR] Aborting
      Nov  1 13:35:03 server1 mysqld: 
      Nov  1 13:35:03 server1 mysqld: 111101 13:35:03 [Note] /usr/sbin/mysqld: Shutdown complete
      Nov  1 13:35:03 server1 mysqld: 
      Nov  1 13:35:03 server1 mysqld_safe: mysqld from pid file /var/run/mysqld/mysqld.pid ended

      Removing /var/lib/mysql/aria* allowed MariaDB to start again. I'll upload the corrupt Aria files to FTP (we verified on another system that it indeed fails to start with those files).

      Attachments

        Activity

          Re: [ERROR] mysqld: Aria engine: log initialization failed
          Exactly the same Aria bug occurred on another server after a storage issue. Removing the aria_log_control file allowed MariaDB 5.2.9 to start again. I'll upload another collection of data files to FTP.

          dreasvandonselaar Dreas van Donselaar (Inactive) added a comment - Re: [ERROR] mysqld: Aria engine: log initialization failed Exactly the same Aria bug occurred on another server after a storage issue. Removing the aria_log_control file allowed MariaDB 5.2.9 to start again. I'll upload another collection of data files to FTP.

          Launchpad bug id: 884728

          ratzpo Rasmus Johansson (Inactive) added a comment - Launchpad bug id: 884728

          The problem can still be seen while trying to read logs:

          • unpack launchpad_884728_by_Dreas_example_2.tgz,
          • cd to the created 'aria' folder,
          • run aria_read_log.
            A non-debug version fails with "Aria engine: log initialization failed .. Can't init loghandler (0)"; a debug version fails with "translog_init_with_table: Assertion `sure_page <= last_page' failed".

          However, there is no indication of how the corrupted logs were produced. Knowing the history, chances are that it happened due to a power failure or a hardware failure. I suppose if we want to do anything at all about the bug, it's to check that the failure is really caused by the log being corrupted and not by the contents.

          elenst Elena Stepanova added a comment - The problem can still be seen while trying to read logs: unpack launchpad_884728_by_Dreas_example_2.tgz, cd to the created 'aria' folder, run aria_read_log. A non-debug version fails with "Aria engine: log initialization failed .. Can't init loghandler (0)"; a debug version fails with "translog_init_with_table: Assertion `sure_page <= last_page' failed". However, there is no indication of how the corrupted logs were produced. Knowing the history, chances are that it happened due to a power failure or a hardware failure. I suppose if we want to do anything at all about the bug, it's to check that the failure is really caused by the log being corrupted and not by the contents.
          elenst Elena Stepanova added a comment - - edited

          The problem with a mysteriously corrupt control file has been seen by a user again, in 10.1; thus re-opening (previously it was closed as a possible duplicate of MDEV-727, but that one is about a debug assertion failure, so we cannot be certain it is the same).

          elenst Elena Stepanova added a comment - - edited The problem with a mysteriously corrupt control file has been seen by a user again, in 10.1; thus re-opening (previously it was closed as a possible duplicate of MDEV-727 , but that one is about a debug assertion failure, so we cannot be certain it is the same).

          Tried to reproduce this with the given logs, but worked in 10.1 for me.

          Without an log that allows me to reproduce this or access to a machine
          that fail, it's not much that I can do

          monty Michael Widenius added a comment - Tried to reproduce this with the given logs, but worked in 10.1 for me. Without an log that allows me to reproduce this or access to a machine that fail, it's not much that I can do
          claudio.nanni Claudio Nanni added a comment -

          Seen again in 10.1.33

          claudio.nanni Claudio Nanni added a comment - Seen again in 10.1.33
          elenst Elena Stepanova added a comment - - edited

          I'm not sure why it wasn't reproducible for monty, I'm still getting the same assertion on the same data with the current 10.1:

          10.1 3627dd7f6 debug

          elenst@ws:/data/bld/10.1/aria$ ../bin/aria_read_log -d
          aria_read_log: /data/src/10.1/storage/maria/ma_loghandler.c:3815: translog_init_with_table: Assertion `sure_page <= last_page' failed.
          Aborted (core dumped)
           
          Thread 1 (Thread 0x7efe3ab515c0 (LWP 18493)):
          #0  0x00007efe390aafcf in raise () from /lib/x86_64-linux-gnu/libc.so.6
          #1  0x00007efe390ac3fa in abort () from /lib/x86_64-linux-gnu/libc.so.6
          #2  0x00007efe390a3e37 in __assert_fail_base () from /lib/x86_64-linux-gnu/libc.so.6
          #3  0x00007efe390a3ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
          #4  0x000056318fb47aa1 in translog_init_with_table (directory=0x56318fc8c377 ".", log_file_max_size=1073741824, server_version=0, server_id=0, pagecache=0x5631909e4400 <maria_log_pagecache_var>, flags=0, readonly=1 '\001', init_table_func=0x56318fb3ecc3 <translog_table_init>, no_errors=0 '\000') at /data/src/10.1/storage/maria/ma_loghandler.c:3815
          #5  0x000056318fb1d2aa in main (argc=0, argv=0x5631926341b0) at /data/src/10.1/storage/maria/maria_read_log.c:87
          

          However, now non-debug version produces an additional more descriptive error message:

          $ /data/bld/10.1-rel/bin/aria_read_log -d
          /data/bld/10.1-rel/bin/aria_read_log: Unexpected end-of-file found when reading file './aria_log.00000005' (Errcode: 175 "File too short; Expected more data in file")
          /data/bld/10.1-rel/bin/aria_read_log: Aria engine: log initialization failed
          Can't init loghandler (0)
          aria_read_log: FAILED
          

          elenst Elena Stepanova added a comment - - edited I'm not sure why it wasn't reproducible for monty , I'm still getting the same assertion on the same data with the current 10.1: 10.1 3627dd7f6 debug elenst@ws:/data/bld/10.1/aria$ ../bin/aria_read_log -d aria_read_log: /data/src/10.1/storage/maria/ma_loghandler.c:3815: translog_init_with_table: Assertion `sure_page <= last_page' failed. Aborted (core dumped)   Thread 1 (Thread 0x7efe3ab515c0 (LWP 18493)): #0 0x00007efe390aafcf in raise () from /lib/x86_64-linux-gnu/libc.so.6 #1 0x00007efe390ac3fa in abort () from /lib/x86_64-linux-gnu/libc.so.6 #2 0x00007efe390a3e37 in __assert_fail_base () from /lib/x86_64-linux-gnu/libc.so.6 #3 0x00007efe390a3ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6 #4 0x000056318fb47aa1 in translog_init_with_table (directory=0x56318fc8c377 ".", log_file_max_size=1073741824, server_version=0, server_id=0, pagecache=0x5631909e4400 <maria_log_pagecache_var>, flags=0, readonly=1 '\001', init_table_func=0x56318fb3ecc3 <translog_table_init>, no_errors=0 '\000') at /data/src/10.1/storage/maria/ma_loghandler.c:3815 #5 0x000056318fb1d2aa in main (argc=0, argv=0x5631926341b0) at /data/src/10.1/storage/maria/maria_read_log.c:87 However, now non-debug version produces an additional more descriptive error message: $ /data/bld/10.1-rel/bin/aria_read_log -d /data/bld/10.1-rel/bin/aria_read_log: Unexpected end-of-file found when reading file './aria_log.00000005' (Errcode: 175 "File too short; Expected more data in file") /data/bld/10.1-rel/bin/aria_read_log: Aria engine: log initialization failed Can't init loghandler (0) aria_read_log: FAILED

          Probably problem with the operating system. Issue disappeared after OS update

          monty Michael Widenius added a comment - Probably problem with the operating system. Issue disappeared after OS update

          People

            monty Michael Widenius
            dreasvandonselaar Dreas van Donselaar (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.