[MDEV-3553] LP:524025 - Running RQG outer_join test leads to crash Created: 2010-02-18  Updated: 2012-10-04  Resolved: 2012-10-04

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

Type: Bug Priority: Major
Reporter: Hakan Küçükyılmaz (Inactive) Assignee: Sergei Petrunia
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug524025.xml     File LPexportBug524025_bug524025.sql.gz     File LPexportBug524025_outer_join_linux.trace     File LPexportBug524025_outer_join_macosx.trace    

 Description   

Running RQG outer_join test crashes MariaDB. The crash happens on Linux 64-bit and Mac OS X Intel 64-bit. This crash happens with the patch for fixing Bug LP#523593

I attached the full stack trace from a Linux run.

How to repeat

  • Get latest Random Query Generator from lp:randgen
  • Get latest MariaDB from lp:maria
    I tested with revno: 2818, timestamp: Wed 2010-02-17 21:10:02 +0100
  • Compile MariaDB with BUILD/compile-amd64-max
  • Run the RQG test like

time perl runall.pl \
--basedir=${HOME}/work/monty_program/maria \
--gendata=conf/outer_join.zz \
--grammar=conf/outer_join.yy \
--queries=1000000 \
--threads=1

Stack trace on Mac OS X
Hope that's ok; if not, decrease some variables in the equation.

thd: 0x11261d590
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...

  1. 20:42:09 datadir is /Users/hakan/work/monty_program/maria/mysql-test/var/master-data/
  2. 20:42:09 binary is /Users/hakan/work/monty_program/maria/mysql-test//../sql/mysqld
  3. 20:42:09 bindir is /Users/hakan/work/monty_program/maria/mysql-test//../sql
  4. 20:42:09 core is /cores/core.68773
  5. 20:42:13 Reading symbols for shared libraries .... done
  6. 20:42:13 Reading symbols for shared libraries . done
  7. 20:42:13 Reading symbols for shared libraries .... done
  8. 20:42:13 #0 0x00007fff86e8e9e2 in select$DARWIN_EXTSN ()
  9. 20:42:13 #0 0x00007fff86e8e9e2 in select$DARWIN_EXTSN ()
  10. 20:42:13 #1 0x00000001000f8522 in handle_connections_sockets (arg=<value temporarily unavailable, due to optimizations>) at mysqld.cc:5197
  11. 20:42:13 #2 0x00000001000f936f in main (argc=<value temporarily unavailable, due to optimizations>, argv=<value temporarily unavailable, due to optimizations>) at mysqld.cc:4668
    Previous frame inner to this frame (gdb could not unwind past this frame)
  12. 20:42:16 Reading symbols for shared libraries .... done
  13. 20:42:16 Reading symbols for shared libraries . done
  14. 20:42:16 Reading symbols for shared libraries .... done
  15. 20:42:16 #0 0x00007fff86e8e9e2 in select$DARWIN_EXTSN ()
  16. 20:42:16
  17. 20:42:16 Thread 24 (core thread 23):
  18. 20:42:16 #0 0x00007fff86e8c250 in pthread_get_stackaddr_np ()
  19. 20:42:16 #1 0x00007fff86ebe9c1 in backtrace ()
  20. 20:42:16 #2 0x00007fff86ebe967 in backtrace ()
  21. 20:42:16 #3 0x00000001004f7809 in my_print_stacktrace (stack_bottom=0x1 <Address 0x1 out of bounds>, thread_stack=294912) at stacktrace.c:111
  22. 20:42:16 #4 0x00000001000f24e2 in handle_segfault (sig=11) at mysqld.cc:2584
  23. 20:42:16 #5 <signal handler called>
  24. 20:42:16 #6 set_position (join=0x106056618, idx=<value temporarily unavailable, due to optimizations>, table=0x1063c1dd0, key=<value temporarily unavailable, due to optimizations>) at sql_select.cc:4150
  25. 20:42:16 #7 0x000000010028964f in eliminate_tables_for_list (join=0x106056618, join_list=<value temporarily unavailable, due to optimizations>, list_tables=255, on_expr=0x0, tables_used_elsewhere=31) at opt_table_elimination.cc:1785
  26. 20:42:16 #8 0x0000000100171ff1 in make_join_statistics (join=<value temporarily unavailable, due to optimizations>, tables_arg=0x106099878, conds=0x106316fe8, keyuse_array=0x106057be0) at sql_select.cc:2708
  27. 20:42:16 #9 0x00000001150f1ef0 in ?? ()
  28. 20:42:16


 Comments   
Comment by Hakan Küçükyılmaz (Inactive) [ 2010-02-18 ]

Re: Running RQG outer_join test leads to crash

Comment by Hakan Küçükyılmaz (Inactive) [ 2010-02-18 ]

outer_join_macosx.trace
LPexportBug524025_outer_join_macosx.trace

Comment by Hakan Küçükyılmaz (Inactive) [ 2010-02-18 ]

Re: Running RQG outer_join test leads to crash

Comment by Hakan Küçükyılmaz (Inactive) [ 2010-02-18 ]

Full Linux stack trace of the crash with RQG outer_join
LPexportBug524025_outer_join_linux.trace

Comment by Sergei Petrunia [ 2010-03-05 ]

Re: Running RQG outer_join test leads to crash
Query that causes the crash:

SELECT
table3.col_int AS field1,
table1.col_int AS field2,
table1.col_int_key AS field3,
table1.pk AS field4,
table1.col_int AS field5,
table2.col_int AS field6
FROM
CC AS table1
LEFT OUTER JOIN
K AS table2
LEFT JOIN Z AS table3
RIGHT JOIN H AS table4
LEFT JOIN M AS table5 ON table4.pk = table5.pk
LEFT JOIN A AS table6 ON table5.col_int_key = table6.pk
ON table3.col_int_key = table5.pk
ON table2.col_varchar_1024_latin1_key = table5.col_varchar_10_utf8_key
LEFT JOIN O AS table7 ON table2.pk = table7.col_int
ON table1.col_varchar_10_latin1 = table5.col_varchar_1024_latin1_key
LEFT JOIN E AS table8 ON table3.col_int = table8.col_int
WHERE
table1.col_int_key < table2.pk
HAVING
field4 != 6

Comment by Sergei Petrunia [ 2010-03-05 ]

Re: Running RQG outer_join test leads to crash
Test dataset from RQG.

Comment by Sergei Petrunia [ 2010-03-05 ]

Test dataset from RQG.
Test dataset
LPexportBug524025_bug524025.sql.gz

Comment by Sergei Petrunia [ 2010-03-06 ]

Re: Running RQG outer_join test leads to crash
Please review: https://lists.launchpad.net/maria-developers/msg02416.html

Comment by Sergei Petrunia [ 2010-03-06 ]

Re: Running RQG outer_join test leads to crash
With the fix applied, outer_join.yy will still crash the server. That crash seems to an unrelated problem as it can be repeated in mainline 5.1, too, with the same stack trace. See http://bugs.mysql.com/bug.php?id=51780.

Comment by Sergei Petrunia [ 2010-06-27 ]

Re: Running RQG outer_join test leads to crash
The fix was pushed into 5.2 some time ago.

Comment by Rasmus Johansson (Inactive) [ 2010-06-27 ]

Launchpad bug id: 524025

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