[MDEV-27979] Server startup failure when setting max_session_mem_used too low Created: 2022-03-02  Updated: 2022-03-09  Resolved: 2022-03-09

Status: Closed
Project: MariaDB Server
Component/s: Admin statements
Affects Version/s: 10.8.2
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Hartmut Holzgraefe Assignee: Sergei Golubchik
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

According to the documentation the minimum value for max_session_mem_used is 8192 bytes. With that setting the server fails on startup. I could start it with a value of 34000, but not with 33000 or below. I did not disect the threshold value any further than that.

On 10.8.2 the server complained about the option setting before aborting:

Mar 02 00:11:41 ubuntu-focal mariadbd[4616]: 2022-03-02  0:11:41 0 [Note] /usr/sbin/mariadbd (server 10.8.2-MariaDB-1:10.8.2+maria~focal) starting as process 4616 ...
Mar 02 00:11:41 ubuntu-focal mariadbd[4616]: 2022-03-02  0:11:41 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
Mar 02 00:11:41 ubuntu-focal mariadbd[4616]: 2022-03-02  0:11:41 0 [Note] InnoDB: Number of transaction pools: 1
Mar 02 00:11:41 ubuntu-focal mariadbd[4616]: 2022-03-02  0:11:41 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
Mar 02 00:11:41 ubuntu-focal mariadbd[4616]: 2022-03-02  0:11:41 0 [Note] InnoDB: Using Linux native AIO
Mar 02 00:11:41 ubuntu-focal mariadbd[4616]: 2022-03-02  0:11:41 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
Mar 02 00:11:41 ubuntu-focal mariadbd[4616]: 2022-03-02  0:11:41 0 [Note] InnoDB: Completed initialization of buffer pool
Mar 02 00:11:41 ubuntu-focal mariadbd[4616]: 2022-03-02  0:11:41 0 [Note] InnoDB: Buffered log writes (block size=512 bytes)
Mar 02 00:11:41 ubuntu-focal mariadbd[4616]: 2022-03-02  0:11:41 0 [Note] InnoDB: 128 rollback segments are active.
Mar 02 00:11:41 ubuntu-focal mariadbd[4616]: 2022-03-02  0:11:41 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
Mar 02 00:11:41 ubuntu-focal mariadbd[4616]: 2022-03-02  0:11:41 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
Mar 02 00:11:41 ubuntu-focal mariadbd[4616]: 2022-03-02  0:11:41 0 [Note] InnoDB: log sequence number 46939; transaction id 14
Mar 02 00:11:41 ubuntu-focal mariadbd[4616]: 2022-03-02  0:11:41 0 [Note] Plugin 'FEEDBACK' is disabled.
Mar 02 00:11:41 ubuntu-focal mariadbd[4616]: 2022-03-02  0:11:41 0 [ERROR] Could not open mysql.plugin table: "The MariaDB server is running with the --max-thread-mem-used=8192 option so it cannot execute this statement". Some plugins may be not load>
Mar 02 00:11:41 ubuntu-focal mariadbd[4616]: 2022-03-02  0:11:41 0 [Warning] You need to use --log-bin to make --expire-logs-days or --binlog-expire-logs-seconds work.
Mar 02 00:11:41 ubuntu-focal mariadbd[4616]: 2022-03-02  0:11:41 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
Mar 02 00:11:41 ubuntu-focal mariadbd[4616]: 2022-03-02  0:11:41 0 [ERROR] Can't open and lock privilege tables: The MariaDB server is running with the --max-thread-mem-used=8192 option so it cannot execute this statement
Mar 02 00:11:41 ubuntu-focal mariadbd[4616]: 2022-03-02  0:11:41 0 [Note] Server socket created on IP: '127.0.0.1'.
Mar 02 00:11:41 ubuntu-focal mariadbd[4616]: 2022-03-02  0:11:41 0 [ERROR] Fatal error: Can't open and lock privilege tables: The MariaDB server is running with the --max-thread-mem-used=8192 option so it cannot execute this statement
Mar 02 00:11:41 ubuntu-focal mariadbd[4616]: 2022-03-02  0:11:41 0 [ERROR] Aborting

But on 10.4.14 I just got a segfault instead. (did not check later 10.4.x releases yet)

I'd suggest to raise the min. value for this setting to at least 64KB instead of 8KB



 Comments   
Comment by Sergei Golubchik [ 2022-03-09 ]

It can be also set per session. Small values also make sense for testing purposes

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