Gerd Wagner - 2016-02-13

Here is a citation of mails concerning this bug that can be found in our developers list:

Neville,

it's true that hangs occur if a JDBC connection is designed in a way that a running statement blocks any other access to a connection. If a JDBC driver is done that way there are several actions that can cause SQuirreL to hang while a statement is executing. Fortunately there seem to be only a few JDBC drivers behaving like that. In fact I only know of one.

A simple test to check this behaviour is to press the cancel button for a long running statement. If you get the message 'Failed to cancel statement. Perhaps the driver/RDDBMS does not support cancelling statements. ...' it is probable that your driver has this flaw.

Another way to get more information about hangs is to use the -detectEDT command line parameter. Here is an excerpt from our change log that describes how it works and what is does:

'New command line parameter:
Short form: -detectEDT
Long form: --detect-long-running-swing-edt-events
The parameter has no arguments.
The parameter enables SQuirreL to detect long running Swing Event Dispatch Thread events.
When the dispatch thread is blocked for longer than two seconds a warning containing a thread dump is written to the logs.'

Hope this helps

Gerd

Am 08.02.2016 um 07:58 schrieb Neville Rowe:

Hi, I was thinking a little bit about
https://sourceforge.net/p/squirrel-sql/bugs/1233/ and it chimes with
something I see occasionally. When working with a relatively large DB
server, SquirrelSQL can hang at times. I've never been able to get
anything repeatable so haven't raised a bug for it, however I think
it is certainly related to doing things whilst waiting for a query to
respond. For example clicking onto the objects tab whilst there is an
outstanding query and I am not using cached metadata. Or even writing
the next query whilst I'm waiting for a current query to respond -
specifically if the editor is looking up a column name for
auto-complete whilst the query results are just starting to be
returned. I believe the rules (recommendations) are to only have one
outstanding statement on a connection at any one time. And I suspect
metadata-lookups count as statements if the metadata isn't cached.
Can anyone remember how this is supposed to work in SquirrelSQL? If
not then I'm going to take a look at understanding and potentially
changing it. Probably try to move to having two connections per alias
so that metadata lookups go on a second connection, then do something
to ensure every statement on a connection is serialised. Thoughts?
Neville