Bug #27312 MySQL restarts every few seconds on client connect
Submitted: 20 Mar 2007 23:59 Modified: 21 Apr 2007 8:18
Reporter: Christopher Neill Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:FreeBSD ports 5.0.37 OS:FreeBSD (FreeBSD 6.2-STABLE)
Assigned to: Assigned Account CPU Architecture:Any
Tags: FreeBSD 6.2-STABLE, jdbc, JDK 5, MySQL Server 5.0.37

[20 Mar 2007 23:59] Christopher Neill
Description:
Clients connecting with vanilla JDBC via JDK 5:

biz360@mercury45 [4:51pm]:15:~/ga/system/lib> more META-INF/MANIFEST.MF 
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.2
Created-By: 1.4.2-b28 (Sun Microsystems Inc.)
Built-By: mysqldev

Name: common
Specification-Title: JDBC
Specification-Version: 3.0
Specification-Vendor: Sun Microsystems Inc.
Implementation-Title: MySQL Connector/J
Implementation-Version: 3.1.12
Implementation-Vendor: MySQL AB

biz360@mercury45 [4:52pm]:18:~/ga/system/lib> java -version
java version "1.5.0_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_02-b09)
Java HotSpot(TM) Server VM (build 1.5.0_02-b09, mixed mode)
biz360@mercury45 [4:52pm]:19:~/ga/system/lib> uname -a
Linux mercury45 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005 i686 i686 i386 GNU/Linux

Server Error Log messages:
070320 16:25:35  InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 421 1278492785.
InnoDB: Doing recovery: scanned up to log sequence number 421 1278492785
InnoDB: Last MySQL binlog file position 0 0, file name
070320 16:25:35  InnoDB: Started; log sequence number 421 1278492785
070320 16:25:35 [Note] /usr/local/libexec/mysqld: ready for connections.
Version: '5.0.37'  socket: '/data/mysql/mysql.sock'  port: 3633  FreeBSD port: mysql-server-5.0.37
070320 16:25:36  mysqld restarted
070320 16:25:36 [Warning] Changed limits: max_open_files: 11095  max_connections: 750  table_cache: 5167
070320 16:25:37  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
070320 16:25:37  InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 421 1278492785.
InnoDB: Doing recovery: scanned up to log sequence number 421 1278492785
InnoDB: Last MySQL binlog file position 0 0, file name
070320 16:25:37  InnoDB: Started; log sequence number 421 1278492785
070320 16:25:37 [Note] /usr/local/libexec/mysqld: ready for connections.
Version: '5.0.37'  socket: '/data/mysql/mysql.sock'  port: 3633  FreeBSD port: mysql-server-5.0.37
070320 16:25:38  mysqld restarted
070320 16:25:38 [Warning] Changed limits: max_open_files: 11095  max_connections: 750  table_cache: 5167
070320 16:25:39  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
070320 16:25:39  InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 421 1278492785.
InnoDB: Doing recovery: scanned up to log sequence number 421 1278492785
InnoDB: Last MySQL binlog file position 0 0, file name
070320 16:25:39  InnoDB: Started; log sequence number 421 1278492785
070320 16:25:39 [Note] /usr/local/libexec/mysqld: ready for connections.
Version: '5.0.37'  socket: '/data/mysql/mysql.sock'  port: 3633  FreeBSD port: mysql-server-5.0.37
070320 16:25:40  mysqld restarted
070320 16:25:40 [Warning] Changed limits: max_open_files: 11095  max_connections: 750  table_cache: 5167
^C
mysql@sql01 [4:25pm]:11:~> tail -f log
070320 16:25:55 [Note] /usr/local/libexec/mysqld: ready for connections.
Version: '5.0.37'  socket: '/data/mysql/mysql.sock'  port: 3633  FreeBSD port: mysql-server-5.0.37
070320 16:26:11 [Note] /usr/local/libexec/mysqld: Normal shutdown

070320 16:26:11  InnoDB: Starting shutdown...
070320 16:26:15  InnoDB: Shutdown completed; log sequence number 421 1278492785
070320 16:26:15 [Note] /usr/local/libexec/mysqld: Shutdown complete

070320 16:26:16  mysqld ended

070320 16:26:25  mysqld started
070320 16:26:25 [Warning] Changed limits: max_open_files: 11095  max_connections: 750  table_cache: 5167
070320 16:26:26  InnoDB: Started; log sequence number 421 1278492785
070320 16:26:26 [Note] /usr/local/mysql5.0.18-source/libexec/mysqld: ready for connections.
Version: '5.0.18'  socket: '/data/mysql/mysql.sock'  port: 3633  Source distribution

root@sql01 [4:53pm](2):31:/usr/ports/databases/mysql50-server# uname -a
FreeBSD sql01.prod.biz360.com 6.2-STABLE FreeBSD 6.2-STABLE #0: Mon Mar 12 01:01:44 PDT 2007     root@sql01:/usr/obj/usr/src/sys/SQL01SMP  i386

Build info:
/usr/ports/databases/mysql50-server: make WITH_INNODB=yes WITH_OPENSSL=yes install

How to repeat:
Fire up Ports 5.0.37 server, wait for clients to connect.

Suggested fix:
Rolling back to 5.4-RELEASE source-built 5.0.18 server fixes problem. Want to build working natve FreeBSD 6 binaries (preferably from ports).
[21 Mar 2007 8:18] Sveta Smirnova
Thank you for the report.

I can not repeat it on accessible machine and binaries provided by MySQL. Could you please try with our binaries (to be sure problem is not FreeBSD port only) available from http://dev.mysql.com/downloads/mysql/5.0.html#freebsd and mysql command line client and say us result?

Also indicate if your FreeBSD is 64 or 32-bit.
[21 Apr 2007 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".