Closed Bug 1247639 Opened 4 years ago Closed 4 years ago

DMError: Non-zero return code for command: ['rm', '-r', '/data/tombstones'] (output: 'rm failed for /data/tombstones, No such file or directory

Categories

(Firefox for Android :: Testing, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 47
Tracking Status
firefox47 --- fixed

People

(Reporter: gbrown, Assigned: ahal)

References

Details

Attachments

(2 files)

After running 'mach mochitest <single-mochitest>' on the 4.3 Android emulator, my next run reports:

DMError: Non-zero return code for command: ['rm', '-r', '/data/tombstones'] (output: 'rm failed for /data/tombstones, No such file or directory

I'm sure this never happened in the past; something has shifted.


Easily remedied with 'adb shell mkdir /data/tombstones', but a terrible nuisance.
The details of the failure are as follows:

DMError: Non-zero return code for command: ['rm', '-r', '/data/tombstones'] (output: 'rm failed for /data/tombstones, No such file or directory
2', retval: '255')

  File "/home/gbrown/src/testing/mochitest/mach_commands.py", line 562, in run_mochitest_general
    **harness_args)
  File "/home/gbrown/src/testing/mochitest/mach_commands.py", line 334, in run_android_test
    return runtestsremote.run_test_harness(options)
  File "/home/gbrown/objdirs/droid/_tests/testing/mochitest/runtestsremote.py", line 302, in run_test_harness
    mochitest = MochiRemote(auto, dm, options)
  File "/home/gbrown/objdirs/droid/_tests/testing/mochitest/runtestsremote.py", line 44, in __init__
    self._automation.deleteTombstones()
  File "/home/gbrown/objdirs/droid/_tests/testing/mochitest/remoteautomation.py", line 160, in deleteTombstones
    timeout=DeviceManager.short_timeout)
  File "/home/gbrown/objdirs/droid/_tests/testing/mochitest/devicemanager.py", line 405, in shellCheckOutput
    raise DMError("Non-zero return code for command: %s (output: '%s', retval: '%s')" % (cmd, output, retval))


That should be caught and ignored: http://hg.mozilla.org/mozilla-central/annotate/904f3554c084/build/mobile/remoteautomation.py#l161.

Caused by the change to the DMError import in bug 1247054 maybe?
Flags: needinfo?(ahalberstadt)
Hm, possibly.. though I'd be a bit surprised as it should be the exact same code, just imported differently. Could you temporarily back that change out and try again?
Flags: needinfo?(ahalberstadt)
Yes, a backout fixes this. In fact, if I just:

-from mozdevice import DMError, DeviceManager
+from devicemanager import DMError, DeviceManager

in remoteautomation.py, this problem is fixed (but mach reftest is broken).
I don't fully understand the nuances here, but it looks like this situation is bad:

from devicemanager import DMError
...
raise DMError
----
from mozdevice import DMError
...
except DMError:

I think everything will be happy if we import consistently across all harnesses, remoteautomation, and mozdevice.
I can run Android mach mochitest, reftest, xpcshell, and robocop locally with this.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=c2aea3dba1c4
Attachment #8718435 - Flags: review?(ahalberstadt)
Comment on attachment 8718435 [details] [diff] [review]
import from mozdevice instead of devicemanager

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

I guess that makes some sort of sense :).

I don't think you need to change the devicemanager/droid files though, as that's within the package. I guess it doesn't hurt. Would you mind removing the files from moz.build while you're at it?
https://dxr.mozilla.org/mozilla-central/source/testing/mochitest/moz.build#36

(including moznetwork)

I've been meaning to fix that for awhile.
Attachment #8718435 - Flags: review?(ahalberstadt)
Comment on attachment 8718435 [details] [diff] [review]
import from mozdevice instead of devicemanager

I cannot prune moz.build because of other imports like http://hg.mozilla.org/mozilla-central/annotate/576a6dcde5b6/testing/mochitest/mochitest_options.py#l13; let's leave that can of worms for another day.
Attachment #8718435 - Flags: review?(ahalberstadt)
Comment on attachment 8718435 [details] [diff] [review]
import from mozdevice instead of devicemanager

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

Sorry I'd really prefer not to leave it for another day as cherry picking files out of their packages like that is a pretty bad hack, and another day probably actually means another year. I have a patch for this that I've verified fixes |mach mochitest| on android. I'll upload it shortly after a try run.
Attachment #8718435 - Flags: review?(ahalberstadt) → review-
See Also: → 1247730
Duplicate of this bug: 1247730
Comment on attachment 8718520 [details]
MozReview Request: Bug 1247639 - Fix DMError when running |mach mochitest| on Android, r?gbrown

https://reviewboard.mozilla.org/r/34593/#review31277

Be sure to remove "DMError" from your check-in comment -- it will cause build retries!
Attachment #8718520 - Flags: review?(gbrown) → review+
Does this fix autophone for you too?
Flags: needinfo?(bob)
Assignee: gbrown → ahalberstadt
yep, I ran this by your try build: https://treeherder.mozilla.org/#/jobs?repo=try&revision=b2b5ad59475f&exclusion_profile=false&filter-tier=1&filter-tier=2&filter-tier=3&filter-searchStr=autophone using autophone-robocoptest-autophone and it is green so far.
Flags: needinfo?(bob)
https://hg.mozilla.org/mozilla-central/rev/9f785a163dee
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 47
You need to log in before you can comment on or make changes to this bug.