5.7 mtr - incorrect thd::query string access causes assertion percona-server/include/thr_mutex.h:153: void safe_mutex_assert_not_owner(const my_mutex_t*): Assertion `!mp->count || !my_thread_equal(my_thread_self(), mp->thread)' failed.

Description

rocksdb.rocksdb_deadlock_detect_rc
rocksdb.rocksdb_deadlock_detect_rr

5.7 added more protections around thd::query and compilations were fixed in at this commit https://github.com/percona/percona-server/commit/c601cb4079068788ad480df3b07aae3e81824c19

The problem is those changes do not account for cross thread access which now asserts like above. This typically happens when something like an i_s table is traversing/reporting queries from other threads. The fix is to properly use the new thd_query_safe function to access/copy the string.

Environment

None

Smart Checklist

Activity

Show:

George Lorch March 6, 2017 at 11:41 PM

Done

Details

Assignee

Reporter

Labels

Components

Fix versions

Priority

Smart Checklist

Created March 6, 2017 at 10:46 PM
Updated April 30, 2018 at 6:33 PM
Resolved March 7, 2017 at 3:47 PM