Mysql crash when querying - mysql

When I select with 2 conditions, mysql is always crashed.For me the problem is very strange:
It's just for this table
It's only happened on my notebook. We have test server (linux) with the same version mysql and the same sql is ok
It's not happened with either condition only
I tried drop and recreate the table, dump data and problem is still
I tried reinstall the same version mysql and in my notebook it happened again
Someone said mysql 5.6 is Ok, I haven't try
Mysql version is 5.7.17.OS: win7 64. I want to use 5.7. Can anybody give some advice.
PS: Is is possible that the problem is relevant with my.cnf?
Error log:
01:15:19 UTC - mysqld got exception 0xc000001d ;
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.
Attempting to collect some information that could help diagnose the problem.
As this is a crash and something is definitely wrong, the information
collection process might fail.
key_buffer_size=8388608
read_buffer_size=131072
max_used_connections=1
max_threads=151
thread_count=1
connection_count=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 68005 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0xe5fe040
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...
13ff93c21 mysqld.exe!pow()[pow.asm:1616]
13f4d3b4b mysqld.exe!get_sweep_read_cost()[handler.cc:7055]
13fa90117 mysqld.exe!ror_intersect_add()[opt_range.cc:5430]
13fa861e9 mysqld.exe!get_best_ror_intersect()[opt_range.cc:5611]
13fa923b5 mysqld.exe!test_quick_select()[opt_range.cc:3078]
13f68bdde mysqld.exe!get_quick_record_count()[sql_optimizer.cc:5890]
13f68a8cd mysqld.exe!JOIN::estimate_rowcount()[sql_optimizer.cc:5636]
13f68d479 mysqld.exe!JOIN::make_join_plan()[sql_optimizer.cc:4993]
13f68ef3f mysqld.exe!JOIN::optimize()[sql_optimizer.cc:363]
13f66a659 mysqld.exe!st_select_lex::optimize()[sql_select.cc:1009]
13f66852d mysqld.exe!handle_query()[sql_select.cc:164]
13f5227f6 mysqld.exe!execute_sqlcom_select()[sql_parse.cc:4947]
13f5246de mysqld.exe!mysql_execute_command()[sql_parse.cc:2597]
13f527faa mysqld.exe!mysql_parse()[sql_parse.cc:5363]
13f5212c9 mysqld.exe!dispatch_command()[sql_parse.cc:1287]
13f52226a mysqld.exe!do_command()[sql_parse.cc:854]
13f4c9634 mysqld.exe!handle_connection()[connection_handler_per_thread.cc:295]
13fedad82 mysqld.exe!pfs_spawn_thread()[pfs.cc:2195]
13fc046fb mysqld.exe!win_thread_start()[my_thread.c:38]
13ff9b39f mysqld.exe!_callthreadstartex()[threadex.c:376]
13ff9b5ea mysqld.exe!_threadstartex()[threadex.c:354]
773af56d kernel32.dll!BaseThreadInitThunk()
77723281 ntdll.dll!RtlUserThreadStart()
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (e61cf50): select * from sys_dauth_filter_item
where ENTITY_ID_ = 1
and FIELD_ID_ = 1
Connection ID (thread ID): 2
Status: NOT_KILLED

You should try to update the Windows.
In my case, MySql 5.7.17, Windows 2008 R2 server, update Win to sp1 => solve that problem.
Reference: http://bugs.mysql.com/bug.php?id=81197
My error log:
Thread pointer: 0x5705b3850
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...
140692571 mysqld.exe!pow()[pow.asm:1616]
13fc439a8 mysqld.exe!Item_func_pow::val_real()[item_func.cc:2924]
13fc03188 mysqld.exe!Item::send()[item.cc:7566]
13fc167a2 mysqld.exe!THD::send_result_set_row()[sql_class.cc:4661]
13fc15a1c mysqld.exe!Query_result_send::send_data()[sql_class.cc:2716]
140158d8f mysqld.exe!JOIN::exec()[sql_executor.cc:158]
13fd6d1e1 mysqld.exe!handle_query()[sql_select.cc:185]
13fbe4107 mysqld.exe!execute_sqlcom_select()[sql_parse.cc:5195]
13fbe6036 mysqld.exe!mysql_execute_command()[sql_parse.cc:2794]
13fbe9a83 mysqld.exe!mysql_parse()[sql_parse.cc:5617]
13fbe2b83 mysqld.exe!dispatch_command()[sql_parse.cc:1464]
13fbe3b7a mysqld.exe!do_command()[sql_parse.cc:1001]
13fbb981c mysqld.exe!handle_connection()[connection_handler_per_thread.cc:300]
1405d7392 mysqld.exe!pfs_spawn_thread()[pfs.cc:2191]
1402efc4b mysqld.exe!win_thread_start()[my_thread.c:38]
140699a3f mysqld.exe!_callthreadstartex()[threadex.c:376]
140699c8a mysqld.exe!_threadstartex()[threadex.c:354]
770cf34d kernel32.dll!BaseThreadInitThunk()
77302ca1 ntdll.dll!RtlUserThreadStart()
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (57133e640): SELECT POWER(1024,1)
Connection ID (thread ID): 5
Status: NOT_KILLED
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.

Related

mysqld got exception 0xc0000005

Sorry my english is not fluent. I am a newbie in MySQL database. I use MySQL 8.0.30 on Windows Server 2022 Datacenter. I have problem that MySQL crashes frequently (the MySQL service stops) always with same error log. I've tried to find the source of the problem but it's not resolved.
For the information I used Grafana Web Server and MySQL on same device with the following specs:
Processor Intel(R) Xeon(R) Silver 4208 CPU # 2.10GHz 2.10 GHz
Installed RAM 16.0 GB (15.6 GB usable)
System type 64-bit operating system, x64-based processor
Please give me an advice to resolve this trouble.
Thanks before
Here is the error MySQL log details :
10:01:25 UTC - mysqld got exception 0xc0000005 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x0
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...
7ffa8ac5b496 jemalloc.dll!???
7ffa8ac5b918 jemalloc.dll!???
7ffa8ac5ef91 jemalloc.dll!je_realloc()
7ffa82547ddd libcrypto-1_1-x64.dll!CRYPTO_memcmp()
7ffa8258bcea libcrypto-1_1-x64.dll!CRYPTO_memcmp()
7ffa8258e7e3 libcrypto-1_1-x64.dll!CRYPTO_memcmp()
7ffa8255956d libcrypto-1_1-x64.dll!CRYPTO_memcmp()
7ffa8246263c libcrypto-1_1-x64.dll!CRYPTO_memcmp()
7ffa826092ff libcrypto-1_1-x64.dll!CRYPTO_memcmp()
7ffab7d47167 ntdll.dll!RtlActivateActivationContextUnsafeFast()
7ffab7d4848a ntdll.dll!LdrShutdownThread()
7ffab7d28bae ntdll.dll!RtlExitUserThread()
7ffab5851b8a KERNELBASE.dll!FreeLibraryAndExitThread()
7ffab55c6c5d ucrtbase.dll!_recalloc()
7ffab55f3c19 ucrtbase.dll!_endthreadex()
7ff682fc4605 mysqld.exe!?modify_thread_cache_size#Per_thread_connection_handler##SAXK#Z()
7ff6844987a9 mysqld.exe!?deallocate#?$allocator#V?$sub_match#V?$_String_const_iterator#V?$_String_val#U?$_Simple_types#D#std###std###std###std###std##QEAAXQEAV?$sub_match#V?$_String_const_iterator#V?$_String_val#U?$_Simple_types#D#std###std###std###2#_K#Z() [truncated, 260 bytes total]
7ff68405139c mysqld.exe!?my_thread_self_setname##YAXPEBD#Z()
7ffab55c6b4c ucrtbase.dll!_recalloc()
7ffab7274ed0 KERNEL32.DLL!BaseThreadInitThunk()
7ffab7d9e44b ntdll.dll!RtlUserThreadStart()
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.
I have tried reducing the data read and written, then increasing the client connection limit
Rate Per Second = RPS
Suggestions to consider for your my.ini [mysqld] section to possibly avoid unplanned shutdowns.
innodb_thread_concurrency=10 # from 33 for reasonable limit for your 16 available total threads
innodb_redo_log_capacity=96M # from innodb_log_file_size name and 48M limit
**** this is current name rather then deprecated innodb_log_file_size per error log
innodb_buffer_pool_size=8G # from 124M for about 1/2 available RAM to reduce innodb_data_reads RPS of 31.
read_rnd_buffer_size=32K from 256K to reduce handler_read_rnd_next RPS of 63,041
thread_cache_size=128 # from 10 to reduce threads_created RPS of ~ 5
Please view profile for contact info. You have many opportunities to improve performance with additional Global Variable changes.
Would like to hear your story of how you get this much activity in 96 seconds of uptime. :)

MySQL MHA binlog setting check failed

i try to config MHA 0.56 for mysql 5.7, everything is done. when i run masterha_check_repl, i get the following message:
executing command: save_binary_logs --command=test --start_pos=4 --binlog_dir=/data/mysql --output_file=/data/mysql
Failed to save binary log: Set --start_file=<starting_binlog_filename> or --binlog_prefix=<binlog_file_prefix>
Binlog setting check failed!
I modified MasterMonitor.pm added
--binlog_prefix=mysql-bin
into the command , but it doesn't work, still gave me above error message.
I have no idea on how to deal with it..
Try setting binlog_prefix in my.cnf rather than via command line.
I made a mistake when I copied other's app1.cnf explanation into my app1.cnf.
The #comment after parameters in the same line should be removed.

InnoDB: File (unknown): 'read' returned OS error 403. Cannot continue operation ; [ERROR] mysqld got exception 0x80000003 ;

i am facing the following error recently. Mysql was hosted by XAMPP in local, and recently getting repetitively Error.
2020-04-28 7:28:12 260 [Warning] InnoDB: Retry attempts for reading partial data failed.
2020-04-28 7:28:12 260 [ERROR] InnoDB: Tried to read 16384 bytes at offset 49152, but was only able to read 0
2020-04-28 7:28:12 260 [ERROR] InnoDB: Operating system error number 203 in a file operation.
2020-04-28 7:28:12 260 [Note] InnoDB: Some operating system error numbers are described at https://mariadb.com/kb/en/library/operating-system-error-codes/
2020-04-28 7:28:12 260 [ERROR] InnoDB: File (unknown): 'read' returned OS error 403. Cannot continue operation
200428 7:28:17 [ERROR] mysqld got exception 0x80000003 ;
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.3.16-MariaDB
key_buffer_size=33554432
read_buffer_size=262144
max_used_connections=11
max_threads=65537
thread_count=9
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 36501 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x2b34eecdd28
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!my_parameter_handler()
mysqld.exe!strxnmov()
mysqld.exe!strxnmov()
mysqld.exe!parse_user()
mysqld.exe!parse_user()
mysqld.exe!parse_user()
mysqld.exe!parse_user()
mysqld.exe!pthread_dummy()
mysqld.exe!pthread_dummy()
mysqld.exe!parse_user()
mysqld.exe!pthread_dummy()
mysqld.exe!pthread_dummy()
mysqld.exe!parse_user()
mysqld.exe!parse_user()
mysqld.exe!parse_user()
mysqld.exe!?ha_rnd_next#handler##QEAAHPEAE#Z()
mysqld.exe!?rr_sequential##YAHPEAUREAD_RECORD###Z()
mysqld.exe!?sub_select##YA?AW4enum_nested_loop_state##PEAVJOIN##PEAUst_join_table##_N#Z()
mysqld.exe!?disjoin#?$List#VItem####QEAAXPEAV1##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!TpReleaseWait()
ntdll.dll!RtlInitializeResource()
KERNEL32.DLL!BaseThreadInitThunk()
ntdll.dll!RtlUserThreadStart()
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x2b34ef77140): SELECT `JCY_PROGRAM_BOM_ID`, `JCY_PROGRAM_BOM_MATERIAL_ID`, `JCY_PROGRAM_BOM_PROGRAM_ID`, `JCY_PROGRAM_BOM_CREATED_BY`, `JCY_PROGRAM_BOM_CREATED_DATETIME` FROM `jcy_program_bom`
where jcy_program_bom_material_id = 45 AND JCY_PROGRAM_BOM_PROGRAM_ID = 18
Connection ID (thread ID): 260
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=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on
Once this happen, the XAMPP's MYSQL service will be forced stop. And i will have to restart it again.
Anyone know how to fix/encounter this issue? Any guide or comment will be much appreciate

mysqld error - mysqld.exe has stopped working

have following issue after voltage jump today when I'm tring to start sql server..
12:46:46 UTC - mysqld got exception 0x80000003 ;
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.
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.
key_buffer_size=16777216
read_buffer_size=262144
max_used_connections=0
max_threads=151
thread_count=0
connection_count=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 133760 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x0
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...
1372780 mysqld.exe!my_thread_name()
15a56bd mysqld.exe!my_mb_ctype_mb()
14c4010 mysqld.exe!xor_string()
14c481d mysqld.exe!xor_string()
14250ee mysqld.exe!xor_string()
14b9141 mysqld.exe!xor_string()
14b957f mysqld.exe!xor_string()
141394d mysqld.exe!xor_string()
1413b76 mysqld.exe!xor_string()
1413e72 mysqld.exe!xor_string()
13fe0ac mysqld.exe!xor_string()
13e796e mysqld.exe!xor_string()
13a28fa mysqld.exe!xor_string()
1129990 mysqld.exe!?ha_initialize_handlerton##YAHPAUst_plugin_int###Z()
1162eae mysqld.exe!?plugin_lock_by_name##YAPAUst_plugin_int##PAVTHD##PBUst_mysql_lex_string##H#Z()
1167354 mysqld.exe!?plugin_init##YAHPAHPAPADH#Z()
11211bd mysqld.exe!?init_common_variables##YAHXZ()
1121eb0 mysqld.exe!?win_main##YAHHPAPAD#Z()
1122417 mysqld.exe!?mysql_service##YAHPAX#Z()
15a020a mysqld.exe!my_mb_ctype_mb()
75a4495d KERNEL32.DLL!BaseThreadInitThunk()
778c98ee ntdll.dll!RtlInitializeExceptionChain()
778c98c4 ntdll.dll!RtlInitializeExceptionChain()
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.
I already run mysqld --innodb_force_recovery=1 and drop all my tables, but an error wasn't solved. I only interested in normal sql running, can someone help? I'm using xampp 3.2.1 on windows 8, mysql version - 14.14 Distrib 5.6.11 for x86.

MySQL restart causes double free or corruption using MySQL C API

I have a c program that maintains a persistent MySQL connection, version 5.1.46. If I restart mysql while the program is running I get a double free or corruption error as such:
# /etc/init.d/mysql restart
Shutting down MySQL........ [ OK ]
Starting MySQL.*** glibc detected *** /home/user/a.out: double free or corruption (!prev): 0x000000000b64dd00 ***
======= Backtrace: =========
/lib64/libc.so.6[0x3739471634]
I am expecting the connection to automatically reconnect since I have set the MYSQL_OPT_RECONNECT option and have not explicitly closed this connection yet. In addition, the query I am executing is not a char* that I have accidentally set to NULL or deallocated, it is a constant, double quoted string.
Here are a few lines from the resulting core file in gdb
#11 0x000000000044ed71 in mysql_send_query (mysql=0x41966aa0, query=0x41966100 "SELECT count (*) from TableA", length=27) at client.c:2894
#12 0x000000000044edd9 in mysql_real_query (mysql=0x602a, query=0x602d <Address 0x602d out of bounds>, length=6) at client.c:2905
#13 0x000000000042b42f in do_query (conn=0x41966aa0, msg=0x41966100 "SELECT count(*) from TableA") at dosql.cpp:20
Any ideas why this might be occurring?
Any ideas why this might be occurring?
Because of a bug in MySQL.
You can try to update to later package, and see if the problem disappears.
Alternatively, run your client program under Valgrind, and it will report the bug in a way that is usable for fixing it. In particular, it will report
stack trace where the memory was allocated
stack trace where it has been freed
stack trace where double-free is happening (should be same as your GDB stack trace)
Given that info, you could report the bug to MySQL developers, and hope it will eventually be fixed.