← Back to team overview

maria-developers team mailing list archive

Re: Server crashes in inline_mysql_mutex_lock

 

Hi!

> Thread 1 (Thread 0x7fa0f7549700 (LWP 21346)):
> #0  0x00007fa0f9511101 in __pthread_kill (threadid=<optimized out>,
> signo=11) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
> #1  0x00000000013f4d28 in my_write_core (sig=11) at
> /data/src/bb-10.0-monty/mysys/stacktrace.c:478
> #2  0x00000000009f6fc3 in handle_fatal_signal (sig=11) at
> /data/src/bb-10.0-monty/sql/signal_handler.cc:285
> #3  <signal handler called>
> #4  0x000000000093123c in inline_mysql_mutex_lock (that=0x0,
> src_file=0x14df108 "/data/src/bb-10.0-monty/sql/rpl_parallel.cc",
> src_line=1278) at
> /data/src/bb-10.0-monty/include/mysql/psi/mysql_thread.h:662
> #5  0x0000000000936842 in handle_rpl_parallel_thread (arg=0x7fa0df2d3ee8) at
> /data/src/bb-10.0-monty/sql/rpl_parallel.cc:1278
> #6  0x00007fa0f950c0a4 in start_thread (arg=0x7fa0f7549700) at
> pthread_create.c:309
> #7  0x00007fa0f76c487d in clone () at
> ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

The problem is flush tables with read locks combined with a stop slave
of the only replication thread that forces a resize of thread pool.
This can get the replication thread into a wrong state where it tries
to delete itself before waiting for the flush tables, which the thread
pool doesn't like.

Fixed by adding a check that we are not in flush tables with read lock
when we delete ourselves from the pool.

Regards,
Monty