This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 207495 - IDE freezes on Refresh of DB connection that has gone stale
Summary: IDE freezes on Refresh of DB connection that has gone stale
Status: RESOLVED DUPLICATE of bug 203127
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.1.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-19 08:17 UTC by neek
Modified: 2012-05-17 11:40 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Three jstack outputs from a frozen netbeans 'java' process, before having to kill the process. (100.00 KB, application/x-tar)
2012-01-19 08:17 UTC, neek
Details
jstack dump on jdk1.7.0_03 of hung netbeans 7.1.1 release. (28.45 KB, text/plain)
2012-03-30 03:32 UTC, neek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description neek 2012-01-19 08:17:07 UTC
Created attachment 115062 [details]
Three jstack outputs from a frozen netbeans 'java' process, before having to kill the process.

IDE freezes and jstack shows BLOCKED threads in stack trace when Refreshing DB connection that has gone stale.

Linux (fedora 16)
Netbeans 7.1 Release
driver /opt/netbeans-7.1/ide/modules/ext/mysql-connector-java-5.1.13-bin.jar
MySQL database 5.1.56

I work over ssh tunnels to a remote machine, with a port forward to the database, so my local port 3307 is forwarded to localhost:3306 on a remote machine.  Before 7.1, this setup worked perfectly.  If a connection had been left for some time (more than 5 or 10 minutes?) then an attempted operation on that connection would pop up saying it needs to reconnect, the IDE would reconnect, and re-issue the attempt.  With 7.1, the IDE freezes after the initial popup about needing to reconnect has been dismissed.

This only happens when I haven't touched the ssh shell that manages the port forwards, or the Netbeans connection, for some time.  I presume the ssh shell has closed down the port forward connection, and Netbeans isn't handling that gracefully.

I have three stack traces at hand from the last week or so, but this is a very reproducable bug.  If required I could run ssh with -vvv verbosity and try to track what's happening to the port forward.

The freeze always happens after dismissing this kind of dialog:

"Unable to Connect to database :
DatabaseConnection[name='jdbc:mysql://localhost:3307/ourdatabase [ourusername on Default schema]'

where localhost:3307 is a port forward using the .ssh/config section (names changed to 'ourhost' for obscurity):


Host ourhost
Hostname www.ourhost.co.uk
User root
LocalForward 3307 localhost:3306
ServerAliveInterval 60

I'll attach the stack traces.  Can I offer any more?

Possibly related to http://netbeans.org/bugzilla/show_bug.cgi?id=155944 which appears to be closed due to inability to reproduce the bug.
Comment 1 neek 2012-03-30 03:30:46 UTC
This is still happening with 7.1.1, and it's not necessarily a network issue.  I just came to my linux laptop after leaving it on all night (not suspended) and came to the Service pane where a Connection was still showing as 'Connected' to a local MySQL database.  I right clicked the Connection and chose Refresh.  The dialog popped up saying this connection needs to be refreshed, so I clicked on OK, the dialog disappeared, and the IDE hung.

Will attach jstack dump attached showing deadlock.
Comment 2 neek 2012-03-30 03:32:05 UTC
Created attachment 117519 [details]
jstack dump on jdk1.7.0_03 of hung netbeans 7.1.1 release.
Comment 3 Jaroslav Havlin 2012-05-17 11:40:02 UTC
Probably the same problem as bug 203127.
Please reopen if the issue remains in NetBeans 7.2.
Thank you for reporting.

*** This bug has been marked as a duplicate of bug 203127 ***