[MDEV-30117] MariaDB Service keeps shutting down while "SELECT" statement is running Created: 2022-11-29  Updated: 2022-11-30  Resolved: 2022-11-29

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - Aria
Affects Version/s: 10.10.2
Fix Version/s: N/A

Type: Bug Priority: Blocker
Reporter: Keunho Kim Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: crash
Environment:

os : windows Server 2019 Standard
cpu : Xeon(R) Gold 6240 CPU 2.60GHz
ram : 32g
apache-tomcat-8.0.50
java 1.8


Issue Links:
Relates
relates to MDEV-30118 exception in ha_maria::extra Closed

 Description   

The mariadb service enrolled in windows service keeps shutting down after "SELECT" statement is executed. I'm deploying SPRING project and this project is based on MariaDB 10.10.2.

This issue pops out intermittently and is not bound to certain SELECT statements. It occurs at random time at random SELECT statement in the project I'm deploying.
I've checked CPU and ram usage as well but no particular sign of overusage of hardware resources.

Originally I was using 10.8 version of MariaDB and that kept shutting down as well. So I decided to use 10.10.2 instead, only to find out the same issue coming out again. As time goes after reinstallation, the crash occurs more often and I'm unable to maintain the service normally.

_*Below is the entire error log.
*_

221124 13:23:07 [ERROR] mysqld got exception 0xc0000005 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
 
To report this bug, see https://mariadb.com/kb/en/reporting-bugs
 
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed, 
something is definitely wrong and this may fail.
 
Server version: 10.10.2-MariaDB
key_buffer_size=134217728
read_buffer_size=131072
max_used_connections=42
max_threads=65537
thread_count=27
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 142742942 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
 
Thread pointer: 0x2679f14f5f8
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
server.dll!ha_maria::extra()[ha_maria.cc:2682]
server.dll!JOIN::cleanup()[sql_select.cc:14901]
server.dll!JOIN::join_free()[sql_select.cc:14773]
server.dll!do_select()[sql_select.cc:21408]
server.dll!JOIN::exec_inner()[sql_select.cc:4823]
server.dll!mysql_select()[sql_select.cc:5081]
server.dll!handle_select()[sql_select.cc:581]
server.dll!execute_sqlcom_select()[sql_parse.cc:6261]
server.dll!mysql_execute_command()[sql_parse.cc:3945]
server.dll!mysql_parse()[sql_parse.cc:8025]
server.dll!dispatch_command()[sql_parse.cc:1896]
server.dll!do_command()[sql_parse.cc:1407]
server.dll!tp_callback()[threadpool_common.cc:245]
KERNEL32.DLL!LCMapStringEx()
ntdll.dll!RtlAddRefActivationContext()
ntdll.dll!RtlAcquireSRWLockExclusive()
KERNEL32.DLL!BaseThreadInitThunk()
ntdll.dll!RtlUserThreadStart()
 
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x2679d0effc0): SET STATEMENT max_statement_time=5000 FOR /* Attach.selectFileList  */
        SELECT ATTACH_GRP_NO    
             , ATTACH
             , MODULE
             , trim(CD_FILE_TYPE) AS CD_FILE_TYPE
             , NAME
             , CONCAT(LEFT(NAME, INSTR(NAME, SUBSTRING_INDEX(NAME, '_', -1))-2), '.', FORMAT) AS ORIGIN_NAME
             , PATH
             , FORMAT
             , FILE_SIZE
               , @ROWNUM := @ROWNUM +1 AS SEQ_DSP
             , MEMO
             , CNT_DOWNLOAD
             , DATE_C
             , DATE_E
             , THUMB_YN
          FROM SYS_ATTACH , (SELECT @ROWNUM := 0)RN
         WHERE CD_DEL = '1'
         
          AND ATTACH_GRP_NO = '2561'
         
           
         
        ORDER BY SEQ_DSP,DATE_C DESC
Connection ID (thread ID): 4362
Status: NOT_KILLED
 
 


Below is the settings I'm currently using.

os : windows Server 2019 Standard
cpu : Xeon(R) Gold 6240 CPU 2.60GHz
ram : 32g
[mysqld]
datadir=C:/Program Files/MariaDB 10.10/data
port=3306
innodb_buffer_pool_size=20G
innodb_buffer_pool_instances = 20
innodb_write_io_threads = 8
innodb_read_io_threads = 8
max_heap_table_size=24m
tmp_table_size=24m
innodb_sort_buffer_size=64m
#innodb_force_recovery = 4
 
slave-skip-errors=all
skip-name-resolve
read_only=0
 
key_buffer_size = 768M 
max_allowed_packet = 1M 
table_open_cache = 512 
sort_buffer_size = 64M 
read_buffer_size = 24M 
read_rnd_buffer_size = 8M 
myisam_sort_buffer_size = 128M 
thread_cache_size = 20
 
# Try number of CPU's*2 for thread_concurrency 
thread_concurrency = 16
max_connections = 2048 
table_cache = 512
 
# Query Cache 
query_cache_limit=16M 
query_cache_size=1024M 
query_cache_type=1
 
character-set-server=utf8mb4
[client]
port=3306
plugin-dir=C:\Program Files\MariaDB 10.10/lib/plugin



 Comments   
Comment by Elena Stepanova [ 2022-11-29 ]

MDEV-30118 is a duplicate of this one (and should have been closed as such).
Unfortunately further exchange took place within MDEV-30118, so now this one has to be closed instead.

Comment by Daniel Black [ 2022-11-30 ]

Oops. Thanks for including the configuration.

Test package of 10.10.3 package in https://ci.mariadb.org/30437/amd64-windows-packages/

Generated at Thu Feb 08 10:13:47 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.