Description:
If you pull a network connection on the system that has the DB running, you can hit this situation. (This is a simulation of a field situation reported by a customer who looses a network connection for various reasons). The socketRead does not appear to have a timeout set to it, so will hang forever. This is somewhat terminal for the application. I can't find a spot to set a timeout - but maybe setting a timeout would be a work around. Even if there is such a spot, this should have a default timeout of some reasonable value, even if that is some minutes.)
Thread [Timer for SynchronizedClockTick "SynchronizedClockTick" - Value "0"] (Suspended)
owns: ReadAheadInputStream (id=789)
owns: Object (id=790)
owns: PreparedStatement (id=791)
owns: Connection (id=792)
SocketInputStream.socketRead0(FileDescriptor, byte[], int, int, int) line: not available [native method]
SocketInputStream.read(byte[], int, int) line: not available
ReadAheadInputStream.fill(int) line: 105
ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(byte[], int, int) line: 148
ReadAheadInputStream.read(byte[], int, int) line: 176
MysqlIO.readFully(InputStream, byte[], int, int) line: 1899
MysqlIO.reuseAndReadPacket(Buffer) line: 2348
MysqlIO.checkErrorPacket(int) line: 2858
MysqlIO.sendCommand(int, String, Buffer, boolean, String) line: 1570
MysqlIO.sqlQueryDirect(Statement, String, String, Buffer, int, Connection, int, int, boolean, String, boolean) line: 1665
Connection.execSQL(Statement, String, int, Buffer, int, int, boolean, boolean, String, boolean, byte) line: 2978
Connection.execSQL(Statement, String, int, Buffer, int, int, boolean, boolean, String, boolean) line: 2902
PreparedStatement.executeInternal(int, Buffer, boolean, boolean, boolean) line: 930
PreparedStatement.executeUpdate(byte[][], InputStream[], boolean[], int[], boolean[]) line: 1159
PreparedStatement.executeUpdate(boolean) line: 1076
PreparedStatement.executeUpdate() line: 1061
TriggeredHistorical.update(long, Hashtable) line: 628
TriggeredHistorical.trigger(ValueChangedEvent) line: 738
TriggeredHistorical.valueChanged(int, ValueChangedEvent) line: 183
StaticConnector.validatedValueChanged(ValueChangedEvent) line: 101
StaticConnector(Connector).valueChanged(ValueChangedEvent) line: 671
DataValve(DataSource).updateListener(DataSource, Connector, ValueChangedEvent) line: 400
DataValve(DataSource).updateListeners() line: 865
DataValve(DataSource).setValueObjectInternal(ValueObjectInterface) line: 774
DataValve.update() line: 46
DataValve.valueInput(ValueChangedEvent) line: 37
DataValve(Manipulator).valueChanged(int, ValueChangedEvent) line: 84
DataValve.valueChanged(int, ValueChangedEvent) line: 66
StaticConnector.validatedValueChanged(ValueChangedEvent) line: 101
StaticConnector(Connector).valueChanged(ValueChangedEvent) line: 671
SynchronizedClockTick(DataSource).updateListener(DataSource, Connector, ValueChangedEvent) line: 400
SynchronizedClockTick(DataSource).updateListeners() line: 865
SynchronizedClockTick(DataSource).setValueObjectInternal(ValueObjectInterface) line: 774
SynchronizedClockTick.refreshCurrentValue(long) line: 79
SynchronizedClockTick.tick(Timer) line: 61
SyncTimer(Timer).run() line: 442
Thread.run() line: not available
How to repeat:
Pull the network connection. Not totally reproducible. (You have to get lucky, or unlucky).
Suggested fix:
Set a default read timout on the socket and provide the user a way to modify this.