All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Ziegler <br025@umbiko.net>
To: Horst Noecker <horst.noecker@cellomation.de>
Cc: buildroot <buildroot@buildroot.org>
Subject: Re: [Buildroot] MariaDB 11 for buildroot
Date: Fri, 29 Aug 2025 13:43:53 +0000	[thread overview]
Message-ID: <3e12388749cbcd8ce616e1f930701d6d@umbiko.net> (raw)
In-Reply-To: <f5f522d0-8f20-4cb1-b7c5-0cbd805ce646@cellomation.de>

Dear Horst, Nicolas, All,

I ran some tests using the 'stable' mariadb versions on a rather ancient 
RPi 4 (Rev1.3). The daemon starts, but aborts due to missing 
configurations and not enough space on the root filesystem. Log entries 
for the versions were fairly consistent (example below).

The system is headless, rather bleeding-edge, and uses musl as standard 
library ...

On 2025-08-27 15:54, Horst Noecker wrote:
> Dear Andreas and Nicolas,
> 
> 
> I'm using glibc.
> 
> Furthermore: Maria 10.11.11 and 11.4.8 work with arm32 - Maria 10.11.11 
> works with aarch64 and only Maria 11.4.8 (and 11.8.2 and 11.4.7) give a 
> sigsegv when trying to start.
> 

stable release  smoke test results
       10.11.14  OK
       11.4.8    OK
       11.8.3    OK
       12.0.2    OK

Some patches were necessary for the build:
   all: missing header file
   11,12: try_run used in CMAKE_CROSSCOMPILING mode
   remove COLUMNSTORE from host build (see also [1])

The interesting parts of the defconfig:
   BR2_aarch64=y
   BR2_cortex_a72=y
   BR2_TOOLCHAIN_BUILDROOT_MUSL=y
   BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_16=y
   BR2_BINUTILS_VERSION_2_44_X=y
   BR2_GCC_VERSION_15_X=y
   BR2_TOOLCHAIN_BUILDROOT_CXX=y
   # BR2_PIC_PIE is not set
   BR2_SSP_NONE=y
   BR2_RELRO_NONE=y
   ...
   BR2_PACKAGE_MARIADB=y
   BR2_PACKAGE_MARIADB_SERVER=y

Kernel: 6.17.0-rc3-rt1
Init system: Busybox w/ mdev

Start sequence:
[nabla]# /etc/init.d/S97mysqld start
Starting mysql ... FAIL
[nabla]# cat /tmp/mysql/mysqld.log
250829 11:42:07 mysqld_safe Starting mariadbd daemon with databases from 
/var/lib/mysql
2025-08-29 11:42:07 0 [Note] Starting MariaDB 12.0.2-MariaDB source 
revision aab83aecdca15738d114cf5a2f223f1d12e4e6bd server_uid 
BwSs9p0iC7M6snGTru568oZhReU= as process 790
2025-08-29 11:42:07 0 [ERROR] mariadbd: File 
'/var/lib/mysql/aria_log_control' not found (Errcode: 13 "Permission 
denied")
2025-08-29 11:42:07 0 [ERROR] mariadbd: Got error 'Can't open file' when 
trying to use aria control file '/var/lib/mysql/aria_log_control'
2025-08-29 11:42:07 0 [ERROR] Plugin 'Aria' registration as a STORAGE 
ENGINE failed.
2025-08-29 11:42:07 0 [Note] InnoDB: The first data file './ibdata1' did 
not exist. A new tablespace will be created!
2025-08-29 11:42:07 0 [Note] InnoDB: Compressed tables use zlib 1.3.1
2025-08-29 11:42:07 0 [Note] InnoDB: Number of transaction pools: 1
2025-08-29 11:42:07 0 [Note] InnoDB: Using ARMv8 crc32 instructions
2025-08-29 11:42:07 0 [Note] InnoDB: Using Linux native AIO
2025-08-29 11:42:07 0 [Note] InnoDB: innodb_buffer_pool_size_max=128m, 
innodb_buffer_pool_size=128m
2025-08-29 11:42:07 0 [Note] InnoDB: Completed initialization of buffer 
pool
2025-08-29 11:42:07 0 [Note] InnoDB: Setting file './ibdata1' size to 
12.000MiB. Physically writing the file full; Please wait ...
2025-08-29 11:42:07 0 [Note] InnoDB: File './ibdata1' size is now 
12.000MiB.
2025-08-29 11:42:07 0 [ERROR] InnoDB: preallocating 100663296 bytes for 
file ./ib_logfile101 failed with error 28
2025-08-29 11:42:07 0 [ERROR] InnoDB: Cannot set log file 
./ib_logfile101 size to 96.000MiB
2025-08-29 11:42:07 0 [ERROR] InnoDB: Database creation was aborted with 
error Generic error. You may need to delete the ibdata1 file before 
trying to start up again.
2025-08-29 11:42:07 0 [Note] InnoDB: Starting shutdown...
2025-08-29 11:42:07 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE 
ENGINE failed.
2025-08-29 11:42:07 0 [Note] Plugin 'FEEDBACK' is disabled.
2025-08-29 11:42:07 0 [Note] Plugin 'wsrep-provider' is disabled.
2025-08-29 11:42:07 0 [ERROR] Could not open mysql.plugin table: "Table 
'mysql.plugin' doesn't exist". Some plugins may be not loaded
2025-08-29 11:42:07 0 [ERROR] Failed to initialize plugins.
2025-08-29 11:42:07 0 [ERROR] Aborting
250829 11:42:07 mysqld_safe mysqld from pid file /run/mysql/mysqld.pid 
ended

I am not aware that CM4 has major differences to a standard Pi4. Do you 
have any exotic packages in your configuration?

Kind regards,
Andreas

> 
> Am 26.08.25 um 09:23 schrieb Nicolas Cavallari:
>> On 26/08/2025 08:59, Andreas Ziegler wrote:
>>> Hi Horst,
>>> 
>>> On 2025-08-25 17:32, Horst Noecker wrote:
>>>> 
>>>> Dear Buildroot community,
>>>> 
>>>> 
>>>> I'm trying to build MariaDB 11.4.8 with Buildroot for Aarch64 for a
>>>> RasPi4 / Compute Module 4.
>>>> 
>>>> I've been doing this all the time by downloading the sources,
>>>> configuring it with cmake-gui, using the toolchain built by 
>>>> buildroot,
>>>> build it and put the binaries, libs, etc. into an overlay being then
>>>> packaged into the image by buildroot.
>>>> 
>>>> That worked fine for years - also with MariaDB 11.4.x. - but only 
>>>> for
>>>> Arm32 (ARMv7a, gnueabihf, etc. etc.). For Aarch64 the only version 
>>>> that
>>>> works is the latest 10.11.11.
>>>> 
>>>> I've also tried to adapt the mariadb-package from buildroot to have 
>>>> it
>>>> build inside by builtroot itself.
>>>> 
>>>> The build itself works for Arm32 and AArch64.
>>>> 
>>>> BUT: no matter what I do, when trying to start mariadbd (i.e. the
>>>> server) it gives a segmentation fault without any further hint (in 
>>>> the
>>>> log file it only states that it started and immediately stopped).
>>>> 
>>>> 
>>>> If anybody has any clue that would be awesome!
>>>> 
>>> 
>>> Which standard library do you use? MariaDB is a C++ project and 
>>> uClibc does not fully implement thread local storage on Aarch64, 
>>> which is used by C++ exception handling. C code works, C++ code dies 
>>> with SIGSEGV on the first try/catch block. musl functions correctly 
>>> and glibc should work.
>> 
>> It is more complicated than that IIRC: uclibc-ng implements thread 
>> local storage, but GCC has optimizations that assumes that the thread 
>> local storage implementation works like glibc.  And unlike for other 
>> architectures where the requirements are spelled out¹, what GCC 
>> expects from the arm/aarch64 TLS implementation is not documented.
>> 
>> Also, errno in C uses thread local storage and C11 programs can also 
>> use thread local storage, so C programs are not immune.
>> 
>> [1]: https://uclibc.org/docs/tls.pdf

[2] 
https://patchwork.ozlabs.org/project/buildroot/patch/20250829111210.1669283-1-thomas.petazzoni@bootlin.com/
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2025-08-29 13:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.73751.1756165330.2108631.buildroot@buildroot.org>
2025-08-26  6:59 ` [Buildroot] MariaDB 11 for buildroot Andreas Ziegler
2025-08-26  7:23   ` Nicolas Cavallari
2025-08-27 15:54     ` Horst Noecker via buildroot
2025-08-29 13:43       ` Andreas Ziegler [this message]
2025-08-25 15:32 Horst Noecker via buildroot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3e12388749cbcd8ce616e1f930701d6d@umbiko.net \
    --to=br025@umbiko.net \
    --cc=buildroot@buildroot.org \
    --cc=horst.noecker@cellomation.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.