Bug #59850 rqg_mdl_stability failing on mysql-trunk with a query delay
Submitted: 31 Jan 2011 15:22 Modified: 13 Jul 2011 10:40
Reporter: Sandeep Doddaballapur Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Locking Severity:S2 (Serious)
Version:mysql-trunk OS:Linux
Assigned to: Jon Olav Hauglid CPU Architecture:Any
Tags: rqg_pb2

[31 Jan 2011 15:22] Sandeep Doddaballapur
Description:
rqg_mdl_stability test failing on the trunk sporadically with the same reason 
"STATUS_LENGTH_MISMATCH (32)"

The test is failing on multiple platforms - linux,windows,solaris

Following is the snippet from the log 
==============================
# 2011-01-28T21:34:57 Query: SELECT /* QUERY_ID: 9923840 */ /* RESULTSET_SAME_DATA_IN_EVERY_ROW */ func_3 ( `col_int_key` ) AS `col_int_key` FROM  view_1 WHERE 2 < func_1 ( 6 ); returns different result when executed after a delay of 0 seconds.
# 2011-01-28T21:34:57 --- /export/home/pb2/test/sb_1-2906648-1296246827.66/tmp//randgen32392-1296246897-server0.dump	2011-01-28 21:34:57.000000000 +0100
# 2011-01-28T21:34:57 +++ /export/home/pb2/test/sb_1-2906648-1296246827.66/tmp//randgen32392-1296246897-server1.dump	2011-01-28 21:34:57.000000000 +0100
# 2011-01-28T21:34:57 @@ -1,11 +1,10 @@
# 2011-01-28T21:34:57 -0
# 2011-01-28T21:34:57 -0
# 2011-01-28T21:34:57 -0
# 2011-01-28T21:34:57 -0
# 2011-01-28T21:34:57 -0
# 2011-01-28T21:34:57 -0
# 2011-01-28T21:34:57 -0
# 2011-01-28T21:34:57 -0
# 2011-01-28T21:34:57 -0
# 2011-01-28T21:34:57 -0
# 2011-01-28T21:34:57 -0
# 2011-01-28T21:34:57 +6
==============================

Following are links to the logs of the most recently seen errors
http://pb2.norway.sun.com/web.py?action=archive_download&archive_id=2917156&pretty=please
http://pb2.norway.sun.com/web.py?action=archive_download&archive_id=2907107&pretty=please
http://pb2.norway.sun.com/web.py?action=archive_download&archive_id=2911584&pretty=p

Following is the command used to run the test on pb2
perl runall-new.pl \ 
--mysqld=--loose-skip-safemalloc \ 
--grammar=conf/runtime/metadata_stability.yy \ 
--gendata=conf/runtime/metadata_stability.zz \ 
--validator=SelectStability,QueryProperties \ 
--engine=Innodb \ 
--mysqld=--innodb \ 
--mysqld=--default-storage-engine=Innodb \ 
--mysqld=--transaction-isolation=SERIALIZABLE \ 
--mysqld=--innodb-flush-log-at-trx-commit=2 \ 
--mysqld=--loose-table-lock-wait-timeout=1 \ 
--mysqld=--innodb-lock-wait-timeout=1 \ 
--mysqld=--log-output=file \ 
--queries=1M \ 
--duration=600 \ 
--reporters=Deadlock,ErrorLog,Backtrace \ 
--basedir=/export/home/pb2/test/sb_1-2906648-1296246827.66/mysql-5.6.2-m5-linux-i686-test \ 
--vardir=/export/home/pb2/test/sb_1-2906648-1296246827.66/mysql-5.6.2-m5-linux-i686-test/vardirs \ 
--mysqld=--loose-lock-wait-timeout=1 \ 
--testname=rqg_mdl_stability \ 
--xml-output=/export/home/pb2/test/sb_1-2906648-1296246827.66/tmp/rqg_mdl_stability.xml \ 
--report-xml-tt \ 
--report-xml-tt-type=scp \ 
--report-xml-tt-dest=regin.norway.sun.com:/raid/xml_results/TestTool/xml/

How to repeat:
Analyzing the issue . Will post the steps soon.
[10 Feb 2011 3:25] Sandeep Doddaballapur
A similar query as reported in the bug description has resulted in a server crash on windows platform in the same test rqg_mdl_stability.

The query reported is following 
==============================
SELECT /* QUERY_ID: 16607488 */ /* RESULTSET_SAME_DATA_IN_EVERY_ROW */ func_2 ( `col_int_key` ) AS `col_int_key` FROM  view_2
============================== 

Following is the snippet from crash report
=====================================
key_buffer_size=1048576
read_buffer_size=131072
max_used_connections=12
max_threads=151
thread_count=11
connection_count=11
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 60197 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0xb6c5118
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...
007B8A03    mysqld.exe!my_thread_var_dbug()
00A4538B    mysqld.exe!my_strnncoll_gbk()
00A4F295    mysqld.exe!my_strnncoll_gbk()
00A47AD7    mysqld.exe!my_strnncoll_gbk()
004D5E85    mysqld.exe!?init_result_field@Item_func_sp@@AAE_NPAVTHD@@@Z()
004D6B54    mysqld.exe!?fix_fields@Item_func_sp@@UAE_NPAVTHD@@PAPAVItem@@@Z()
0057F3AB    mysqld.exe!?create_view_field@@YAPAVItem@@PAVTHD@@PAUTABLE_LIST@@PAPAV1@PBD@Z()
0057F29F    mysqld.exe!?create_item@Field_iterator_view@@UAEPAVItem@@PAVTHD@@@Z()
00481529    mysqld.exe!?find_field_in_table_ref@@YAPAVField@@PAVTHD@@PAUTABLE_LIST@@PBDI222PAPAVItem@@_N4PAI4PAPAU3@@Z()
0048107F    mysqld.exe!?find_field_in_table_ref@@YAPAVField@@PAVTHD@@PAUTABLE_LIST@@PBDI222PAPAVItem@@_N4PAI4PAPAU3@@Z()
00481FC9    mysqld.exe!?find_field_in_tables@@YAPAVField@@PAVTHD@@PAVItem_ident@@PAUTABLE_LIST@@2PAPAVItem@@W4find_item_error_report_type@@_N5@Z()
0052E024    mysqld.exe!?fix_outer_field@Item_field@@QAEHPAVTHD@@PAPAVField@@PAPAVItem@@@Z()
0052ED5F    mysqld.exe!?fix_fields@Item_field@@UAE_NPAVTHD@@PAPAVItem@@@Z()
004C20B0    mysqld.exe!?fix_fields@Item_func@@UAE_NPAVTHD@@PAPAVItem@@@Z()
004D6B8C    mysqld.exe!?fix_fields@Item_func_sp@@UAE_NPAVTHD@@PAPAVItem@@@Z()
00482ED9    mysqld.exe!?setup_fields@@YA_NPAVTHD@@PAPAVItem@@AAV?$List@VItem@@@@W4enum_mark_columns@@PAV3@_N@Z()
005A95B6    mysqld.exe!?prepare@JOIN@@QAEHPAPAPAVItem@@PAUTABLE_LIST@@IPAV2@IPAUst_order@@323PAVst_select_lex@@PAVst_select_lex_unit@@@Z()
005B1068    mysqld.exe!?mysql_select@@YA_NPAVTHD@@PAPAPAVItem@@PAUTABLE_LIST@@IAAV?$List@VItem@@@@PAV2@IPAUst_order@@545_KPAVselect_result@@PAVst_select_lex_unit@@PAVst_select_lex@@@Z()
005A8F61    mysqld.exe!?handle_select@@YA_NPAVTHD@@PAULEX@@PAVselect_result@@K@Z()
0054BD78    mysqld.exe!?mysql_execute_command@@YAHPAVTHD@@@Z()
0054598A    mysqld.exe!?mysql_execute_command@@YAHPAVTHD@@@Z()
0054DC74    mysqld.exe!?mysql_parse@@YAXPAVTHD@@PADIPAVParser_state@@@Z()
005439B4    mysqld.exe!?dispatch_command@@YA_NW4enum_server_command@@PAVTHD@@PADI@Z()
005431F9    mysqld.exe!?do_command@@YA_NPAVTHD@@@Z()
00458400    mysqld.exe!?do_handle_one_connection@@YAXPAVTHD@@@Z()
00457FEC    mysqld.exe!handle_one_connection()
007B7968    mysqld.exe!pthread_create()
00A50FC3    mysqld.exe!my_strnncoll_gbk()
00A50F64    mysqld.exe!my_strnncoll_gbk()
77E6482F    kernel32.dll!GetModuleHandleA()
=====================================

Following is the link to the log 
http://pb2.norway.sun.com/web.py?action=archive_download&archive_id=2956182&pretty=please

This crash was as a result of push 
http://pb2.norway.sun.com/web.py?template=push_details&push=2001487&build=2002067&file=295...
[10 Feb 2011 8:01] Jon Olav Hauglid
Sandeep, that crash is a separate issue.
Please report it as a separate bug if it hasn't been already.
[13 Jul 2011 10:40] Jon Olav Hauglid
Since RQG was updated on pushbuild, this test has not failed (at least after
a few RQG issues were fixed).

Therefore closing the bug as Can't repeat.