Livemap & GuildGUI: Error 500 and SQL Server Crash

1
Hi,
everytime someone is doing some changes to the guild standings they got an http Error 500 and the sql server crashes.

Two things happend before first time of this error.

1st: I changed the standard coalliton because of the heraldrik bug.
2nd: I blacklisted RUS and CHN IP ranges at the firewall due to brute force attacs to my server.

URL to Map: https://livemap.feudal.tools/id/5379

Abstract of mysql_error.log when it happens:

Code: Select all

200125 20:30:32 [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.4.11-MariaDB
key_buffer_size=16777216
read_buffer_size=262144
max_used_connections=9
max_threads=65537
thread_count=11
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 20294 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x2c70d27e98
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...
mysqld.exe!?cleanup@st_join_table@@QEAAXXZ()
mysqld.exe!?cleanup@JOIN@@QEAAX_N@Z()
mysqld.exe!?destroy@JOIN@@QEAAHXZ()
mysqld.exe!?cleanup@st_select_lex@@QEAA_NXZ()
mysqld.exe!?prepare@subselect_single_select_engine@@UEAAHPEAVTHD@@@Z()
mysqld.exe!?fix_fields@Item_subselect@@UEAA_NPEAVTHD@@PEAPEAVItem@@@Z()
mysqld.exe!?fix_fields@Item_func@@UEAA_NPEAVTHD@@PEAPEAVItem@@@Z()
mysqld.exe!?fix_fields_if_needed_for_scalar@Item@@QEAA_NPEAVTHD@@PEAPEAV1@@Z()
mysqld.exe!?fix_fields@Item_cond@@UEAA_NPEAVTHD@@PEAPEAVItem@@@Z()
mysqld.exe!?sp_fix_func_item@THD@@QEAAPEAVItem@@PEAPEAV2@@Z()
mysqld.exe!?sp_prepare_func_item@THD@@QEAAPEAVItem@@PEAPEAV2@I@Z()
mysqld.exe!?exec_core@sp_instr_jump_if_not@@UEAAHPEAVTHD@@PEAI@Z()
mysqld.exe!?reset_lex_and_exec_core@sp_lex_keeper@@QEAAHPEAVTHD@@PEAI_NPEAVsp_instr@@@Z()
mysqld.exe!?execute@sp_instr_jump_if_not@@UEAAHPEAVTHD@@PEAI@Z()
mysqld.exe!?execute@sp_head@@IEAA_NPEAVTHD@@_N@Z()
mysqld.exe!?execute_function@sp_head@@QEAA_NPEAVTHD@@PEAPEAVItem@@IPEAVField@@PEAPEAVsp_rcontext@@PEAVQuery_arena@@@Z()
mysqld.exe!?execute_impl@Item_sp@@QEAA_NPEAVTHD@@PEAPEAVItem@@I@Z()
mysqld.exe!?execute@Item_sp@@QEAA_NPEAVTHD@@PEA_NPEAPEAVItem@@I@Z()
mysqld.exe!?execute@Item_func_sp@@AEAA_NXZ()
mysqld.exe!?val_int@Item_func_sp@@UEAA_JXZ()
mysqld.exe!?Item_send_longlong@Type_handler@@IEBA_NPEAVItem@@PEAVProtocol@@PEAUst_value@@@Z()
mysqld.exe!?send_result_set_row@Protocol@@QEAA_NPEAV?$List@VItem@@@@@Z()
mysqld.exe!?send_data@select_send@@UEAAHAEAV?$List@VItem@@@@@Z()
mysqld.exe!?exec_inner@JOIN@@QEAAXXZ()
mysqld.exe!?exec@JOIN@@QEAAXXZ()
mysqld.exe!?mysql_select@@YA_NPEAVTHD@@PEAUTABLE_LIST@@IAEAV?$List@VItem@@@@PEAVItem@@IPEAUst_order@@434_KPEAVselect_result@@PEAVst_select_lex_unit@@PEAVst_select_lex@@@Z()
mysqld.exe!?handle_select@@YA_NPEAVTHD@@PEAULEX@@PEAVselect_result@@K@Z()
mysqld.exe!?execute_init_command@@YAXPEAVTHD@@PEAUst_mysql_lex_string@@PEAUst_mysql_rwlock@@@Z()
mysqld.exe!?mysql_execute_command@@YAHPEAVTHD@@@Z()
mysqld.exe!?mysql_parse@@YAXPEAVTHD@@PEADIPEAVParser_state@@_N3@Z()
mysqld.exe!?dispatch_command@@YA_NW4enum_server_command@@PEAVTHD@@PEADI_N3@Z()
mysqld.exe!?do_command@@YA_NPEAVTHD@@@Z()
mysqld.exe!?pool_of_threads_scheduler@@YAXPEAUscheduler_functions@@PEAKPEAI@Z()
mysqld.exe!?tp_callback@@YAXPEAUTP_connection@@@Z()
ntdll.dll!RtlFreeUnicodeString()
ntdll.dll!RtlFreeUnicodeString()
KERNEL32.DLL!BaseThreadInitThunk()
ntdll.dll!RtlUserThreadStart()

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x2c71560da0): SELECT fb_setGuildStanding('3', '2', '6', '3') AS TicketID
Connection ID (thread ID): 63741
Status: NOT_KILLED

Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on

The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
Writing a core file at D:\Xampp\mysql\data\
2020-01-25 20:31:07 0 [Note] mysqld.exe: Aria engine: starting recovery
recovered pages: 0% 22% 40% 50% 60% 70% 80% 90% 100% (0.0 seconds); tables to flush: 1 0
 (0.1 seconds); 
2020-01-25 20:31:07 0 [Note] mysqld.exe: Aria engine: recovery done
2020-01-25 20:31:07 0 [Warning] The parameter innodb_file_format is deprecated and has no effect. It may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
InnoDB: using atomic writes.
2020-01-25 20:31:07 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2020-01-25 20:31:07 0 [Note] InnoDB: Uses event mutexes
2020-01-25 20:31:07 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-01-25 20:31:07 0 [Note] InnoDB: Number of pools: 1
2020-01-25 20:31:07 0 [Note] InnoDB: Using SSE2 crc32 instructions
2020-01-25 20:31:07 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2020-01-25 20:31:07 0 [Note] InnoDB: Completed initialization of buffer pool
2020-01-25 20:31:07 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=1876599596
2020-01-25 20:31:08 0 [Note] InnoDB: Starting final batch to recover 12 pages from redo log.
2020-01-25 20:31:08 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2020-01-25 20:31:08 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2020-01-25 20:31:08 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-01-25 20:31:08 0 [Note] InnoDB: Setting file 'D:\Xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-01-25 20:31:08 0 [Note] InnoDB: File 'D:\Xampp\mysql\data\ibtmp1' size is now 12 MB.
2020-01-25 20:31:08 0 [Note] InnoDB: 10.4.11 started; log sequence number 1876600471; transaction id 837697
2020-01-25 20:31:08 0 [Note] InnoDB: Loading buffer pool(s) from D:\Xampp\mysql\data\ib_buffer_pool
2020-01-25 20:31:08 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-01-25 20:31:08 0 [Note] Server socket created on IP: '::'.
2020-01-25 20:31:09 0 [Note] Reading of all Master_info entries succeeded
2020-01-25 20:31:09 0 [Note] Added new Master_info '' to hash table
2020-01-25 20:31:09 0 [Note] D:\xampp\mysql\bin\mysqld.exe: ready for connections.
Version: '10.4.11-MariaDB'  socket: ''  port: 3306  mariadb.org binary distribution
2020-01-25 20:31:09 0 [Note] InnoDB: Buffer pool(s) load completed at 200125 20:31:09
200125 20:31:10 [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

Re: Livemap & GuildGUI: Error 500 and SQL Server Crash

2
Hi there,
the mysql service on your server should not crash from a simple query. The error description in the log has some advise in which direction you (or your provider) should investigate:
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.

The HTTP 500 errors are displayed because your database ended the connection prematurely - most likely due to the mysql service crash right after the standing change query was issued:
Query (0x2c71560da0): SELECT fb_setGuildStanding('3', '2', '6', '3') AS TicketID

Please also note that you seem to be using MariaDB version 10.4, whereas LiF is built and supported for MariaDB 5.5 only. This could cause problems as well.


It would be interesting to know what happens if you issue the query in your database manually, of if somebody changes standings using in-game slash commands.
cron