Closed Bug 743766 Opened 14 years ago Closed 13 years ago

SUT agent: java.lang.IllegalArgumentException in RedirOutputThread

Categories

(Testing :: General, defect)

x86
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla14

People

(Reporter: gbrown, Assigned: gbrown)

References

Details

Attachments

(1 file)

While looking at bug 734715, I noticed this exception: 4-05 16:19:26.384 E/AndroidRuntime( 1411): FATAL EXCEPTION: Thread-40 04-05 16:19:26.384 E/AndroidRuntime( 1411): java.lang.IllegalArgumentException: data.length=65548 offset=0 count=1073800792 04-05 16:19:26.384 E/AndroidRuntime( 1411): at org.apache.harmony.luni.platform.OSNetworkSystem.read(OSNetworkSystem.java:354) 04-05 16:19:26.384 E/AndroidRuntime( 1411): at java.io.FileInputStream.available(FileInputStream.java:148) 04-05 16:19:26.384 E/AndroidRuntime( 1411): at com.mozilla.SUTAgentAndroid.service.RedirOutputThread.run(RedirOutputThread.java:110) from: > philor > https://tbpl.mozilla.org/php/getParsedLog.php?id=10679686&tree=Mozilla- > Inbound > Android Tegra 250 mozilla-inbound opt test robocop on 2012-04-05 16:13:56 Note that this exception is not handled by SUT Agent -- SUT crashes. RedirOutputThread's call to sutErr.available() threw an IllegalArgumentException. This is odd on two counts: - there are no arguments to available() (but obviously the exception arose from an internal call) - javadocs for InputStream.available shows only IOException as an expected exception Even so, it happened, so I think we should handle this exception, just as we handle IOException.
Blocks: 734715
This is a simple change: handle IllegalArgumentException the same as IOException. I opted not to make it more general - catching, say, all Exceptions - because I would prefer that we notice and investigate if there are any other types of exceptions happening here. Minor concerns: - should I update DoCommand::prgVersion with this change? - is handling IllegalArgumentException covering up a problem in RedirOutputThread (is there a way to consistently avoid the IllegalArgumentException)?
Attachment #613370 - Flags: review?(ctalbert)
This one is interesting: > philor > https://tbpl.mozilla.org/php/getParsedLog.php?id=10873523&tree=Mozilla-Inbound > Android Tegra 250 mozilla-inbound opt test robocop on 2012-04-13 05:52:37 During a Robocop test, Fennec crashed. Then on the next attempt to run a test / start a process, sut agent gets that IllegalArgumentException again.
when we catch this, what happens to the test case? Does it continue on just fine?
(In reply to Joel Maher (:jmaher) from comment #3) > when we catch this, what happens to the test case? Does it continue on just > fine? When this exception occurs and we do *not* catch it, sut agent crashes, the test case continues, dmSUT finds that the socket is bad, dmSUT tries to reconnect but cannot, and we end up reporting "unable to copy profile". I don't know how to reproduce this exception, so I don't know what happens when we do catch it. I hope that sut agent does not crash or otherwise malfunction and the test case will continue on fine.
a great find!
Comment on attachment 613370 [details] [diff] [review] handle IllegalArgumentException in RedirOutputThread Great. I don't think this merits a version bump, but after we fix all the other bugs you have sent my way for review of agent changes, i think we might bump after that.
Attachment #613370 - Flags: review?(ctalbert) → review+
Keywords: checkin-needed
Flags: in-testsuite-
Keywords: checkin-needed
Target Milestone: --- → mozilla14
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: