diff options
author | Nirbhay Choubey <nirbhay@mariadb.com> | 2015-09-25 13:56:02 -0400 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2015-09-25 18:50:57 -0400 |
commit | 6927459e5b61a6ca88245872cc3c2c5daa30dddf (patch) | |
tree | 39bd497e9cee65248fb8eaa6c4ddc4df662d0e0c /mysys/my_alloc.c | |
parent | 59037d962985ca46ccce379ed8b373b57a9e38f0 (diff) | |
download | mariadb-git-6927459e5b61a6ca88245872cc3c2c5daa30dddf.tar.gz |
MDEV-8208: Sporadic SEGFAULT on startup
Addendum:
* Before calling THD::init_for_queries(), flip the current_thd to wsrep
thread so that memory gets allocated for the right THD.
* Use wsrep_creating_startup_threads instead of plugins_are_initialized
as the condition for the execution of THD::init_for_queries() within
start_wsrep_THD(), as use of latter could still leave some room for
race.
Diffstat (limited to 'mysys/my_alloc.c')
-rw-r--r-- | mysys/my_alloc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mysys/my_alloc.c b/mysys/my_alloc.c index 1e687a3dec2..664a7380ca4 100644 --- a/mysys/my_alloc.c +++ b/mysys/my_alloc.c @@ -105,6 +105,7 @@ void init_alloc_root(MEM_ROOT *mem_root, size_t block_size, void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size, size_t pre_alloc_size __attribute__((unused))) { + DBUG_ENTER("reset_root_defaults"); DBUG_ASSERT(alloc_root_inited(mem_root)); mem_root->block_size= (((block_size - ALLOC_ROOT_MIN_BLOCK_SIZE) & ~1) | @@ -127,7 +128,7 @@ void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size, { /* We found a suitable block, no need to do anything else */ mem_root->pre_alloc= mem; - return; + DBUG_VOID_RETURN; } if (mem->left + ALIGN_SIZE(sizeof(USED_MEM)) == mem->size) { @@ -157,6 +158,8 @@ void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size, else #endif mem_root->pre_alloc= 0; + + DBUG_VOID_RETURN; } |