Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'mariadb:latest' shows "Can't initialize timers" #434

Closed
yahonda opened this issue May 24, 2022 · 31 comments
Closed

'mariadb:latest' shows "Can't initialize timers" #434

yahonda opened this issue May 24, 2022 · 31 comments

Comments

@yahonda
Copy link

yahonda commented May 24, 2022

Steps to reproduce

  1. Install Docker on Ubuntu 22.06 x86_64
$ docker -v
Docker version 20.10.6, build 370c289
$ more /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04 LTS"
  1. Docker run using "mariadb:latest"
docker run --name mariadbtest -e MYSQL_ROOT_PASSWORD=mypass -p 3306:3306 -d docker.io/library/mariadb:latest
  1. Login to the container
docker exec -it mariadbtest bash

Expected behavior

docker exec -it mariadbtest bash should open bash prompt.

Actual behavior

Error response from daemon: Container.

Here are actual log files.

$ docker run --name mariadbtest -e MYSQL_ROOT_PASSWORD=mypass -p 3306:3306 -d docker.io/library/mariadb:latest
Unable to find image 'mariadb:latest' locally
latest: Pulling from library/mariadb
125a6e411906: Pull complete
a28b55cc656d: Pull complete
f2325f4e25a1: Pull complete
c6c2d09f748d: Pull complete
af2b4ed853d2: Pull complete
8394ac6b401e: Pull complete
5b150cf0c5a7: Pull complete
1b11b2e20899: Pull complete
3d35790a91d9: Pull complete
5e73c7793365: Pull complete
3d34b9f14ede: Pull complete
Digest: sha256:3a24e9e99882a6848c5793f36ec7a730a8d301c5175613cd22a341fc039bd10a
Status: Downloaded newer image for mariadb:latest
9ca954cada2e147344469c3a376e1a3a760c5e7acd5f19565fdb5975b4237af1
$ docker exec -it mariadbtest bash
Error response from daemon: Container 9ca954cada2e147344469c3a376e1a3a760c5e7acd5f19565fdb5975b4237af1 is not running
$ docker logs -f mariadbtest
2022-05-24 02:39:15+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.8.3+maria~jammy started.
2022-05-24 02:39:15+00:00 [ERROR] [Entrypoint]: mariadbd failed while attempting to check config
	command was: mariadbd --verbose --help --log-bin-index=/tmp/tmp.kMff4dllgU
	Can't initialize timers
$

Additional information

This environment can run 'mariadb:10.7' as follows.

$ docker run --name mariadbtest -e MYSQL_ROOT_PASSWORD=mypass -p 3306:3306 -d docker.io/library/mariadb:10.7
Unable to find image 'mariadb:10.7' locally
10.7: Pulling from library/mariadb
d5fd17ec1767: Pull complete
49b1cc1f34f7: Pull complete
9924a2c30493: Pull complete
a2bb7d6219ce: Pull complete
1eb5d2e9991e: Pull complete
3cbaef7da880: Pull complete
52f39675d129: Pull complete
01e063a0d770: Pull complete
50fb616a753d: Pull complete
36bc0be24a08: Pull complete
5afe25c59347: Pull complete
Digest: sha256:85fbfe23f9b710d21c76832ae4df096c58db0f63d5a040beea3e1e935ad39ca3
Status: Downloaded newer image for mariadb:10.7
b82cffa4918860ad75bd0b46a01cb412b152a938d280cacab9fe1d2d2a175c81
$ docker exec -it mariadbtest bash
root@b82cffa49188:/# mysql -uroot -pmypass
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 10.7.4-MariaDB-1:10.7.4+maria~focal mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> select version();
+-------------------------------------+
| version()                           |
+-------------------------------------+
| 10.7.4-MariaDB-1:10.7.4+maria~focal |
+-------------------------------------+
1 row in set (0.000 sec)

MariaDB [(none)]> quit
Bye
root@b82cffa49188:/#
yahonda added a commit to yahonda/buildkite-config that referenced this issue May 24, 2022
This commit uses "mariadb:10.7" for Rails CI
until MariaDB/mariadb-docker#434 is resolved.

I assume this "mariadb:latest" now points "mariadb:10.8"
after MariaDDB 10.8.3 has been released as the first GA version of
MariaDB 10.8, https://mariadb.com/kb/en/mariadb-1083-release-notes/

Refer to rails/rails#45167
@grooverdan
Copy link
Member

grooverdan commented May 24, 2022

Thanks for the bug report.

"Can't initialize timers" is caused by a failure to create a thread. Although its a 64k thread stack size on this thread, its the same in 10.7. I haven't identified the difference yet but am looking.

I see your docker compose yaml configuration is quite basic.

@yahonda
Copy link
Author

yahonda commented May 24, 2022

Thanks for the reply. I'm not familiar with MariaDB internal,
the first error message is something like failing "to check config", not stack size itself.

2022-05-24 02:39:15+00:00 [ERROR] [Entrypoint]: mariadbd failed while attempting to check config

@grooverdan
Copy link
Member

The entrypoint uses mariadbd --help --verbose to examine the config. Yes its odd that the --help --verbose needs to initialize timers, which is another thing to get addressed.

Have you only seen this in your Buildkite environment currently?

@yahonda
Copy link
Author

yahonda commented May 24, 2022

Have you only seen this in your Buildkite environment currently?

CI against MariaDB has been failing since Mon 23rd May 2022 at 20:59 UTC.

Then I attempt to reproduce this failure locally and found docker run --name mariadbtest -e MYSQL_ROOT_PASSWORD=mypass -p 3306:3306 -d docker.io/library/mariadb:latest fails in my local Ubuntu 22.04 environment.

Does this answer your question?

@grooverdan
Copy link
Member

Yep. The container release was very recent so those times correspond well. Ubuntu-22.04 is a common factor that needs to be explored.

@yahonda
Copy link
Author

yahonda commented May 24, 2022

Ubuntu-22.04 is a common factor that needs to be explored.

Agreed.

mariadb:latest runs successfully on my macOS(M1)

% sw_vers
ProductName:	macOS
ProductVersion:	12.5
BuildVersion:	21G5027d
%
% docker -v
Docker version 20.10.14, build a224086
% docker run --name mariadbtest -e MYSQL_ROOT_PASSWORD=mypass -p 3306:3306 -d docker.io/library/mariadb:latest
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
See 'docker run --help'.
% docker run --name mariadbtest -e MYSQL_ROOT_PASSWORD=mypass -p 3306:3306 -d docker.io/library/mariadb:latest
Unable to find image 'mariadb:latest' locally
latest: Pulling from library/mariadb
b84950154c18: Pull complete
b1ae07faadba: Pull complete
46428e702eff: Pull complete
0e775e0ed5a0: Pull complete
031c54d0d9d9: Pull complete
602265dc68e1: Pull complete
3d1d131fb6cb: Pull complete
3a33ea1b3043: Pull complete
9539c6148f07: Pull complete
38aa29868643: Pull complete
3702214dffba: Pull complete
Digest: sha256:3a24e9e99882a6848c5793f36ec7a730a8d301c5175613cd22a341fc039bd10a
Status: Downloaded newer image for mariadb:latest
a292292472524ff9eee0c98ccfadbfa017f4ccdc74535e3c2778bff013edb1d1
% docker exec -it mariadbtest bash
root@a29229247252:/# mysql -uroot -pmypass
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 10.8.3-MariaDB-1:10.8.3+maria~jammy mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> select version();
+-------------------------------------+
| version()                           |
+-------------------------------------+
| 10.8.3-MariaDB-1:10.8.3+maria~jammy |
+-------------------------------------+
1 row in set (0.002 sec)

MariaDB [(none)]> quit
Bye
root@a29229247252:/#  

@martadinata666
Copy link

there is some docker compability issues, i think i saw this somewhere that it need docker 20.10.10+ version

@yahonda
Copy link
Author

yahonda commented May 24, 2022

Followed the steps https://docs.docker.com/engine/install/ubuntu/ to upgrade Docker version to Docker version 20.10.16, build aa7e414, mariadb:latest works in my local environment.

$ more /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04 LTS"
$ docker -v
Docker version 20.10.16, build aa7e414
$ docker run --name mariadbtest -e MYSQL_ROOT_PASSWORD=mypass -p 3306:3306 -d docker.io/library/mariadb:latest
Unable to find image 'mariadb:latest' locally
latest: Pulling from library/mariadb
125a6e411906: Pull complete
a28b55cc656d: Pull complete
f2325f4e25a1: Pull complete
c6c2d09f748d: Pull complete
af2b4ed853d2: Pull complete
8394ac6b401e: Pull complete
5b150cf0c5a7: Pull complete
1b11b2e20899: Pull complete
3d35790a91d9: Pull complete
5e73c7793365: Pull complete
3d34b9f14ede: Pull complete
Digest: sha256:3a24e9e99882a6848c5793f36ec7a730a8d301c5175613cd22a341fc039bd10a
Status: Downloaded newer image for mariadb:latest
8eb1bee44896307de105effe4e07be81286247add3cd4ca63a2ffdbc5a545195
yahonda@myryzen:~$ docker exec -it mariadbtest bash
root@8eb1bee44896:/# mysql -uroot -pmypass
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 10.8.3-MariaDB-1:10.8.3+maria~jammy mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> select version();
+-------------------------------------+
| version()                           |
+-------------------------------------+
| 10.8.3-MariaDB-1:10.8.3+maria~jammy |
+-------------------------------------+
1 row in set (0.000 sec)

MariaDB [(none)]> quit
Bye
root@8eb1bee44896:/# exit
exit
$

@grooverdan
Copy link
Member

@martadinata666 if you can remember some references that would be appreciated.

@martadinata666
Copy link

This one linuxserver FAQ

Im not really sure it the same, because it specifically told Some x86_64 hosts running older versions of the Docker engine are not compatible with some images based on Ubuntu Jammy., but the symptoms are alike can't create thread. So i assume may the same root cause.

@grooverdan
Copy link
Member

Looking at the Ubuntu 22.04 packages for docker.io, while original the version was 20.10.6 this changed to 20.10.12 in January 2022, before the LTS release date. If the linux server FAQ is correct that only a 20.10.10+ release is required I'd rather it fixed by a docker upgrade.

Buildkit from logs is on DOCKER_VERSION="20.10.9".

The alternate I've got if the imposition is too much is to release a focal based mariadb:10.8/latest. Feedback welcome.

@yahonda
Copy link
Author

yahonda commented May 24, 2022

Let me contact with BuildKite to see if they can upgrade Docker version to 20.10.10 or higher.

@grooverdan
Copy link
Member

I just pinged their slack channel of the issue.

@jradtilbrook
Copy link

Hey fine folks, just popping in here to mention the newest version of the Buildkite Elastic CI Stack is using Docker 20.10.14. Perhaps the stack needs updating to pull in the newer AMI with the updated docker version?

@AndreG-P
Copy link

We are running Debian 4.19.171-2 (2021-01-30) x86_64 with Docker Docker version 19.03.13, build 4484c46d9d and have the same issue with the latest mariadb image.

@goraxan
Copy link

goraxan commented May 24, 2022

I can confirm the same behaviour after upgrading to the latest mariadb version yesterday. I'm running Ubuntu 16.04.7 LTS with Docker Docker version 20.10.7, build f0df350

grooverdan added a commit to grooverdan/mariadb-docker that referenced this issue May 24, 2022
For those unfortunate to be using
docker < 20.10.10

generate-stackbrew-library.sh is currently
majorly incompatible with this for now.

Closes MariaDB#434
@grooverdan
Copy link
Member

proposal:

https://github.com/MariaDB/mariadb-docker/compare/master...grooverdan:focal_images?expand=1

diff --git a/library/mariadb b/library/mariadb
index cd51229fc..0afe995f2 100644
--- a/library/mariadb
+++ b/library/mariadb
@@ -9,11 +9,21 @@ Architectures: amd64, arm64v8, ppc64le, s390x
 GitCommit: c0d07be9ad5eb3bc212c6805cc8031308c56e9b6
 Directory: 10.9
 
+Tags: 10.9.1-rc-focal, 10.9-rc-focal
+Architectures: amd64, arm64v8, ppc64le, s390x
+GitCommit: ae6c6a6891e1fc887e96898f94e8a4b8495d8289
+Directory: 10.9-focal
+
 Tags: 10.8.3-jammy, 10.8-jammy, 10-jammy, jammy, 10.8.3, 10.8, 10, latest
 Architectures: amd64, arm64v8, ppc64le, s390x
 GitCommit: c0d07be9ad5eb3bc212c6805cc8031308c56e9b6
 Directory: 10.8
 
+Tags: 10.8.3-focal, 10.8-focal, 10-focal, latest-focal
+Architectures: amd64, arm64v8, ppc64le, s390x
+GitCommit: ae6c6a6891e1fc887e96898f94e8a4b8495d8289
+Directory: 10.8-focal
+
 Tags: 10.7.4-focal, 10.7-focal, 10.7.4, 10.7
 Architectures: amd64, arm64v8, ppc64le, s390x
 GitCommit: c6d3396be642bbc73cd14b93e62c615e242f5a0d

The jammy base finally exposing liburing (because of available user space libraries) based capabilities of mariadb to the Docker Library users for the first time. I'm trying to avoid a full revert to focal if possible.

So the result is users that hit this can use mariadb:latest-focal.

@yosifkit, @tianon, do you have a suggested approach?

@MichaelUray
Copy link

MichaelUray commented May 24, 2022

I had the same issue with mariadb:latest, running a docker-compose file with Nextcloud:

nc-mariadb  | 2022-05-24 12:45:14+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.8.3+maria~jammy started.
nc-redis    | 1:C 24 May 2022 12:45:14.954 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
nc-redis    | 1:C 24 May 2022 12:45:14.954 # Redis version=7.0.0, bits=64, commit=00000000, modified=0, pid=1, just started
nc-redis    | 1:C 24 May 2022 12:45:14.954 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
nc-mariadb  | 2022-05-24 12:45:15+00:00 [ERROR] [Entrypoint]: mariadbd failed while attempting to check config
nc-mariadb  |   command was: mariadbd --character-set-server=utf8 --collation-server=utf8_unicode_ci --connect-timeout=10 --max-connections=1000 --max-allowed-packet=64M --thread-cache-size=600 --sort-buffer-size=8M --bulk-insert-buffer-size=32M --tmp-table-size=512M --max-heap-table-size=4096M --query-cache-limit=8M --query-cache-size=128M --query-cache-type=0 --long-query-time=10 --expire-logs-days=10 --max-binlog-size=100M --innodb-buffer-pool-size=512M --innodb-log-buffer-size=64M --innodb-file-per-table=1 --innodb-open-files=400 --innodb-io-capacity=400 --innodb-flush-method=O_DIRECT --innodb_read_only_compressed=OFF --verbose --help --log-bin-index=/tmp/tmp.DnHVTCcBBw
nc-mariadb  |   Can't initialize timers

I changed image: mariadb to image: mariadb:10.7 to pin it down to the older version to get my Nextcloud back up and running.

See also the post in the Nextcloud forum:
https://help.nextcloud.com/t/database-error-after-upgrade-nc23-0-4-nc23-0-5/139510/2

To pin it to mariadb:10.8.2 probably also helps, but I did not test it.

@yahonda
Copy link
Author

yahonda commented May 24, 2022

In the meantime, Rails CI uses mariadb:10.7 rails/rails#45167 (comment)

@grooverdan
Copy link
Member

--security-opt seccomp=unconfined is probably also a work around.

@quent1-fr
Copy link

Same problem here. mariadb:10 (currently mariadb:10.8.3) fails to start, but notmariadb:10.8.2 .

@grooverdan
Copy link
Member

Tested docker 18.09.1 from Debian 10 and confirmed that --security-opt seccomp=unconfined can start mariadb:10.8.3.
By stracing what is happening further its happens that a tgkill happens with SIGURG on the newly created tread without the unconfined seccom. Running with the latest default docker seccomp filter wasn't sufficient to run this either.

So to be clear, mariadb wants to start. Its the container runtime and their seccomp filters preventing it. Please lodge bug reports with your container runtime vendor/distro.

@yahonda
Copy link
Author

yahonda commented May 25, 2022

The original issue has been identified and addressed so I think I can close this issue.

@yahonda yahonda closed this as completed May 25, 2022
Kyle-Verhoog pushed a commit to DataDog/dd-trace-py that referenced this issue Jul 6, 2022
MariaDB latest only works on newer versions of Docker (see MariaDB/mariadb-docker#434).

So we are pinning to mariadb:10.7 for now to ensure consistent startup of the container in CircleCI.

(cherry picked from commit 27a55df)

Co-authored-by: Brett Langdon <[email protected]>
Kyle-Verhoog pushed a commit to DataDog/dd-trace-py that referenced this issue Jul 6, 2022
MariaDB latest only works on newer versions of Docker (see MariaDB/mariadb-docker#434).

So we are pinning to mariadb:10.7 for now to ensure consistent startup of the container in CircleCI.

(cherry picked from commit 27a55df)

Co-authored-by: Brett Langdon <[email protected]>
mergify bot added a commit to DataDog/dd-trace-py that referenced this issue Aug 16, 2022
MariaDB latest only works on newer versions of Docker (see MariaDB/mariadb-docker#434).

So we are pinning to mariadb:10.7 for now to ensure consistent startup of the container in CircleCI.

(cherry picked from commit 27a55df)

Co-authored-by: Brett Langdon <[email protected]>
(cherry picked from commit 97677f8)
mergify bot pushed a commit to DataDog/dd-trace-py that referenced this issue Oct 27, 2022
MariaDB latest only works on newer versions of Docker (see MariaDB/mariadb-docker#434).

So we are pinning to mariadb:10.7 for now to ensure consistent startup of the container in CircleCI.

(cherry picked from commit 27a55df)
Kyle-Verhoog pushed a commit to DataDog/dd-trace-py that referenced this issue Oct 27, 2022
…4395)

* chore(ci): pin mariadb container to 10.7 image tag (#3913)

MariaDB latest only works on newer versions of Docker (see MariaDB/mariadb-docker#434).

So we are pinning to mariadb:10.7 for now to ensure consistent startup of the container in CircleCI.

(cherry picked from commit 27a55df)

* chore(mariadb): update tests to support mariadb>=1.1.0 (backport #3883) (#4401)

* chore(mariadb): update tests to support mariadb>=1.1.0 (#3883)

The latest version of mariadb client library requires a newer version of the C library in order to build.

This PR updates snapshot tests to account for newly supported db.rowcount for mariadb query spans.

This PR depends on #3884 to be merged and update our dev image first before this can pass.

This is a testing only fix, our integration continues to work fine for mariadb>=1.1.0, but our test suite was not setup for it.

Co-authored-by: Kyle Verhoog <[email protected]>
Co-authored-by: Munir Abdinur <[email protected]>
(cherry picked from commit 22746a3)

# Conflicts:
#	tests/contrib/mariadb/test_mariadb.py

* fix conflicts and add missing snapshots

Co-authored-by: Brett Langdon <[email protected]>
Co-authored-by: Munir Abdinur <[email protected]>
Co-authored-by: Munir Abdinur <[email protected]>

Co-authored-by: Brett Langdon <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Munir Abdinur <[email protected]>
Co-authored-by: Munir Abdinur <[email protected]>
@bachoo786
Copy link

so I am on the latest version on docker compose and I have tried using the latest version of mariadb however I get the same errors as the OP. Can someone please help?

Docker Compose version v2.15.1
Docker version 20.10.9, build c2ea9bc
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.5 LTS
Release:        20.04
Codename:       focal

@grooverdan
Copy link
Member

@bachoo786 to summarize the solutions above (from https://docs.linuxserver.io/faq):

  • Upgrade your Docker engine install to at least version 20.10.10
  • relax seccomp=unconfined in compose or docker when running the image
  • and from above, run with an updated seccomp profile

@bachoo786
Copy link

@bachoo786 to summarize the solutions above (from https://docs.linuxserver.io/faq):

  • Upgrade your Docker engine install to at least version 20.10.10
  • relax seccomp=unconfined in compose or docker when running the image
  • and from above, run with an updated seccomp profile

I can do the update thought I did install the latest docker engine but anyway will do it again.

However the other 2 items on the list I have got no clue on how to do them. All I know is how to run a docker image from my yaml file. I am running docker compose and not docker if that helps?

RussH added a commit to RussH/OpenCATS that referenced this issue Mar 4, 2023
RussH added a commit to opencats/OpenCATS that referenced this issue Mar 5, 2023
* move ckeditor from require-dev to require

* Delete composer.lock

* Update .travis.yml

* pinning mariadb to 10.7 to avoid timing issue

workaround for github.com/MariaDB/mariadb-docker/issues/434
rusher added a commit to mariadb-corporation/mariadb-connector-nodejs that referenced this issue Sep 4, 2023
rusher added a commit to mariadb-corporation/mariadb-connector-nodejs that referenced this issue Sep 11, 2023
atosbucket added a commit to atosbucket/rails-buildkit that referenced this issue Mar 22, 2024
This commit uses "mariadb:10.7" for Rails CI
until MariaDB/mariadb-docker#434 is resolved.

I assume this "mariadb:latest" now points "mariadb:10.8"
after MariaDDB 10.8.3 has been released as the first GA version of
MariaDB 10.8, https://mariadb.com/kb/en/mariadb-1083-release-notes/

Refer to rails/rails#45167
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests