Closed
Bug 781735
Opened 12 years ago
Closed 12 years ago
SUTAgent should not die if it can't create a file on the sdcard
Categories
(Testing Graveyard :: SUTAgent, defect)
Testing Graveyard
SUTAgent
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla17
People
(Reporter: Callek, Assigned: Callek)
Details
Attachments
(1 file)
578 bytes,
patch
|
jmaher
:
review+
|
Details | Diff | Splinter Review |
So while trying to guess/figure out why SUTAgent1.11 seems[ed] to be hanging/dying on its SUTAgent Command Port connections since upgrading... I theorized that there are times (such as after a reboot) where it is launched/takes a command before the SDCard is fully ready (as in writable/available) And it turns out that in some cases if |PrintWriter| fails to construct (e.g. is created "null" then we attempt to dereference null and call |close()|. Of course this is a bad idea, and this patch guards against that, basically ignoring the fact that this happens, and allowing the command to do its normal run and do its other stuff. This is all related to Bug 778784 and Bug 776078. And since I don't have a Java Build Environ, nor a local tegra/device to test with, this patch is untested
Attachment #650790 -
Flags: review?(jmaher)
Comment 1•12 years ago
|
||
Comment on attachment 650790 [details] [diff] [review] v1 Review of attachment 650790 [details] [diff] [review]: ----------------------------------------------------------------- good find, I want to scour the code in a bit more detail to look for other culprits, but this might be all there is to it.
Attachment #650790 -
Flags: review?(jmaher) → review+
Comment 2•12 years ago
|
||
(In reply to Joel Maher (:jmaher) from comment #1) > Comment on attachment 650790 [details] [diff] [review] > v1 > > Review of attachment 650790 [details] [diff] [review]: > ----------------------------------------------------------------- > > good find, I want to scour the code in a bit more detail to look for other > culprits, but this might be all there is to it. Looks ok to me too. We do have a bunch of other code in the agent that does stuff with files (and thus may fail with a bad sdcard), but I think the fairly unique thing we have here is the finally clause that gets executed whether or not we successfully open/write to the file. I'm not actually sure if the finally clause is actually necessary at all (won't it be called explicitly by the destructor regardless?) but I couldn't find anything saying that for sure with a quick google search. I say we apply this as-is.
Assignee | ||
Comment 3•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/9676734d2960 Pushed with don't build
Comment 4•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/9676734d2960
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
Comment 5•12 years ago
|
||
(In reply to Justin Wood (:Callek) from comment #3) > Pushed with don't build <3 :-)
Updated•6 years ago
|
Product: Testing → Testing Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•