← Back to team overview

oqgraph-dev team mailing list archive

New bug - server hang

 

Hi

It would seem that doing the following at the
 end of the test script, _provided_ at least one select on graph was conducted
on graph _and_ at least one row exists in graph_base (!)

DELETE FROM graph_base;
SELECT * FROM graph;

hangs the test execution process - and one core now at 100% :-)

CTRL+C kills everything succesfully.

Interestingly, an initial SELECT * FROM graph; immediately after the create
tables but before inserting any data does not hang, it is only after the delete.

Test case for this in my branches will be called exit_wierdness1.test

More interestingly,

DELETE FROM graph_base;
FLUSH TABLES;
TRUNCATE TABLE graph_base;
SELECT * FROM graph;
DROP TABLE graph_base;
SELECT * FROM graph WHERE latch='dijkstras' AND origid=1 AND destid=6;

causes the final select to unexpectedly apparently return success instead of
(error 42S02)

Perhaps you might see if V2 exhibits the same problems Arjen?

Meantime, I broke in with the debugger:

Accoring to HTOP thread 2 is the culprit, the other threads are 0% CPU.
(The others are block on pthread/sigwait anyway)

It seems to be stuck somewhere in our code, so I guess there is a bug where
something has been retained in memory or we are otherwise not properly
detecting that the backing store has no data.

I'll finish cleaning up the test cases I'm working on then I'll get onto this
one.  I also raised a bug in case it hits V2.

--Andrew

(gdb) inf thr
  Id   Target Id         Frame
  4    Thread 0x7f6a03815700 (LWP 22491) "mysqld"
pthread_cond_timedwait@@GLIBC_2.3.2 () at
../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:211
  3    Thread 0x7f69f6a1d700 (LWP 22494) "mysqld" do_sigwait
(set=0x7f69f6a1cdb0, sig=0x7f69f6a1ce68) at
../nptl/sysdeps/unix/sysv/linux/../../../../../sysdeps/unix/sysv/linux/sigwait.c:65
  2    Thread 0x7f69f69d4700 (LWP 22502) "mysqld" _db_return_ (_line_=1972,
_stack_frame_=0x7f69f69d21f0) at
/home/andrew/develop/maria/repo/oqgraph-varchar/dbug/dbug.c:1200
* 1    Thread 0x7f6a04844720 (LWP 22489) "mysqld" 0x00007f6a038da9d3 in
*__GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=-1) at
../sysdeps/unix/sysv/linux/poll.c:87

(gdb) thr 2
[Switching to thread 2 (Thread 0x7f69f69d4700 (LWP 22502))]
#0  _db_return_ (_line_=1972, _stack_frame_=0x7f69f69d21f0) at
/home/andrew/develop/maria/repo/oqgraph-varchar/dbug/dbug.c:1200
1200	    cs->framep= cs->framep->prev;
(gdb) bt
#0  _db_return_ (_line_=1972, _stack_frame_=0x7f69f69d21f0) at
/home/andrew/develop/maria/repo/oqgraph-varchar/dbug/dbug.c:1200
#1  0x00007f69f6cfbfb1 in handler::ha_rnd_init (this=0x2279388, scan=true) at
/home/andrew/develop/maria/repo/oqgraph-varchar/sql/handler.h:1972
#2  0x00007f69f6cfb87b in oqgraph3::cursor::seek_to (this=0x2326ea0,
origid=..., destid=...) at
/home/andrew/develop/maria/repo/oqgraph-varchar/storage/oqgraph/oqgraph_thunk.cc:512
#3  0x00007f69f6cf8a04 in oqgraph3::edge_iterator::seek (this=0x7f69f69d2470)
at
/home/andrew/develop/maria/repo/oqgraph-varchar/storage/oqgraph/oqgraph_shim.cc:35
#4  0x00007f69f6cf8b1a in oqgraph3::edge_iterator::operator*
(this=0x7f69f69d2470) at
/home/andrew/develop/maria/repo/oqgraph-varchar/storage/oqgraph/oqgraph_shim.cc:52
#5  0x00007f69f6ce10a3 in open_query::edges_cursor::fetch_row (this=0x2072a90,
row_info=..., result=...) at
/home/andrew/develop/maria/repo/oqgraph-varchar/storage/oqgraph/graphcore.cc:1074
#6  0x00007f69f6ce02fb in open_query::oqgraph::fetch_row (this=0x208ce90,
result=...) at
/home/andrew/develop/maria/repo/oqgraph-varchar/storage/oqgraph/graphcore.cc:937
#7  0x00007f69f6cdbe9e in ha_oqgraph::rnd_next (this=0x2275628, buf=0x2276898
 <incomplete sequence \361>) at
/home/andrew/develop/maria/repo/oqgraph-varchar/storage/oqgraph/ha_oqgraph.cc:991
#8  0x00000000007e53a1 in handler::ha_rnd_next (this=0x2275628, buf=0x2276898
 <incomplete sequence \361>) at
/home/andrew/develop/maria/repo/oqgraph-varchar/sql/handler.cc:2411
#9  0x000000000091d706 in rr_sequential (info=0x227d2d8) at
/home/andrew/develop/maria/repo/oqgraph-varchar/sql/records.cc:458
#10 0x000000000066e829 in sub_select (join=0x23806e8, join_tab=0x227d228,
end_of_records=false) at
/home/andrew/develop/maria/repo/oqgraph-varchar/sql/sql_select.cc:16278
#11 0x000000000066e011 in do_select (join=0x23806e8, fields=0x232f280,
table=0x0, procedure=0x0) at
/home/andrew/develop/maria/repo/oqgraph-varchar/sql/sql_select.cc:15929
#12 0x000000000064e38f in JOIN::exec_inner (this=0x23806e8) at
/home/andrew/develop/maria/repo/oqgraph-varchar/sql/sql_select.cc:2964
#13 0x000000000064b6a7 in JOIN::exec (this=0x23806e8) at
/home/andrew/develop/maria/repo/oqgraph-varchar/sql/sql_select.cc:2255
#14 0x000000000064ec3e in mysql_select (thd=0x232c010,
rref_pointer_array=0x232f3d0, tables=0x2380050, wild_num=1, fields=...,
conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0,
select_options=2147748608, result=0x23806c8, unit=0x232ea98,
select_lex=0x232f170) at
/home/andrew/develop/maria/repo/oqgraph-varchar/sql/sql_select.cc:3192
#15 0x000000000064547a in handle_select (thd=0x232c010, lex=0x232e9e0,
result=0x23806c8, setup_tables_done_option=0) at
/home/andrew/develop/maria/repo/oqgraph-varchar/sql/sql_select.cc:363
#16 0x000000000061d175 in execute_sqlcom_select (thd=0x232c010,
all_tables=0x2380050) at
/home/andrew/develop/maria/repo/oqgraph-varchar/sql/sql_parse.cc:5004
#17 0x0000000000615788 in mysql_execute_command (thd=0x232c010) at
/home/andrew/develop/maria/repo/oqgraph-varchar/sql/sql_parse.cc:2472
#18 0x000000000061f9ec in mysql_parse (thd=0x232c010, rawbuf=0x237fe68 "SELECT
* FROM graph", length=19, parser_state=0x7f69f69d3620) at
/home/andrew/develop/maria/repo/oqgraph-varchar/sql/sql_parse.cc:6124
#19 0x00000000006129ba in dispatch_command (command=COM_QUERY, thd=0x232c010,
packet=0x2238881 "1\373\373\t", packet_length=19) at
/home/andrew/develop/maria/repo/oqgraph-varchar/sql/sql_parse.cc:1266
#20 0x0000000000611b35 in do_command (thd=0x232c010) at
/home/andrew/develop/maria/repo/oqgraph-varchar/sql/sql_parse.cc:982
#21 0x0000000000721ba9 in do_handle_one_connection (thd_arg=0x232c010) at
/home/andrew/develop/maria/repo/oqgraph-varchar/sql/sql_connect.cc:1267
#22 0x0000000000721651 in handle_one_connection (arg=0x232c010) at
/home/andrew/develop/maria/repo/oqgraph-varchar/sql/sql_connect.cc:1181
#23 0x00000000009c5b46 in pfs_spawn_thread (arg=0x2358510) at
/home/andrew/develop/maria/repo/oqgraph-varchar/storage/perfschema/pfs.cc:1800
#24 0x00007f6a044438ca in start_thread (arg=<optimized out>) at
pthread_create.c:300
#25 0x00007f6a038e592d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#26 0x0000000000000000 in ?? ()





--Andrew


Follow ups