The second stack trace is a different bug, which may or may not be related to bug #1042946 (it's a different stack, but it's reported as a Valgrind issue for the moment, so the crashing stack may be different).
Tom, if you are able to create a testcase, or provide us with a core dump + mysqld binary, it would help tremendously. In any case, a separate bug report should be logged for this.
For clarity, the original stacktrace cleaned up by running it through c++filt:
/usr/sbin/ mysqld( my_print_ stacktrace+ 0x35)[0x7c6395] mysqld( handle_ fatal_signal+ 0x4a4)[ 0x6967e4] .so.0(+ 0xeff0) [0x7f9ea2a33ff0 ] so.6(+0x10dd3a) [0x7f9ea1d0ad3a ] mysqld( TABLE:: init(THD* , TABLE_LIST* )+0x4c) [0x6111cc] mysqld( open_table( THD*, TABLE_LIST*, st_mem_root*, Open_table_ context* )+0x148) [0x55eba8] mysqld( open_tables( THD*, TABLE_LIST**, unsigned int*, unsigned int, Prelocking_ strategy* )+0x4f6) [0x560436] mysqld( mysql_update( THD*, TABLE_LIST*, List<Item>&, List<Item>&, Item*, unsigned int, st_order*, unsigned long 0xa9)[0x6087a9] /usr/sbin/ mysqld( mysql_execute_ c THD*)+0x13e4) [0x5970d4] mysqld( mysql_parse( THD*, char*, unsigned int, Parser_ state*) +0x333) [0x59a853] mysqld( Query_log_ event:: do_apply_ event(Relay_ log_info const*, char const*, unsigned int)+0xd04) [0x745144] mysqld( apply_event_ and_update_ pos(Log_ event*, THD*, Relay_log_ info*)+ 0x125)[ 0x533815] mysqld[ 0x538359] mysqld( handle_ slave_sql+ 0x949)[ 0x539799] .so.0(+ 0x68ca) [0x7f9ea2a2b8ca ] so.6(clone+ 0x6d)[0x7f9ea1c cc92d]
/usr/sbin/
/lib/libpthread
/lib/libc.
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
long, enum_duplicates, bool, unsigned long long*, unsigned long long*)+
ommand(
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/lib/libpthread
/lib/libc.
And, the stacktrace from #7 cleaned up:
/usr/sbin/ mysqld( my_print_ stacktrace+ 0x35)[0x7d3545] mysqld( handle_ fatal_signal+ 0x4a4)[ 0x69f394] .so.0(+ 0xf8f0) [0x7f6b4740b8f0 ] mysqld( Query_arena: :free_items( )+0x2d) [0x56ae7d] mysqld( THD::cleanup_ after_query( )+0x97) [0x56dc57] mysqld( mysql_parse( THD*, char*, unsigned int, Parser_ state*) +0x2c8) [0x59d5d8] mysqld( Query_log_ event:: do_apply_ event(Relay_ log_info const*, char const*, unsigned int)+0xd34) [0x7504b4] mysqld( apply_event_ and_update_ pos(Log_ event*, THD*, Relay_log_ info*)+ 0x12d)[ 0x534abd] mysqld[ 0x539152] mysqld( handle_ slave_sql+ 0x9a5)[ 0x53a605] .so.0(+ 0x69ca) [0x7f6b474029ca ] so.6(clone+ 0x6d)[0x7f6b466 9516d]
/usr/sbin/
/lib/libpthread
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/lib/libpthread
/lib/libc.
The second stack trace is a different bug, which may or may not be related to bug #1042946 (it's a different stack, but it's reported as a Valgrind issue for the moment, so the crashing stack may be different).
Tom, if you are able to create a testcase, or provide us with a core dump + mysqld binary, it would help tremendously. In any case, a separate bug report should be logged for this.