I have a Raspberry Pi server with Raspbian OS:
Kernel: Linux 4.9.35+ #1014 Fri Jun 30 14:34:49 BST 2017 armv6l GNU/Linux Description: Raspbian GNU/Linux 8.0 (jessie) Release: 8.0 Codename: jessie
Today I noticed that attempts to use
mysql end in a segmentation fault.
user@host~ $ mysql -u root -p Enter password: Segmentation fault
This happens for both the wrong and the right password. Or even if I made up a username. Actually, it turns out than even running the
mysql command without any arguments has the same effect.
The Mysql server can still be accessed via Python (
pymysql) and Perl. I have scripts that write and read various DBs, they are all working without problems.
Shell scripts that use the
mysql command, they all fail. For example:
/home/user/example.sh: line 2: 27974 Segmentation fault /usr/bin/mysql -u dbuser -p$dbpass dbname --execute="select * from example;"
The segmentation faults started appearing today and I cannot figure what is causing them now. The server has not been booted in a few weeks. It has been more than a week since it was last updated.
I can't find any errors that might look like relevant to this situation from the Mysql logs or syslog.
I have tried:
- Restarting Mysql
- Upgrading the system and rebooting
- Checking disk on reboot, no errors found
As these procedures didn't help, I tried using
gdb as suggested here:
This is what I get when debugging the command
mysql without any parameters:
gdb mysql run run Starting program: /usr/bin/mysql
gdb mysql run Starting program: /usr/bin/mysql Program received signal SIGSEGV, Segmentation fault. elf_dynamic_do_Rel (skip_ifunc=<optimized out>, lazy=0, nrelative=<optimized out>, relsize=<optimized out>, reladdr=<optimized out>, map=0xb6fff968) at do-rel.h:112 112 do-rel.h: No such file or directory.
I wonder what could I do to fix this problem? (Other than making a bug report about this.)