OK. Updated fix that properly inits ref memory. Now crashing with a better stacktrace than what we used to get: Thread 1 (Thread 0x7f2431a4c700 (LWP 11749)): #0 0x00007f2438ad54ec in pthread_kill () from /lib/x86_64-linux-gnu/libpthread.so.0 #1 0x0000000000ea1f9f in my_write_core (sig=6) at /home/andrew/maria/bz/repo/10.0-oqgraph3-varchar/mysys/stacktrace.c:457 #2 0x000000000081fa19 in handle_fatal_signal (sig=6) at /home/andrew/maria/bz/repo/10.0-oqgraph3-varchar/sql/signal_handler.cc:262 #3 #4 0x00007f2437778475 in raise () from /lib/x86_64-linux-gnu/libc.so.6 #5 0x00007f243777b6f0 in abort () from /lib/x86_64-linux-gnu/libc.so.6 #6 0x00007f2437771621 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6 #7 0x000000000082c300 in handler::ha_external_lock (this=0x2d0fdc8, thd=0x2d008c0, lock_type=2) at /home/andrew/maria/bz/repo/10.0-oqgraph3-varchar/sql/handler.cc:5711 #8 0x00007f24322e78f6 in ha_oqgraph::external_lock (this=0x2d0ca58, thd=0x2d008c0, lock_type=2) at /home/andrew/maria/bz/repo/10.0-oqgraph3-varchar/storage/oqgraph/ha_oqgraph.cc:1113 #9 0x000000000082c38c in handler::ha_external_lock (this=0x2d0ca58, thd=0x2d008c0, lock_type=2) at /home/andrew/maria/bz/repo/10.0-oqgraph3-varchar/sql/handler.cc:5740 #10 0x00000000008fcab6 in unlock_external (thd=0x2d008c0, table=0x2cf8c28, count=1) at /home/andrew/maria/bz/repo/10.0-oqgraph3-varchar/sql/lock.cc:671 #11 0x00000000008fc1f2 in mysql_unlock_read_tables (thd=0x2d008c0, sql_lock=0x2cf8c00) at /home/andrew/maria/bz/repo/10.0-oqgraph3-varchar/sql/lock.cc:430 #12 0x000000000069a3cf in JOIN::join_free (this=0x2cc0c78) at /home/andrew/maria/bz/repo/10.0-oqgraph3-varchar/sql/sql_select.cc:11065 #13 0x00000000006a751d in do_select (join=0x2cc0c78, fields=0x2d04ba0, table=0x0, procedure=0x0) at /home/andrew/maria/bz/repo/10.0-oqgraph3-varchar/sql/sql_select.cc:16513 #14 0x000000000068664f in JOIN::exec_inner (this=0x2cc0c78) at /home/andrew/maria/bz/repo/10.0-oqgraph3-varchar/sql/sql_select.cc:2994 #15 0x0000000000683c27 in JOIN::exec (this=0x2cc0c78) at /home/andrew/maria/bz/repo/10.0-oqgraph3-varchar/sql/sql_select.cc:2292 #16 0x0000000000686ed0 in mysql_select (thd=0x2d008c0, rref_pointer_array=0x2d04d00, tables=0x2cbfa00, wild_num=1, fields=..., conds=0x2cc0618, og_num=1, order=0x2cc0b80, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x2cc0c58, unit=0x2d043b8, select_lex=0x2d04a90) at /home/andrew/maria/bz/repo/10.0-oqgraph3-varchar/sql/sql_select.cc:3222 #17 0x000000000067dabd in handle_select (thd=0x2d008c0, lex=0x2d042f8, result=0x2cc0c58, setup_tables_done_option=0) at /home/andrew/maria/bz/repo/10.0-oqgraph3-varchar/sql/sql_select.cc:371 #18 0x0000000000653a23 in execute_sqlcom_select (thd=0x2d008c0, all_tables=0x2cbfa00) at /home/andrew/maria/bz/repo/10.0-oqgraph3-varchar/sql/sql_parse.cc:5123 #19 0x000000000064c52e in mysql_execute_command (thd=0x2d008c0) at /home/andrew/maria/bz/repo/10.0-oqgraph3-varchar/sql/sql_parse.cc:2518 #20 0x00000000006561c2 in mysql_parse (thd=0x2d008c0, rawbuf=0x2cbf7a8 "SELECT * FROM graph WHERE latch='1' and destid=2 and origid=1 order by seq", length=74, parser_state=0x7f2431a4b660) at /home/andrew/maria/bz/repo/10.0-oqgraph3-varchar/sql/sql_parse.cc:6264 #21 0x0000000000649882 in dispatch_command (command=COM_QUERY, thd=0x2d008c0, packet=0x2caf951 "", packet_length=74) at /home/andrew/maria/bz/repo/10.0-oqgraph3-varchar/sql/sql_parse.cc:1277 #22 0x0000000000648d0e in do_command (thd=0x2d008c0) at /home/andrew/maria/bz/repo/10.0-oqgraph3-varchar/sql/sql_parse.cc:983 #23 0x000000000075b9d1 in do_handle_one_connection (thd_arg=0x2d008c0) at /home/andrew/maria/bz/repo/10.0-oqgraph3-varchar/sql/sql_connect.cc:1379 #24 0x000000000075b724 in handle_one_connection (arg=0x2d008c0) at /home/andrew/maria/bz/repo/10.0-oqgraph3-varchar/sql/sql_connect.cc:1293 #25 0x0000000000c394e9 in pfs_spawn_thread (arg=0x2e015f0) at /home/andrew/maria/bz/repo/10.0-oqgraph3-varchar/storage/perfschema/pfs.cc:1853 #26 0x00007f2438acfb50 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0 #27 0x00007f2437820a7d in clone () from /lib/x86_64-linux-gnu/libc.so.6 #28 0x0000000000000000 in ?? ()