Issue Details (XML | Word | Printable)

Key: DERBY-2480
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: John H. Embretsen
Reporter: Jeff Clary
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Derby

DriverManager.getConnection leaks memory when connecting to a non-existent database

Created: 22/Mar/07 09:06 PM   Updated: 25/Jul/08 05:32 PM
Return to search
Component/s: JDBC
Affects Version/s: 10.0.2.0, 10.0.2.1, 10.1.1.0, 10.1.2.1, 10.1.3.1, 10.2.1.6, 10.2.2.0, 10.3.1.4
Fix Version/s: 10.3.1.4

Time Tracking:
Not Specified

File Attachments:
  Size
File Licensed for inclusion in ASF works d2480-junitTest_v1.diff 2007-04-17 12:46 PM John H. Embretsen 16 kB
Text File Licensed for inclusion in ASF works d2480-junitTest_v1.stat 2007-04-17 12:46 PM John H. Embretsen 0.3 kB
Text File Licensed for inclusion in ASF works DERBY-2480-1.diff 2007-03-26 01:42 PM Jeff Clary 0.5 kB
Text File Licensed for inclusion in ASF works derbyall_report.txt 2007-04-03 07:02 PM Jeff Clary 5 kB
Text File Licensed for inclusion in ASF works Patch_DERBY-1947_and_DERBY-2480.diff 2007-03-23 02:46 PM Jeff Clary 2 kB
Java Source File testOpenOfMissingDatabase.java 2007-03-22 09:08 PM Jeff Clary 1 kB
Image Attachments:

1. heap-server-Xmx32m.png
(86 kB)
Environment:
Windows Vista, JDK 1.4.2_13
Solaris 10, Sun JDK 1.4.2, 1.5.0 & 1.6.0
Red Hat Enterprise Linux 4 (2.6.9-34.ELsmp_64), Sun JDK 1.5.0 & 1.6.0
Issue Links:
Reference
 

Resolution Date: 18/Apr/07 09:16 PM


 Description  « Hide
Repeated calls to java.sql.DriverManager.getConnection("jdbc:derby:C:\\DOES_NOT_EXIST") leak memory and eventually lead to an OutOfMemoryError.

This bug is similar to DERBY-1947 in that ContextManager objects are not getting removed from the HashSet. The attached test program demonstrates the issue. When run with VM options -Xms8m -Xmx8m, it throws an OutOfMemoryError after 19022 calls to DriverManager.getConnection.





 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
No work has yet been logged on this issue.