There was an attempt to fix this in
MDEV-7448, but it didn't work.
When bb slave looses connection to master it seem to send SIGKILL to process group:
mysqld is most probably detached from that process group. At least mysql-test/lib/My/SafeProcess/safe_process.cc calls setpgid(). As a result signal won't reach mysqld.
This means that intermediate processes must catch SIGKILL and forward it to mysqld. But SIGKILL cannot be caught.
I can think of 3 ways of fixing this problem:
- let bb use different signal when killing process group (SIGINT, SIGHUP)
- don't detach mysqld from bb process group
- somehow let bb record and kill mysqld process