[MDEV-10034] Embedded server crashes on CREATE TABLE in PS protocol Created: 2016-05-06 Updated: 2016-05-08 Resolved: 2016-05-08 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Embedded Server, Prepared Statements |
| Affects Version/s: | 10.1 |
| Fix Version/s: | 10.1.14 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Elena Stepanova | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | regression | ||
| Issue Links: |
|
||||||||
| Description |
|
Assertion failure on debug server:
Crash on non-debug server:
The problem was introduced by this commit:
|
| Comments |
| Comment by Oleksandr Byelkin [ 2016-05-06 ] |
|
So the problem is that mem_root of prepared statement marked as thread specific. PS on embedded set THD too late. #4 0x000055555599d952 in my_malloc_size_cb_func (size=2008, is_thread_specific=1 '\001') at /home/sanja/maria/git/server/libmysqld/../sql/mysqld.cc:4007 IMHO THD should be set for all SP execution. Other solution is return checking THD in my_malloc_size_cb_func. |
| Comment by Oleksandr Byelkin [ 2016-05-06 ] |
|
There fix for the problem, but loaddata still fail (not all thread memory is free) and delete_returning (fields_mem_root marked as thread specific which I find wrong). revision-id: 9002b9696fb6d35ffb6a23f318e4c221674e6cd2 (mariadb-10.1.13-41-g9002b96)
alloc_root & free_root require current THD in case if they marked as thread specific (and stmt does). — |