bug with shutdown?

View: New views
3 Messages — Rating Filter:   Alert me  

bug with shutdown?

by interz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


HsqlTimer.TaskRunner thread should nullify contextClassLoader Upon shutdown, the HsqlTimer.TaskRunner needs to nullify the thread "taskRunnerThread" contextClassLoader property via asetContextClassloader(null) on shutdown()

By not doing this, if hsql is used in a hot-deployed environment, such asin Tomcat. When the context is destroyed and if shutdown() is called on thedatabase, this thread retains a reference to the WebappClassloader, which will never be cleaned up out of the heap because a JVM thread group retains a reference to this thread. Over time this will lead to a permgen out of memory exception

[jvm thread group] -> [hsqltimer.taskRunner thread].contextClassLoader -> WebappClassloader -> [entire application]


http://sourceforge.net/tracker/index.php?func=detail&aid=1922315&group_id=23316&atid=378131



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Hsqldb-user mailing list
Hsqldb-user@...
https://lists.sourceforge.net/lists/listinfo/hsqldb-user

Re: bug with shutdown?

by fredt :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for reporting. Will check it for the next update.

Fred
----- Original Message -----
From: "ahnf" <interz12@...>
To: <hsqldb-user@...>
Sent: 21 March 2008 16:10
Subject: [Hsqldb-user] bug with shutdown?



HsqlTimer.TaskRunner thread should nullify contextClassLoader Upon shutdown,
the HsqlTimer.TaskRunner needs to nullify the thread "taskRunnerThread"
contextClassLoader property via asetContextClassloader(null) on shutdown()

By not doing this, if hsql is used in a hot-deployed environment, such asin
Tomcat. When the context is destroyed and if shutdown() is called on
thedatabase, this thread retains a reference to the WebappClassloader, which
will never be cleaned up out of the heap because a JVM thread group retains
a reference to this thread. Over time this will lead to a permgen out of
memory exception

[jvm thread group] -> [hsqltimer.taskRunner thread].contextClassLoader ->
WebappClassloader -> [entire application]


http://sourceforge.net/tracker/index.php?func=detail&aid=1922315&group_id=23316&atid=378131



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Hsqldb-user mailing list
Hsqldb-user@...
https://lists.sourceforge.net/lists/listinfo/hsqldb-user 


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Hsqldb-user mailing list
Hsqldb-user@...
https://lists.sourceforge.net/lists/listinfo/hsqldb-user

Parent Message unknown Re: bug with shutdown?

by interz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks, I just found then when running "grails" a framework that uses hsqldb. You might want to check all uses of Threads in the hsql codebase. The patch I submitted was for your ThreadFactory but I am not sure if that is the only source of newly created threads.

----- Original Message ----
From: fredt <fredt@...>
To: HSQLdb user discussions <hsqldb-user@...>
Sent: Friday, March 21, 2008 4:45:12 PM
Subject: Re: [Hsqldb-user] bug with shutdown?

Thanks for reporting. Will check it for the next update.

Fred
----- Original Message -----
From: "ahnf" <interz12@...>
To: <hsqldb-user@...>
Sent: 21 March 2008 16:10
Subject: [Hsqldb-user] bug with shutdown?



HsqlTimer.TaskRunner thread should nullify contextClassLoader Upon shutdown,
the HsqlTimer.TaskRunner needs to nullify the thread "taskRunnerThread"
contextClassLoader property via asetContextClassloader(null) on shutdown()

By not doing this, if hsql is used in a hot-deployed environment, such asin
Tomcat. When the context is destroyed and if shutdown() is called on
thedatabase, this thread retains a reference to the WebappClassloader, which
will never be cleaned up out of the heap because a JVM thread group retains
a reference to this thread. Over time this will lead to a permgen out of
memory exception

[jvm thread group] -> [hsqltimer.taskRunner thread].contextClassLoader ->
WebappClassloader -> [entire application]


http://sourceforge.net/tracker/index.php?func=detail&aid=1922315&group_id=23316&atid=378131



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Hsqldb-user mailing list
Hsqldb-user@...
https://lists.sourceforge.net/lists/listinfo/hsqldb-user 


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Hsqldb-user mailing list
Hsqldb-user@...
https://lists.sourceforge.net/lists/listinfo/hsqldb-user




-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Hsqldb-user mailing list
Hsqldb-user@...
https://lists.sourceforge.net/lists/listinfo/hsqldb-user
LightInTheBox - Buy quality products at wholesale price