[MDEV-23932] 100% usage of a single core with an idle database Created: 2020-10-10  Updated: 2020-10-10

Status: Open
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.5.6
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Jose Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Environment:

Alpine Linux (LXC container), mariadb-10.5.6-r0
architecture: armhf (32bit)
hw specs: https://www.turris.com/en/omnia/specifications/



 Description   

I have a tiny 250MB database dedicated to a personal nextcloud instance and running inside LXC container. It's been running w/o for months but recently I noted increased temperatures and it got my attention.

It was a bit of a surprise to find out that even with a database totally idle (application is shutdown) one of two CPU cores is 100 % busy with mariadb process.

# mysqld --print-defaults
mysqld would have been started with the following arguments:
--query_cache_type=on --innodb_buffer_pool_size=10M --symbolic-links=0 --skip-networking 

lldb is not available in repositories and neither are debugging symbols mariadb. This is output of strace on one (and only) busy thread, run for approx. 10 seconds:

% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 84.62    0.110000         873       126        66 futex
 15.38    0.020000         645        31           poll
  0.00    0.000000           0         1           close
  0.00    0.000000           0         1           access
  0.00    0.000000           0         1           fcntl64
  0.00    0.000000           0         1         1 madvise
  0.00    0.000000           0         1           gettid
  0.00    0.000000           0       396           clock_gettime
  0.00    0.000000           0        30           sendto
  0.00    0.000000           0        90        30 recvfrom
  0.00    0.000000           0         2         1 setsockopt
  0.00    0.000000           0        10         9 accept4
  0.00    0.000000           0       396       396 clock_gettime64
------ ----------- ----------- --------- --------- ----------------
100.00    0.130000         119      1086       503 total


Generated at Thu Feb 08 09:26:09 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.