[MDEV-583] LP:884728 - [ERROR] mysqld: Aria engine: log initialization failed Created: 2011-11-01  Updated: 2021-04-26  Resolved: 2020-10-15

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - Aria
Affects Version/s: 10.0.0, 5.5.28, 5.3.9, 5.5, 10.0, 10.1
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Dreas van Donselaar (Inactive) Assignee: Michael Widenius
Resolution: Cannot Reproduce Votes: 0
Labels: Aria, Launchpad

Attachments: XML File LPexportBug884728.xml    

 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).



 Comments   
Comment by Dreas van Donselaar (Inactive) [ 2011-11-11 ]

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.

Comment by Rasmus Johansson (Inactive) [ 2011-12-01 ]

Launchpad bug id: 884728

Comment by Elena Stepanova [ 2012-11-04 ]

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.

Comment by Elena Stepanova [ 2017-08-30 ]

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).

Comment by Michael Widenius [ 2018-05-21 ]

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

Comment by Claudio Nanni [ 2018-06-06 ]

Seen again in 10.1.33

Comment by Elena Stepanova [ 2018-06-08 ]

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

Comment by Michael Widenius [ 2020-10-15 ]

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

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