handle_fatal_signal (sig=11) in free/pthread_create originating from spawn_thread_v1
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.1 |
Won't Fix
|
Undecided
|
Unassigned | |||
5.5 |
New
|
Undecided
|
Unassigned | |||
5.6 |
New
|
High
|
Unassigned | |||
5.7 |
New
|
High
|
Unassigned |
Bug Description
(gdb) t 40
+t 40
(gdb) bt
+bt
#0 0x0000000005072771 in pthread_kill () from /lib64/
#1 0x0000000000ad3e5e in my_write_core (sig=11) at /mnt/workspace/
sys/stacktrace.
#2 0x000000000073156f in handle_fatal_signal (sig=11) at /mnt/workspace/
8.0/sql/
#3 <signal handler called>
#4 0x0000000004e3652c in free () from /usr/lib64/
#5 0x000000000506e2ea in pthread_
#6 0x0000000000e198c6 in spawn_thread_v1 (key=22, thread=0x82bffd70, attr=0x18de480 <connection_
4600 <all_groups+2560>) at /mnt/workspace/
910
#7 0x00000000008cd982 in inline_
, arg=0x1904600 <all_groups+2560>) at /mnt/workspace/
i/mysql_
#8 0x00000000008ce737 in create_worker (thread_
6-64/percona-
#9 0x00000000008ce969 in wake_or_
p/centos6-
#10 0x00000000008ce24f in check_stall (thread_
64/percona-
#11 0x00000000008ce0e9 in timer_thread (param=0x1913c20 <pool_timer>) at /mnt/workspace/
server-
#12 0x0000000000e19760 in pfs_spawn_thread (arg=0x217a0560) at /mnt/workspace/
.20-68.
#13 0x000000000506ddf3 in start_thread () from /lib64/
#14 0x00000000063dc3dd in clone () from /lib64/libc.so.6
Could this be the issue?
Code (/bzr/5.
int result= pthread_
(gdb) list
+list
16 /mnt/workspace/
(gdb) p pfs_spawn_thread
+p pfs_spawn_thread
$1 = {void *(void *)} 0xe19607 <pfs_spawn_
(gdb) p thread
+p thread
$2 = 608175872
There are several Valgrind warnings in the log that may help. See bundles. An example:
==8625== Invalid read of size 8 libjemalloc. so.1) create@ @GLIBC_ 2.2.5 (in /usr/lib64/ libpthread- 2.17.so) mysql_thread_ create (mysql_ thread. h:1252) worker( thread_ group_t* ) (threadpool_ unix.cc: 881) create_ thread( thread_ group_t* ) (threadpool_ unix.cc: 971) thread_ group_t* ) (threadpool_ unix.cc: 660) unix.cc: 580) libpthread- 2.17.so) libc-2. 17.so) valgrind/ vgpreload_ memcheck- amd64-linux. so) :new_allocator< my_option> ::deallocate( my_option* , unsigned long) (new_allocator. h:110) base<my_ option, std::allocator< my_option> >::_M_deallocat e(my_option* , unsigned long) (stl_vector.h:174) my_option, std::allocator< my_option> >::_M_insert_ aux(__gnu_ cxx::__ normal_ iterator< my_option* , std::vector< my_option, std::allocator< my_option> > >, my_option const&) (vector.tcc:386) my_option, std::allocator< my_option> >::push_ back(my_ option const&) (stl_vector.h:913) :register_ option( std::vector< my_option, std::allocator< my_option> >*, int) (set_var.h:155) add_options( std::vector< my_option, std::allocator< my_option> >*, int) (set_var.cc:86) variables( ) (mysqld.cc:3950) libjemalloc. so.1) create@ @GLIBC_ 2.2.5 (in /usr/lib64/ libpthread- 2.17.so) mysql_thread_ create (mysql_ thread. h:1252) worker( thread_ group_t* ) (threadpool_ unix.cc: 881) create_ thread( thread_ group_t* ) (threadpool_ unix.cc: 971) thread_ group_t* ) (threadpool_ unix.cc: 660) unix.cc: 580) libpthread- 2.17.so) libc-2. 17.so)
==8625== at 0x4E363CD: free (in /usr/lib64/
==8625== by 0x506E2E9: pthread_
==8625== by 0xE198C5: spawn_thread_v1 (pfs.cc:1910)
==8625== by 0x8CD981: inline_
==8625== by 0x8CE736: create_
==8625== by 0x8CE968: wake_or_
==8625== by 0x8CE24E: check_stall(
==8625== by 0x8CE0E8: timer_thread(void*) (threadpool_
==8625== by 0xE1975F: pfs_spawn_thread (pfs.cc:1860)
==8625== by 0x506DDF2: start_thread (in /usr/lib64/
==8625== by 0x63DC3DC: clone (in /usr/lib64/
==8625== Address 0x74047f8 is 3,384 bytes inside a block of size 8,288 free'd
==8625== at 0x4C29991: operator delete(void*) (in /usr/lib64/
==8625== by 0x631871: __gnu_cxx:
==8625== by 0x6306AD: std::_Vector_
==8625== by 0x62FCF6: std::vector<
==8625== by 0x62F043: std::vector<
==8625== by 0x730803: sys_var:
==8625== by 0x72E9E2: sys_var_
==8625== by 0x62BA11: get_options(int*, char***) (mysqld.cc:9077)
==8625== by 0x6235A6: init_common_
==8625== by 0x626822: mysqld_main(int, char**) (mysqld.cc:5515)
==8625== by 0x61BAEF: main (main.cc:25)
==8625==
==8625== Invalid write of size 8
==8625== at 0x4E3652C: free (in /usr/lib64/
==8625== by 0x506E2E9: pthread_
==8625== by 0xE198C5: spawn_thread_v1 (pfs.cc:1910)
==8625== by 0x8CD981: inline_
==8625== by 0x8CE736: create_
==8625== by 0x8CE968: wake_or_
==8625== by 0x8CE24E: check_stall(
==8625== by 0x8CE0E8: timer_thread(void*) (threadpool_
==8625== by 0xE1975F: pfs_spawn_thread (pfs.cc:1860)
==8625== by 0x506DDF2: start_thread (in /usr/lib64/
==8625== by 0x63DC3DC: clone (in /usr/lib64/
==8625== Address 0x0 is not stack'd, malloc'd or (recently) free'd