[MDEV-5205] MariaDB does not start if more than 128 cpu's are available Created: 2013-10-30  Updated: 2020-05-15  Resolved: 2013-11-05

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 5.5.33a
Fix Version/s: 5.5.34

Type: Bug Priority: Major
Reporter: Jaakko Hyvätti Assignee: Sergey Vojtovich
Resolution: Fixed Votes: 0
Labels: None
Environment:

IBM systemx with 8 cpus with 10 cores with 2 threads = 160 available cpu's


Issue Links:
Problem/Incident
causes MDEV-22578 thread_pool_info crashes with clang6,... Closed

 Description   

MAX_THREAD_GROUPS 128 setting prevents MariaDB from starting. No configuration is read at the time this check is made. Solution: make allocating the structure dynamic, make default to be always less than MAX_THREAD_GROUPS, or make MAX_THREAD_GROUPS bigger.

./sql/threadpool_unix.cc:static thread_group_t all_groups[MAX_THREAD_GROUPS];
./sql/threadpool.h:#define MAX_THREAD_GROUPS 128
./sql/sys_vars.cc: VALID_RANGE(1, MAX_THREAD_GROUPS), DEFAULT(my_getncpus()), BLOCK_SIZE(1),

Server does not start if my_getncpus() > MAX_THREAD_GROUPS and there is no configuration option around that.



 Comments   
Comment by Sergey Vojtovich [ 2013-11-01 ]

Sergei, please review fix for this bug. It makes all_groups dynamic, though I can't judge if there is much sense setting it to high values even on computers with huge amount of cores.

Comment by Sergei Golubchik [ 2013-11-01 ]

look ok, see the comment in the email

Comment by Sergey Vojtovich [ 2013-11-05 ]

Fixed in 5.5.34, revision-id: svoj@mariadb.org-20131105051859-pytrunre7wtyfcls

Generated at Thu Feb 08 07:02:30 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.