Closed Bug 778784 Opened 12 years ago Closed 12 years ago

add logging to sutagent to track its lifetime

Categories

(Testing Graveyard :: SUTAgent, defect)

x86
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla17

People

(Reporter: gbrown, Assigned: gbrown)

Details

Attachments

(1 file)

The new sutcommands.txt file is super! Let's add a little more info to it to help us diagnose more problems.

When trying to understand OOM and reboot and loss-of-connectivity issues, it may be useful to have a record of sutagent's life-time. When did it start, when did it end, why did it end? For instance, Robocop often fails with devicemanagerSUT reporting socket error 54 / EConnReset while processing the "ps" command. Did sutAgent close the socket intentionally, did sutAgent throw an uncaught exception and die, did the Android low memory killer kill it, or was this a network fault? We may not be able to differentiate all of these, but we could at the very least log when a new sutAgent instance starts.
I have added logging to onCreate, onDestroy and CmdWorkerThread start/end, which ends up looking like this:

# cat 2012-07-30-sutcommands.txt
2012/07/30 01:12:26:496 : onCreate
2012/07/30 01:14:24:137 : CmdWorkerThread starts: 14
2012/07/30 01:14:24:198 : 192.168.0.86 : testroot
2012/07/30 01:14:24:311 : 192.168.0.86 : cd /mnt/sdcard/tests
2012/07/30 01:14:24:355 : 192.168.0.86 : cwd
...
2012/07/30 01:16:32:231 : 192.168.0.86 : info process
2012/07/30 01:16:32:263 : 192.168.0.86 : info disk
2012/07/30 01:16:32:289 : 192.168.0.86 : info power
2012/07/30 01:16:32:322 : CmdWorkerThread ends: 14
2012/07/30 01:19:06:529 : onDestroy - finishing
I am happy to add more logging -- <your ideas here>!
Attachment #647251 - Flags: review?(jmaher)
Comment on attachment 647251 [details] [diff] [review]
log sutagent onCreate, onDestroy, and CmdWorkerThread start/stop

Review of attachment 647251 [details] [diff] [review]:
-----------------------------------------------------------------

great.  I like the refactoring.
Attachment #647251 - Flags: review?(jmaher) → review+
https://hg.mozilla.org/mozilla-central/rev/73f529929584
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: