We have run into a couple of bugs where the main loop in the PluginMain class locked up due to EventQueue.invokeAndWait() being called. In this situation we will be unable to run any more applets in this JVM instance, and the browser will become unresponsive because it will wait several seconds for some message acknowledgments that will never come.
To guard against this inadvertently happening in the future we should add a per-JVMInstance heartbeat thread similar to that already in the client JVM process. Probably the pauses between the heartbeats should be longer than in the client JVM process, since this is only intended as a measure of last resort. If the browser-side code determines that a given JVMInstance is unresponsive, it should use Process.destroy() to terminate it. The existing code on the browser side will handle the necessary cleanups.