-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

James,

On 10/30/2009 9:05 AM, James Murphy wrote:
> Some background info:
> OS: Windows Server 2003
> Tomcat Version: 5.5
> JDK Version: 1.6.0
> 
> I've run into a very annoying problem while trying to enable
> automatic context reload on our development server. It works well
> when there is not a user logged on to the system (I guess that means
> while there is session info on the server), but if someone is logged
> in, then Tomcat fails to reload the context.

I can confirm that Tomcat 5.5.26 both reloads and stops properly when
multiple sessions are active. Persist-to-disk works as expected, and
sessions are retained across the restart/reload.

I suspect there is a problem with your specific webapp and/or setup.

> Another issue that may be related to this is that Tomcat will not
> shutdown cleanly when someone is logged in (Tomcat hangs at "INFO:
> Stopping service Catalina). Rather, we must close the console window
> forcefully, then start the server back up to an error (IOException
> while loading persisted sessions: java.io.EOFException)

That's interesting: your session (de)serialization is failing because
the file is incomplete. I suspect this is because the sessions are not
correctly written to the file before application stop. Perhaps session
serialization is the actual problem.

Can you attempt to shut down Tomcat and then check:
1. A few thread dumps
(http://wiki.apache.org/tomcat/HowTo#How_do_I_obtain_a_thread_dump_of_my_running_webapp_.3F)

2. The CPU usage of your webapp and/or threads

I'm wondering if serialization is either running-away (infinite loop,
etc.) or stalling (waiting for access to a locked object) and it's never
completing.

> I used jstack to get a stack trace on the Tomcat process when it hung
> on context reload. I won't post the details unless someone thinks
> they might be helpful (Don't want to fill the email with too much
> stuff).

I think they might be. Go ahead and post the thread dump.

> However, I know I read somewhere that Tomcat will hang on shutdown
> if there is a non-daemon thread still running.

While this is true, it shouldn't block a webapp from reloading (it will
leave the old webapp in memory, so the old webapp won't really go away
completely, but the new webapp should load in its place and handle
requests).

> jstack reports three non-daemon threads: main, VM Thread, and VM
> Periodic Task Thread. I don't think that's causing the problem, but
> figured I'd better let you know anyway.

Nope, those are normal.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrrE6IACgkQ9CaO5/Lv0PCseACgvojWegC03QeaM0Twjd4Ai/Wo
dxQAn0rqHwMGpu7rYj0Ihqsgndr854D4
=aj9o
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to