(1:00:30 PM) mazz: ips: I can't remember if there is "pull the pin" suicide code in that shutdown hook (1:00:48 PM) mazz: by that I mean, it tries to kindly wait, but if the threads don't die, we eventually call System.exit() (1:00:56 PM) mazz: is that the 100s timeout you are talking about? (1:01:18 PM) mazz: // set our timebomb to ensure the agent dies (1:01:18 PM) mazz: spawnKillThread(1000L * 60 * 5); (1:01:41 PM) mazz: /** (1:01:41 PM) mazz: * If something goes wrong and the VM does not die on its own when we think it should, (1:01:41 PM) mazz: * the thread created by this method will explicitly kill the VM. (1:01:41 PM) mazz: * Calling this method sets a timebomb that will kill the VM after a timer runs out. (1:01:41 PM) mazz: * There is no way to stop this timebomb short of performing 007-type heroics. (1:01:42 PM) mazz: * (1:01:42 PM) mazz: * @param doomsday the number of milliseconds that the VM has left to live; once this (1:01:43 PM) mazz: * time expires, a kill thread will execute System.exit(0). (1:01:43 PM) mazz: */ (1:01:44 PM) mazz: public void spawnKillThread(final long doomsday) { (1:01:50 PM) mazz: so after 5 minutes, the agent should eventually die (1:02:28 PM) mazz: during shutdown, we should see a daemon thread named "RHQ Agent Kill Thread" in the thread dump (1:03:00 PM) mazz: so it seems to me that no more than 5m should elapse before the agent VM process dies spawnKillThread(1000L * 60 * 5) should be configurable if people want to change this behaviour, but keep its current default.
Made the agent shutdown time configurable: https://github.com/rhq-project/rhq/pull/191
commit cb99af60bececc64eba8b3ed12621d0028010755 Author: Josejulio Martínez Magaña <jmartine> Date: Mon Oct 26 14:41:37 2015 -0600 Bug 833547 - make agent shutdown timeout configurable Takes the configuration from AgentConfiguration. Created the defaults in AgentConfigurationConstants. The configuration is taken from the entry: "rhq.agent.agent-update.exit-timeout-msecs".
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions