subselect_notembedded test fails on some platforms

Bug #545137 reported by Sergey Petrunia
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
Invalid
Undecided
Oleksandr "Sanja" Byelkin

Bug Description

subselect_notembedded.test fails on multiple platforms.

main.subselect_notembedded [ fail ]
        Test ended at 2010-03-22 02:50:26

CURRENT_TEST: main.subselect_notembedded
mysqltest: At line 57: query 'explain $start $end' failed with wrong errno 2013: 'Lost connection to MySQL server during query', instead of 0...

The result from queries just before the failure was:
< snip >
drop table if exists t1;
create table t1(a int,b int,key(a),key(b));
insert into t1(a,b) values (1,2),(2,1),(2,3),(3,4),(5,4),(5,5),
(6,7),(7,4),(5,3);
5
4
3
2
1
26
25
24
23
22
21
20
19
18
17
16

Server [mysqld.1 - pid: 6751, winpid: 6751, exit: 256] failed during test run
Server log from this test:
100322 2:50:25 - mysqld got signal 11 ;
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=1048576
read_buffer_size=131072
max_used_connections=4
max_threads=153
threads_connected=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 60955 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd: 0x92fbaa8
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...
stack_bottom = 0xacc2e3a4 thread_stack 0x48000
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(my_print_stacktrace+0x26)[0x8752c2b]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(handle_segfault+0x2d9)[0x8296813]
[0xffffe420]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN6StringD1Ev+0x11)[0x81ae6eb]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN10Copy_fieldD1Ev+0x14)[0x81e2f9c]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN15TMP_TABLE_PARAM7cleanupEv+0x58)[0x81e3ab0]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN4JOIN7cleanupEb+0x232)[0x8328542]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN4JOIN7destroyEv+0x124)[0x832c530]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN4JOIN7destroyEv+0xfc)[0x832c508]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN13st_select_lex7cleanupEv+0x93)[0x846134f]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN18st_select_lex_unit7cleanupEv+0x116)[0x8461156]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN13st_select_lex7cleanupEv+0xf7)[0x84613b3]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN18st_select_lex_unit7cleanupEv+0x116)[0x8461156]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN13st_select_lex7cleanupEv+0xf7)[0x84613b3]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN18st_select_lex_unit7cleanupEv+0x116)[0x8461156]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN13st_select_lex7cleanupEv+0xf7)[0x84613b3]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN18st_select_lex_unit7cleanupEv+0x116)[0x8461156]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN13st_select_lex7cleanupEv+0xf7)[0x84613b3]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN18st_select_lex_unit7cleanupEv+0x116)[0x8461156]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN13st_select_lex7cleanupEv+0xf7)[0x84613b3]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN18st_select_lex_unit7cleanupEv+0x116)[0x8461156]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN13st_select_lex7cleanupEv+0xf7)[0x84613b3]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN18st_select_lex_unit7cleanupEv+0x116)[0x8461156]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN13st_select_lex7cleanupEv+0xf7)[0x84613b3]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN18st_select_lex_unit7cleanupEv+0x116)[0x8461156]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN13st_select_lex7cleanupEv+0xf7)[0x84613b3]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN18st_select_lex_unit7cleanupEv+0x116)[0x8461156]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN13st_select_lex7cleanupEv+0xf7)[0x84613b3]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN18st_select_lex_unit7cleanupEv+0x116)[0x8461156]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN13st_select_lex7cleanupEv+0xf7)[0x84613b3]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN18st_select_lex_unit7cleanupEv+0x116)[0x8461156]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN13st_select_lex7cleanupEv+0xf7)[0x84613b3]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN18st_select_lex_unit7cleanupEv+0x116)[0x8461156]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN13st_select_lex7cleanupEv+0xf7)[0x84613b3]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN18st_select_lex_unit7cleanupEv+0x116)[0x8461156]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN13st_select_lex7cleanupEv+0xf7)[0x84613b3]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN18st_select_lex_unit7cleanupEv+0x116)[0x8461156]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN13st_select_lex7cleanupEv+0xf7)[0x84613b3]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN18st_select_lex_unit7cleanupEv+0x116)[0x8461156]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN13st_select_lex7cleanupEv+0xf7)[0x84613b3]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_ZN18st_select_lex_unit7cleanupEv+0x116)[0x8461156]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_Z11mysql_parseP3THDPKcjPS2_+0x338)[0x82b3e0a]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0xb09)[0x82b4cd5]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(_Z10do_commandP3THD+0x270)[0x82b6036]
/home/buildbot/maria-slave/psergey-foxhole-x86/build/sql/mysqld(handle_one_connection+0x156)[0x82a0df2]
/lib/libpthread.so.0[0xb7f53013]
/lib/libc.so.6(clone+0x5e)[0xb7e6249e]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x9cffa90 = explain select sum(a),a from t1 where a> ( select sum(a) from t1
where a> ( select sum(a) from t1
where a> ( select sum(a) from t1
where a> ( select sum(a) from t1
where a> ( select sum(a) from t1
where a> ( select sum(a) from t1
where a> ( select sum(a) from t1
where a> ( select sum(a) from t1
where a> ( select sum(a) from t1
where a> ( select sum(a) from t1
where a> ( select sum(a) from t1
where a> ( select sum(a) from t1
where a> ( select sum(a) from t1
where a> ( select sum(a) from t1
where a> ( select sum(a) from t1
where a> ( select sum(a) from t1 )group by b limit 1
)group by b limit 1
)group by b limit 1
)group by b limit 1
)group by b limit 1
)group by b limit 1
)group by b limit 1
)group by b limit 1
)group by b limit 1
)group by b limit 1
)group by b limit 1
)group by b limit 1
)group by b limit 1
)group by b limit 1
)group by b limit 1
)group by a
thd->thread_id=646
thd->killed=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.
Writing a core file
...
#0 0xb7f5814e in pthread_kill () from /lib/libpthread.so.0
#0 0xb7f5814e in pthread_kill () from /lib/libpthread.so.0
#1 0x08752caf in my_write_core (sig=11) at stacktrace.c:329
#2 0x08296a45 in handle_segfault (sig=11) at mysqld.cc:2683
#3 <signal handler called>
#4 0x081ae671 in String::free (this=0x6a209a60)
    at ../../../sql/sql_string.h:203
#5 0x081ae6eb in ~String (this=0x6a209a60) at ../../../sql/sql_string.h:102
#6 0x081e2f9c in ~Copy_field (this=0x6a209a34) at field.h:2228
#7 0x081e3ab0 in TMP_TABLE_PARAM::cleanup (this=0x96a8e5c) at sql_class.h:2805
#8 0x08328542 in JOIN::cleanup (this=0x96a41c8, full=true)
    at sql_select.cc:7875
#9 0x0832c530 in JOIN::destroy (this=0x96a41c8) at sql_select.cc:2239
#10 0x0832c508 in JOIN::destroy (this=0x949b340) at sql_select.cc:2235
#11 0x0846134f in st_select_lex::cleanup (this=0x9663bf0) at sql_union.cc:815
#12 0x08461156 in st_select_lex_unit::cleanup (this=0x9663d88)
    at sql_union.cc:681
#13 0x084613b3 in st_select_lex::cleanup (this=0x9663340) at sql_union.cc:822
#14 0x08461156 in st_select_lex_unit::cleanup (this=0x96634d0)
    at sql_union.cc:681
#15 0x084613b3 in st_select_lex::cleanup (this=0x9c15138) at sql_union.cc:822
#16 0x08461156 in st_select_lex_unit::cleanup (this=0x9c152d0)
    at sql_union.cc:681
#17 0x084613b3 in st_select_lex::cleanup (this=0x9c14870) at sql_union.cc:822
#18 0x08461156 in st_select_lex_unit::cleanup (this=0x9c14a08)
    at sql_union.cc:681
#19 0x084613b3 in st_select_lex::cleanup (this=0x9c13fa8) at sql_union.cc:822
#20 0x08461156 in st_select_lex_unit::cleanup (this=0x9c14140)
    at sql_union.cc:681
#21 0x084613b3 in st_select_lex::cleanup (this=0x95ec1a8) at sql_union.cc:822
#22 0x08461156 in st_select_lex_unit::cleanup (this=0x9c13a78)
    at sql_union.cc:681
#23 0x084613b3 in st_select_lex::cleanup (this=0x95eb8e0) at sql_union.cc:822
#24 0x08461156 in st_select_lex_unit::cleanup (this=0x95eba78)
    at sql_union.cc:681
#25 0x084613b3 in st_select_lex::cleanup (this=0x95eb018) at sql_union.cc:822
#26 0x08461156 in st_select_lex_unit::cleanup (this=0x95eb1b0)
    at sql_union.cc:681
#27 0x084613b3 in st_select_lex::cleanup (this=0x95ea780) at sql_union.cc:822
#28 0x08461156 in st_select_lex_unit::cleanup (this=0x95ea910)
    at sql_union.cc:681
#29 0x084613b3 in st_select_lex::cleanup (this=0x95e9e40) at sql_union.cc:822
#30 0x08461156 in st_select_lex_unit::cleanup (this=0x95e9fd8)
    at sql_union.cc:681
#31 0x084613b3 in st_select_lex::cleanup (this=0x95e9578) at sql_union.cc:822
#32 0x08461156 in st_select_lex_unit::cleanup (this=0x95e9710)
    at sql_union.cc:681
#33 0x084613b3 in st_select_lex::cleanup (this=0x95e8cb0) at sql_union.cc:822
#34 0x08461156 in st_select_lex_unit::cleanup (this=0x95e8e48)
    at sql_union.cc:681
#35 0x084613b3 in st_select_lex::cleanup (this=0x9d018c8) at sql_union.cc:822
#36 0x08461156 in st_select_lex_unit::cleanup (this=0x95e85a8)
    at sql_union.cc:681
#37 0x084613b3 in st_select_lex::cleanup (this=0x9d01000) at sql_union.cc:822
#38 0x08461156 in st_select_lex_unit::cleanup (this=0x9d01198)
    at sql_union.cc:681
#39 0x084613b3 in st_select_lex::cleanup (this=0x9d00738) at sql_union.cc:822
#40 0x08461156 in st_select_lex_unit::cleanup (this=0x9d008d0)
    at sql_union.cc:681
#41 0x084613b3 in st_select_lex::cleanup (this=0x92fd3a4) at sql_union.cc:822
#42 0x08461156 in st_select_lex_unit::cleanup (this=0x92fd11c)
    at sql_union.cc:681
#43 0x082b3e0a in mysql_parse (thd=0x92fbaa8,
    inBuf=0x9cffa90 "explain select sum(a),a from t1 where a> ( select sum(a) from t1 \nwhere a> ( select sum(a) from t1 \nwhere a> ( select sum(a) from t1 \nwhere a> ( select sum(a) from t1 \nwhere a> ( select sum(a) from t1"...,
    length=902, found_semicolon=0xacc2e260) at sql_parse.cc:6096
#44 0x082b4cd5 in dispatch_command (command=COM_QUERY, thd=0x92fbaa8,
    packet=0x9658ef1 "", packet_length=903) at sql_parse.cc:1253
#45 0x082b6036 in do_command (thd=0x92fbaa8) at sql_parse.cc:891
#46 0x082a0df2 in handle_one_connection (arg=0x92fbaa8) at sql_connect.cc:1599

Revision history for this message
Sergey Petrunia (sergefp) wrote :
Revision history for this message
Sergey Petrunia (sergefp) wrote :

I've tried to debug it, and discovered that
- It *seems* that stack overflow protection in SQL_SELECT::test_quick_select() and dsmrr_info() are able to catch that the stack is about to overflow
- The crash doesn't happen when one runs the crashing query alone, you need to run the testcase which will run queries with increasing depth until some of them fails.

Changed in maria:
milestone: none → 5.1
Revision history for this message
Philip Stoev (pstoev-askmonty) wrote :

Assigning to Sanja since it involves aggregates

Changed in maria:
assignee: nobody → Oleksandr "Sanja" Byelkin (sanja-byelkin)
Revision history for this message
Oleksandr "Sanja" Byelkin (sanja-byelkin) wrote :

There was no crashes of subselect_notembedded in 5.1/5.2/5.3 this year because of the mentioned cause (there was only one in 5.3 with valgrind problem). So the bug should be fixed.

Changed in maria:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.