Bug #46052 Agent doesn't report data & pegs CPU when clock is set back while agent running
Submitted: 8 Jul 20:01 Modified: 12 Nov 0:24
Reporter: Andy Bang
Status: QA testing
Category:Monitoring: Agent Severity:S2 (Serious)
Version:2.1.0.1074 OS:Any
Assigned to: Kay Roepke Target Version:2.1 maint release
Triage: Triaged: D2 (Serious) / R3 (Medium) / E3 (Medium)

[8 Jul 20:01] Andy Bang
Description:
If you set the clock back on the Agent box while the Agent is running, it doesn't report
any data to the Service Manager and pegs the CPU at 99%.

How to repeat:
1) Start Service Manager on one machine
2) Start Agent on another, where the time on this second box is in sync with the time on
the Service Manager box
3) Let it run for a bit to just see that everything is OK
     o Observe that the agent shows as "up" on the Monitor tab
     o Observe that "Last Agent Contact" in meta info updates when the page is refreshed
and is in synch with local time on the Service Manager box
     o Observe that "Reporting Delay Milliseconds" in meta info is reasonable
4) Set the time on the Agent box *back* 15 minutes
5) Wait a minute or two and refresh the Monitor tab
     o Observe that the agent shows as "down" on the Monitor tab
     o Observe that "Last Agent Contact" in meta info does *not* change when the page is
refreshed
     o Observe that "Reporting Delay Milliseconds" in meta info stays the same as it was
before
     o Observe that there is a "MySQL Agent Not Reachable" critical alert
     o Observe that CPU on the agent box is pegged at 99%
     o Observe that this continues for about 15 minutes
6) Wait a little longer than 15 minutes
     o Observe that the agent shows as "up" on the Monitor tab
     o Observe that the mysqld it's monitoring shows as "down"
     o Observe that "Last Agent Contact" in meta info updates when the page is refreshed
and is now in synch with local time on the Service Manager box
     o Observe that "Reporting Delay Milliseconds" in meta info is about equivalent to 15
minutes
     o Observe that CPU on the agent box is no longer pegged at 99%
7) Wait a few more minutes and refresh the Monitor tab
     o Observe that the mysqld the agent is monitoring shows as "up" now

Suggested fix:
1) Detect time changing significantly and rectify the schedules.
2) Don't peg the CPU.
[12 Oct 19:31] Enterprise Tools JIRA Robot
Jan Kneschke writes: 
comments added the review board. Minor issues which can be corrected without another
review round. Approved.
[12 Nov 0:24] Enterprise Tools JIRA Robot
Keith Russell writes: 
Patch installed in version => 2.2.0.1536.
[17 Nov 20:56] Enterprise Tools JIRA Robot
Keith Russell writes: 
Patch installed in versions => 2.1.1.1108.