Details
-
Bug
-
Status: Needs Feedback (View Workflow)
-
Critical
-
Resolution: Unresolved
-
11.4.4, 11.4.5, 10.5, 10.6, 10.11
-
None
-
Linux LibreELEC
Description
With 11.4.3 the server starts correctly with a 256K thread_stack but with 11.4.4 and 11.4.5 the error of 8M is occurring. This was reported by one of our users when we updated the package from 11.4.3 to 11.4.5. We have subsequently tested the builds and if was introduced in 11.4.4, rolling back to 11.4.3 (with no other changes to the development and runtime environment allows this to be reproduced.)
https://github.com/LibreELEC/LibreELEC.tv/pull/9776
https://forum.libreelec.tv/thread/29487-mariadb-addon-not-starting/
2025-02-09 12:24:24 0 [Note] Starting MariaDB 11.4.5-MariaDB source revision 0771110266ff5c04216af4bf1243c65f8c67ccf4 server_uid InfkWh78H903mx/MLA8UkYYTjsY= as process 3504997
|
2025-02-09 12:24:24 0 [Note] InnoDB: Compressed tables use zlib 1.3.1
|
2025-02-09 12:24:24 0 [Note] InnoDB: Number of transaction pools: 1
|
2025-02-09 12:24:24 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
|
2025-02-09 12:24:24 0 [Note] InnoDB: Using Linux native AIO
|
2025-02-09 12:24:24 0 [Note] InnoDB: Initializing buffer pool, total size = 256.000MiB, chunk size = 4.000MiB
|
2025-02-09 12:24:24 0 [Note] InnoDB: Completed initialization of buffer pool
|
2025-02-09 12:24:24 0 [Note] InnoDB: File system buffers for log disabled (block size=512 bytes)
|
2025-02-09 12:24:24 0 [Note] InnoDB: End of log at LSN=481118
|
2025-02-09 12:24:24 0 [Note] InnoDB: Opened 3 undo tablespaces
|
2025-02-09 12:24:24 0 [Note] InnoDB: 128 rollback segments in 3 undo tablespaces are active.
|
2025-02-09 12:24:24 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
|
2025-02-09 12:24:24 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
|
2025-02-09 12:24:24 0 [Note] InnoDB: log sequence number 481118; transaction id 941
|
2025-02-09 12:24:24 0 [Note] Plugin 'FEEDBACK' is disabled.
|
2025-02-09 12:24:24 0 [Note] Plugin 'wsrep-provider' is disabled.
|
2025-02-09 12:24:24 0 [Note] InnoDB: Loading buffer pool(s) from /storage/.kodi/userdata/addon_data/service.mariadb/data/ib_buffer_pool
|
2025-02-09 12:24:24 0 [ERROR] Could not open mysql.plugin table: "Thread stack overrun: 8366744 bytes used of a 299008 byte stack, and 81920 bytes needed. Consider increasing the thread_stack system variable.". Some plugins may be not loaded
|
2025-02-09 12:24:24 0 [Note] InnoDB: Buffer pool(s) load completed at 250209 12:24:24
|
2025-02-09 12:24:24 0 [ERROR] Can't open and lock privilege tables: Thread stack overrun: 8368904 bytes used of a 299008 byte stack, and 81920 bytes needed. Consider increasing the thread_stack system variable.
|
2025-02-09 12:24:24 0 [Note] Server socket created on IP: '0.0.0.0'.
|
2025-02-09 12:24:24 0 [Note] Server socket created on IP: '::'.
|
2025-02-09 12:24:24 0 [ERROR] Fatal error: Can't open and lock privilege tables: Thread stack overrun: 8348984 bytes used of a 299008 byte stack, and 81920 bytes needed. Consider increasing the thread_stack system variable.
|
2025-02-09 12:24:24 0 [ERROR] Aborting
|
Thanks for the report.
I could reproduce it on a LibreELEC installation.
The minimal required thread_stack size there just to start MariaDB appears to be ~12M with otherwise default settings, but it doesn't work anyway, even the simple queries throw the error
MariaDB [(none)]> select @@thread_stack;
ERROR 1436 (HY000): Thread stack overrun: 12575864 bytes used of a 12582912 byte stack, and 32000 bytes needed. Consider increasing the thread_stack system variable.
and with 15M it just becomes
MariaDB [(none)]> select @@thread_stack;
ERROR 1436 (HY000): Thread stack overrun: 15721592 bytes used of a 15728640 byte stack, and 32000 bytes needed. Consider increasing the thread_stack system variable.
I suppose the main suspect is
commit bddbef3573349b0565c43c27beba47c89358f39f
Author: Monty
Date: Tue Oct 1 17:07:48 2024 +0300
MDEV-34533 asan error about stack overflow when writing record in Aria
which brought a lot of changes to thread stack handling.
heitbaum,
Could you please advise (or point at the right online sources maybe) how to build/install a custom version of MariaDB in LibreELEC, which we may need to do in order to verify the fix when it's available?
I've installed MariaDB as an Add-on, and I see several builds in the add-on repository, but so far I can't see how to install any other build apart from the listed ones.