[MDEV-2902] LP:860561 - One-time crash in mark_as_null_row with semijoin+materialization Created: 2011-09-27  Updated: 2015-02-02  Resolved: 2012-10-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Philip Stoev (Inactive) Assignee: Sergei Petrunia
Resolution: Incomplete Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug860561.xml     Text File LPexportBug860561_bug860561.log     Zip Archive LPexportBug860561_var-bug860561.zip    

 Description   

This crash happened only once and was not repeatable:

  1. 2011-09-27T03:19:50 #3 <signal handler called>
  2. 2011-09-27T03:19:50 #4 0x00000000006f7795 in mark_as_null_row (table=0x2aaacc181430)
  3. 2011-09-27T03:19:50 at mysql_priv.h:2628
  4. 2011-09-27T03:19:50 #5 0x000000000075577d in return_zero_rows (join=0x2aaacc179220, result=
  5. 2011-09-27T03:19:50 0x2aaacc1733a8, tables=..., fields=..., send_row=true,
  6. 2011-09-27T03:19:50 select_options=2147796992,
  7. 2011-09-27T03:19:50 info=0xd9a960 "Impossible WHERE noticed after reading const tables",
  8. 2011-09-27T03:19:50 having=0x0) at sql_select.cc:10225
  9. 2011-09-27T03:19:50 #6 0x00000000007560e0 in JOIN::exec (this=0x2aaacc179220)
  10. 2011-09-27T03:19:50 at sql_select.cc:2131
  11. 2011-09-27T03:19:50 #7 0x000000000075228e in mysql_select (thd=0x2aaabd1401d8,
  12. 2011-09-27T03:19:50 rref_pointer_array=0x2aaabd142db0, tables=0x69771a0, wild_num=0,
  13. 2011-09-27T03:19:50 fields=..., conds=0x2aaacc1731d0, og_num=0, order=0x0, group=0x0,
  14. 2011-09-27T03:19:50 having=0x0, proc_param=0x0, select_options=2147796992,
  15. 2011-09-27T03:19:50 result=0x2aaacc1733a8, unit=0x2aaabd142678, select_lex=0x2aaabd142b60)
  16. 2011-09-27T03:19:50 at sql_select.cc:2900
  17. 2011-09-27T03:19:50 #8 0x00000000007586b8 in handle_select (thd=0x2aaabd1401d8,
  18. 2011-09-27T03:19:50 lex=0x2aaabd1425d8, result=0x2aaacc1733a8, setup_tables_done_option=0)
  19. 2011-09-27T03:19:50 at sql_select.cc:283
  20. 2011-09-27T03:19:50 #9 0x00000000006a464a in execute_sqlcom_select (thd=0x2aaabd1401d8,
  21. 2011-09-27T03:19:50 all_tables=0x69771a0) at sql_parse.cc:5102
  22. 2011-09-27T03:19:50 #10 0x00000000006a672a in mysql_execute_command (thd=0x2aaabd1401d8)
  23. 2011-09-27T03:19:50 at sql_parse.cc:2247
  24. 2011-09-27T03:19:50 #11 0x00000000006af4c3 in mysql_parse (thd=0x2aaabd1401d8,
  25. 2011-09-27T03:19:50 rawbuf=0x6976430 "SELECT SUM( alias1 . `col_int_key` ) AS field1 FROM ( BB AS alias1 INNER JOIN ( ( BB AS alias2 STRAIGHT_JOIN C AS alias3 ON (alias3 . `pk` = alias2 . `pk` ) ) ) ON (alias3 . `pk` = alias2 . `col_int_key` ) ) WHERE ( ( 7, 8 ) IN ( SELECT SQ1_alias1 . `pk` AS SQ1_field1 , SQ1_alias1 . `pk` AS SQ1_field2 FROM ( C AS SQ1_alias1 LEFT OUTER JOIN B AS SQ1_alias2 ON (SQ1_alias2 . `col_varchar_key` = SQ1_alias1 . `col_varchar_nokey` ) ) HAVING SQ1_alias1 . `pk` = 'v' ) ) AND ( alias1 . `pk` > 71 AND alias1 . `pk` < ( 71 + 59 ) OR alias1 . `pk` NOT IN (120) ) AND ( alias3 . `col_varchar_key` IN ( SELECT 'j' UNION SELECT 'p' ) AND alias1 . `col_int_key` IS NULL ) /* 5 */",
  26. 2011-09-27T03:19:50 length=688, found_semicolon=0x4f921f08) at sql_parse.cc:6102
  27. 2011-09-27T03:19:50 #12 0x00000000006b0051 in dispatch_command (command=COM_QUERY,
  28. 2011-09-27T03:19:50 thd=0x2aaabd1401d8,
  29. 2011-09-27T03:19:50 packet=0x2aaabd147819 " SELECT SUM( alias1 . `col_int_key` ) AS field1 FROM ( BB AS alias1 INNER JOIN ( ( BB AS alias2 STRAIGHT_JOIN C AS alias3 ON (alias3 . `pk` = alias2 . `pk` ) ) ) ON (alias3 . `pk` = alias2 . `col_int_key` ) ) WHERE ( ( 7, 8 ) IN ( SELECT SQ1_alias1 . `pk` AS SQ1_field1 , SQ1_alias1 . `pk` AS SQ1_field2 FROM ( C AS SQ1_alias1 LEFT OUTER JOIN B AS SQ1_alias2 ON (SQ1_alias2 . `col_varchar_key` = SQ1_alias1 . `col_varchar_nokey` ) ) HAVING SQ1_alias1 . `pk` = 'v' ) ) AND ( alias1 . `pk` > 71 AND alias1 . `pk` < ( 71 + 59 ) OR alias1 . `pk` NOT IN (120) ) AND ( alias3 . `col_varchar_key` IN ( SELECT 'j' UNION SELECT 'p' ) AND alias1 . `col_int_key` IS NULL ) /* 5 */", packet_length=690) at sql_parse.cc:1221
  30. 2011-09-27T03:19:50 #13 0x00000000006b168f in do_command (thd=0x2aaabd1401d8) at sql_parse.cc:916
  31. 2011-09-27T03:19:50 #14 0x000000000069be9f in handle_one_connection (arg=0x2aaabd1401d8)
  32. 2011-09-27T03:19:50 at sql_connect.cc:1187
  33. 2011-09-27T03:19:50 #15 0x00000033b600673d in start_thread () from /lib64/libpthread.so.0
  34. 2011-09-27T03:19:50 #16 0x00000033b58d40cd in clone () from /lib64/libc.so.6

crashing query:

SELECT SUM( alias1 . `col_int_key` ) AS field1 FROM ( BB AS alias1 INNER JOIN ( ( BB AS alias2 STRAIGHT_JOIN C AS alias3 ON (alias3 . `pk` = alias2 . `pk` ) ) ) ON (alias3 . `pk` = alias2 . `col_int_key` ) ) WHERE ( ( 7, 8 ) IN ( SELECT SQ1_alias1 . `pk` AS SQ1_field1 , SQ1_alias1 . `pk` AS SQ1_field2 FROM ( C AS SQ1_alias1 LEFT OUTER JOIN B AS SQ1_alias2 ON (SQ1_alias2 . `col_varchar_key` = SQ1_alias1 . `col_varchar_nokey` ) ) HAVING SQ1_alias1 . `pk` = 'v' ) ) AND ( alias1 . `pk` > 71 AND alias1 . `pk` < ( 71 + 59 ) OR alias1 . `pk` NOT IN (120) ) AND ( alias3 . `col_varchar_key` IN ( SELECT 'j' UNION SELECT 'p' ) AND alias1 . `col_int_key` IS NULL )

RQG commmand line:

perl runall.pl -queries=100000000 --debug --seed=time --mysqld1=debug-assert-if-crashed-table --mysqld1=innodb_stats_sample_pages=256 --mysqld1=max_join_size=1000000 --queries=100M --duration=900 --threads=6 --seed=time --mysqld1=log-output=file --no-mask --views --reporter=QueryTimeout,Backtrace,ErrorLog,Deadlock --basedir1=/home/philips/bzr/maria-5.3 --mysqld1=-optimizer_switch=semijoin=ON,materialization=ON,firstmatch=OFF,loosescan=OFF --validator=Transformer --transformers=DisableChosenPlan,ConvertLiteralsToSubqueries,ExecuteAsInsertSelect,ExecuteAsSelectItem,ExecuteAsUpdateDelete,ExecuteAsWhereSubquery,InlineSubqueries --grammar=conf/optimizer/optimizer_subquery.yy --seed=1317082782



 Comments   
Comment by Philip Stoev (Inactive) [ 2011-09-27 ]

Re: One-time crash in mark_as_null_row with semijoin+materialization

Comment by Philip Stoev (Inactive) [ 2011-09-27 ]

core + binary + datadir
LPexportBug860561_var-bug860561.zip

Comment by Philip Stoev (Inactive) [ 2011-09-27 ]

Re: One-time crash in mark_as_null_row with semijoin+materialization

Comment by Philip Stoev (Inactive) [ 2011-09-27 ]

RQG log
LPexportBug860561_bug860561.log

Comment by Philip Stoev (Inactive) [ 2011-10-11 ]

Re: One-time crash in mark_as_null_row with semijoin+materialization
See valgrind warnings in 869876

Comment by Rasmus Johansson (Inactive) [ 2011-12-06 ]

Launchpad bug id: 860561

Comment by Sergei Petrunia [ 2011-12-06 ]

Re: One-time crash in mark_as_null_row with semijoin+materialization
Changing status to Incomplete

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