Hi !

Some times my application is hang-up. The stack trace contains the
following:
        at java.net.SocketInputStream.socketRead(Native Method)
        at java.net.SocketInputStream.read(SocketInputStream.java:86)
        at java.io.BufferedInputStream.fill(BufferedInputStream.java:186)
        at java.io.BufferedInputStream.read(BufferedInputStream.java:204)
        at org.gjt.mm.mysql.MysqlIO.readPacket(Unknown Source)
        at org.gjt.mm.mysql.MysqlIO.clearAllReceive(Unknown Source)
        at org.gjt.mm.mysql.MysqlIO.sqlQueryDirect(Unknown Source)
        at org.gjt.mm.mysql.MysqlIO.sqlQuery(Unknown Source)
        at org.gjt.mm.mysql.Connection.execSQL(Unknown Source)
        at org.gjt.mm.mysql.Connection.execSQL(Unknown Source)
        at org.gjt.mm.mysql.Statement.executeQuery(Unknown Source)
        at org.gjt.mm.mysql.jdbc2.Statement.executeQuery(Unknown Source)

It seems that it is not infinite loop (i.e. there was only once
org.gjt.mm.mysql.jdbc2.Statement.executeQuery).

Do you have any idea what is wrong ? 

I think that the reason of bug is in the BufferedInputStream (see on Sun
BugParade
http://developer.java.sun.com/developer/bugParade/bugs/4479751.html). MySql
client need to read N bytes from input stream. BufferedInputStream tries to
fill its buffer and try to read from server more than N bytes (to fill
entire buffer). The MySql server has exactly N bytes to send. The server
sends N bytes and waits for a request. But the client doesn't receive
response, since it (or end part of it) is in the BufferedInputStream buffer.

I might be wrong, but I usually see the same stack trace. I need to restart
my application.

Best,
Dmitry.

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to