| Bug #5425 | Each time during executing JDBC's getConnection mysqld restarts | ||
|---|---|---|---|
| Submitted: | 5 Sep 2004 21:19 | Modified: | 4 Oct 2004 19:52 |
| Reporter: | Vitaliy Yermolenko | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server | Severity: | S2 (Serious) |
| Version: | 4.0.20 | OS: | SunOS 5.9 |
| Assigned to: | Matthew Lord | CPU Architecture: | Any |
[6 Sep 2004 22:56]
Sergei Golubchik
Are you building 64-bit binary ? Try to build w/o --enable-assembler, does it crash ? What if you use our binary ? Does it crash it you do 'SHOW VARIABLES' from the command line client ? (COnnector/J issues this comand automatically on connect)
[1 Oct 2004 12:19]
Vitaliy Yermolenko
It was tried MySQL 4.0.21 with next configuration line (there were deleted next options: --enable-assembler and --with-low-memory): --- BEGIN --- CC=gcc CFLAGS="-O3 -mcpu=v8 -Wa,-xarch=v8plusa" CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti -mcpu=v8 -Wa,-xarch=v8plusa" /configure --prefix=/usr/local/mysql-4.0.21 --without-debug ---- END ---- Everything is fine (no crashes) now, except one issue: MySQL performance on SunOS 5.9 is awful. For the same SELECT SQL statement with the same instances of database the result is next (from MySQL console): -- 4 X UltraSPARC-II 400MHz, 64-bit Ultra-4, 2097152K RAM - 20.53 sec; -- 1 Intel Celeron CPU 1302.350 MHz, 511MB RAM - 2.98 sec. Binary MySQL distribution for SunOS provides approx. the same performance result. Thanks, Vitaliy Yermolenko <vyermolenko@ukr.net>
[4 Oct 2004 19:52]
Matthew Lord
Hi, This particular bug regarding the jdbc driver is fixed in 4.0.21 now correct? Would it be possible for you to open a new bug regarding your performance problems with 4.0.21 on sparc hardware? It would be helpful to know what the query is, the ddl for the tables involved, and any sample data if possible. A dump of the table would be ideal if it's not sensitive information. If you provide me with all the necessary information I can also open a new bug for the problem. Thanks for your bug reports!

Description: MySQL 4.0.20 was successfully installed on SunOS 5.9 from sources by next configure line: --- BEGIN --- CC=gcc CFLAGS="-O3 -mcpu=v8 -Wa,-xarch=v8plusa" CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti -mcpu=v8 -Wa,-xarch=v8plusa" ./configure --prefix=/usr/local/mysql-4.0.20 --without-debug --enable-assembler --with-low-memory ---- END ---- After configuring MySQL works fine from MySQL console, but during executing "select now()" SQL statement thru JDBC (see next lines of Java code): --- BEGIN --- 59 Class.forName(dbDriver); 60 con = DriverManager.getConnection(dbURL, userName, userPswd); 61 Statement statement = con.createStatement(); ---- END ---- on the 60 line of code the next SQL exception occured: --- BEGIN --- 0 [main] ERROR Tools - [executeRequest] Exception during 3 tool execution ERROR: java.sql.SQLException: Server connection failure during transaction. Due to underlying exception: 'java.sql.SQLException: Communication link failure: java.io.EOFException, underlying cause: null ** BEGIN NESTED EXCEPTION ** java.io.EOFException STACKTRACE: java.io.EOFException at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1319) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:1463) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1854) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1109) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1203) at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:1164) at com.mysql.jdbc.Connection.execSQL(Connection.java:2087) at com.mysql.jdbc.Connection.execSQL(Connection.java:2037) at com.mysql.jdbc.Statement.executeQuery(Statement.java:1156) at com.mysql.jdbc.Connection.initializePropsFromServer(Connection.java:2753) at com.mysql.jdbc.Connection.createNewIO(Connection.java:1766) at com.mysql.jdbc.Connection.<init>(Connection.java:432) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:400) at java.sql.DriverManager.getConnection(DriverManager.java:512) at java.sql.DriverManager.getConnection(DriverManager.java:171) at com.mindxxx.ccss.core.util.SimpleDatabaseOperation.executeRequest(SimpleDatabaseOperation.java:60) at com.mindxxx.ccss.core.util.SimpleDatabaseOperation.main(SimpleDatabaseOperation.java:127) ** END NESTED EXCEPTION ** '. Attempted reconnect 3 times. Giving up. ---- END ---- with next error message in mysqld.log file: --- BEGIN --- mysqld got signal 10; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware. We will try our best to scrape up some info that will hopefully help diagnose the problem, but since we have already crashed, something is definitely wrong and this may fail. key_buffer_size=8388600 read_buffer_size=131072 max_used_connections=0 max_connections=100 threads_connected=1 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 225791 K bytes of memory Hope that's ok; if not, decrease some variables in the equation. -e Number of processes running now: 0 040902 03:45:38 mysqld restarted 040902 3:45:39 InnoDB: Started /usr/local/mysql-4.0.20/libexec/mysqld: ready for connections. Version: '4.0.20' socket: '/tmp/mysql.sock' port: 3306 ---- END ---- We use next hardware: Sun Enterprise 450 (4 X UltraSPARC-II 400MHz, 64-bit Ultra-4) with 2097152K memory. It's used mysql-connector-java-3.0.11-stable-bin.jar as JDBC driver - we had no complains before. Thanks, Vitaliy Yermolenko <vyermolenko@ukr.net> How to repeat: To execute next Java code for any SQL statement: Class.forName("org.gjt.mm.mysql.Driver"); con = DriverManager.getConnection("jdbc:mysql://host:3306/db?autoReconnect=true", "user", "pswd"); The crash occured on the stage of getting connection (second line).