[Building Sakai] Tomcat Shutdown Issue possiable fix?

Mike Jennings mike_jennings at unc.edu
Wed Apr 4 17:53:01 PDT 2012


Ok, maby I spoke too early, as It appears that gradebook2 failed to 
deploy correctly after my rebuild.  Since the tomcat server did shutdown 
correctly without gradebook2 being isntalled, I guess I am back at 
square one.

:(

Mike

==============================================================================
Mike Jennings
Teaching and Learning Developer
University of North Carolina at Chapel Hill

Office: (919) 843-5013
Cell: (919) 698-3746
E-mail: mike_jennings at unc.edu

On 4/4/2012 8:37 PM, Mike Jennings wrote:
> Hey everyone.  I did a lot of debugging and found something that seems
> to work for me.  I had to change the reflectutils code to put a timeout
> on the queue.remove() call.  I am not sure if by making the change I did
> will cause more issue in the future, but here you go.
>
> So this is what I did, it appears that during shutdown the Finalizer is
> called and cleans up the queue references by doing a queue.remove()
> which is a blocker as it will wait forever.  During the first iteration
> the cleanup runs just fine, and closes out all single references in the
> queue, but then for some reason it gets called again and hangs forever
> on the second round.
>
> I changed the code to put a timeout here and the Tomcat Server shutdown
> without a issue.
>
> --- src/main/java/org/azeckoski/reflectutils/refmap/Finalizer.java
> (revision 109)
> +++ src/main/java/org/azeckoski/reflectutils/refmap/Finalizer.java
> (working copy)
> @@ -124,7 +124,7 @@
>        try {
>          while (true) {
>            try {
> -          cleanUp(queue.remove());
> +          cleanUp(queue.remove(1000L));
>            } catch (InterruptedException e) {
>                // Thread has been interrupted, so do local cleanup
>                frqReference.clear();
>
> I am still not sure what it thinks it is looking for on the second pass.
>
> Once I made this change I compiled reflectutils, then the kernel, then
> the entitybroker, then all of sakai.  I am going to revert my changes to
> reflectutils and then try rebuilding the kernel and entity broker
> locally and see if I can shutdown properly after that.
>
> Mike


More information about the sakai-dev mailing list