I'm running mythtv on jaunty with mysql-server-5.0 version 5.1.30really5.0.75-0ubuntu5. During boot mysql starts, then mythtv starts, then mysql restarts and mythtv gets confused.
What seems to be happening is that line 387 (or 389?) of /usr/bin/mysqld_safe is falling through when it shouldn't. mysqld_safe is a script that starts mysqld and restarts it if it crashes. Here are some relevant syslog sections:
Feb 8 12:35:07 willvo mysqld_safe[3668]: started
Feb 8 12:35:08 willvo mysqld[3671]: 090208 12:35:08 InnoDB: Started; log sequence number 0 43655
Feb 8 12:35:08 willvo mysqld[3671]: 090208 12:35:08 [Note] /usr/sbin/mysqld: ready for connections.
Feb 8 12:35:08 willvo mysqld[3671]: Version: '5.0.75-0ubuntu5' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
Feb 8 12:35:08 willvo /etc/mysql/debian-start[3710]: Upgrading MySQL tables if necessary.
Feb 8 12:35:08 willvo /etc/mysql/debian-start[3713]: Looking for 'mysql' as: /usr/bin/mysql
Feb 8 12:35:08 willvo /etc/mysql/debian-start[3713]: Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
Feb 8 12:35:08 willvo /etc/mysql/debian-start[3713]: This installation of MySQL is already upgraded to 5.0.75, use --force if you still need to run mysql_upgrade
Feb 8 12:35:08 willvo /etc/mysql/debian-start[3720]: Checking for insecure root accounts.
Feb 8 12:35:08 willvo /etc/mysql/debian-start[3724]: Triggering myisam-recover for all MyISAM tables
Feb 8 12:35:13 willvo mythtv-backend[4560]: Started mythtv-backend
Feb 8 12:35:16 willvo mysqld_safe[5212]: Number of processes running now: 1
Feb 8 12:35:16 willvo mysqld_safe[5223]: mysqld process hanging, pid 3670 - killed
Feb 8 12:35:16 willvo mysqld_safe[5227]: restarted
Feb 8 12:35:16 willvo mysqld[5231]: 090208 12:35:16 InnoDB: Started; log sequence number 0 43655
Feb 8 12:35:17 willvo mysqld[5231]: 090208 12:35:17 [Note] /usr/sbin/mysqld: ready for connections.
Feb 8 12:35:17 willvo mysqld[5231]: Version: '5.0.75-0ubuntu5' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
Note that mysqld_safe is finds one mysqld process still running after it is supposed to have crashed. mysqld_safe then kills that process and starts another. This only seems to happen once during boot - it doesn't keep restarting mysqld in normal use.
The problem is somewhat intermittent. I made it go away once before by mysqlrepairing my tables, but they seem fine now. Debian bug 418648 looks somewhat similar but slightly different (and the fix they used doesn't work for me).
in the mysqld_safe script (the second line has " & wait" removed from the end). This seems to fix the problem. I don't understand the difference in semantics between " & wait" and normal process termination.
Binary package hint: mysql-server-5.0
I'm running mythtv on jaunty with mysql-server-5.0 version 5.1.30really5. 0.75-0ubuntu5. During boot mysql starts, then mythtv starts, then mysql restarts and mythtv gets confused.
What seems to be happening is that line 387 (or 389?) of /usr/bin/ mysqld_ safe is falling through when it shouldn't. mysqld_safe is a script that starts mysqld and restarts it if it crashes. Here are some relevant syslog sections:
Feb 8 12:35:07 willvo mysqld_safe[3668]: started mysqld/ mysqld. sock' port: 3306 (Ubuntu) debian- start[3710] : Upgrading MySQL tables if necessary. debian- start[3713] : Looking for 'mysql' as: /usr/bin/mysql debian- start[3713] : Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck debian- start[3713] : This installation of MySQL is already upgraded to 5.0.75, use --force if you still need to run mysql_upgrade debian- start[3720] : Checking for insecure root accounts. debian- start[3724] : Triggering myisam-recover for all MyISAM tables
Feb 8 12:35:08 willvo mysqld[3671]: 090208 12:35:08 InnoDB: Started; log sequence number 0 43655
Feb 8 12:35:08 willvo mysqld[3671]: 090208 12:35:08 [Note] /usr/sbin/mysqld: ready for connections.
Feb 8 12:35:08 willvo mysqld[3671]: Version: '5.0.75-0ubuntu5' socket: '/var/run/
Feb 8 12:35:08 willvo /etc/mysql/
Feb 8 12:35:08 willvo /etc/mysql/
Feb 8 12:35:08 willvo /etc/mysql/
Feb 8 12:35:08 willvo /etc/mysql/
Feb 8 12:35:08 willvo /etc/mysql/
Feb 8 12:35:08 willvo /etc/mysql/
Feb 8 12:35:13 willvo mythtv- backend[ 4560]: Started mythtv-backend
Feb 8 12:35:16 willvo mysqld_safe[5212]: Number of processes running now: 1 mysqld/ mysqld. sock' port: 3306 (Ubuntu)
Feb 8 12:35:16 willvo mysqld_safe[5223]: mysqld process hanging, pid 3670 - killed
Feb 8 12:35:16 willvo mysqld_safe[5227]: restarted
Feb 8 12:35:16 willvo mysqld[5231]: 090208 12:35:16 InnoDB: Started; log sequence number 0 43655
Feb 8 12:35:17 willvo mysqld[5231]: 090208 12:35:17 [Note] /usr/sbin/mysqld: ready for connections.
Feb 8 12:35:17 willvo mysqld[5231]: Version: '5.0.75-0ubuntu5' socket: '/var/run/
Note that mysqld_safe is finds one mysqld process still running after it is supposed to have crashed. mysqld_safe then kills that process and starts another. This only seems to happen once during boot - it doesn't keep restarting mysqld in normal use.
The problem is somewhat intermittent. I made it go away once before by mysqlrepairing my tables, but they seem fine now. Debian bug 418648 looks somewhat similar but slightly different (and the fix they used doesn't work for me).
My current fix is to replace:
$NOHUP_NICENESS $ledir/$MYSQLD $defaults --basedir= $MY_BASEDIR_ VERSION --d $pid_file --skip- external- locking 2>&1 |
atadir=$DATADIR $USER_OPTION --pid-file=
$ERR_LOGGER -t mysqld & wait
with:
$NOHUP_NICENESS $ledir/$MYSQLD $defaults --basedir= $MY_BASEDIR_ VERSION --dat $pid_file --skip- external- locking 2>&1 | $
adir=$DATADIR $USER_OPTION --pid-file=
ERR_LOGGER -t mysqld
in the mysqld_safe script (the second line has " & wait" removed from the end). This seems to fix the problem. I don't understand the difference in semantics between " & wait" and normal process termination.
Will