Closed Bug 923513 Opened 11 years ago Closed 11 years ago

Make remoteautomation.py use the new mozcrash check_for_java_exception()

Categories

(Testing :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla27

People

(Reporter: emorley, Assigned: emorley)

References

Details

Attachments

(1 file)

Once bug 923500 has rolled out, we can clean up remoteautomation.py and make it use mozcrash::check_for_java_exception() instead.
Attached patch Patch v1Splinter Review
Make remoteautomation.py use the new mozcrash check_for_java_exception().
Will obviously need to wait until bug 923500 rolled out etc.
Attachment #813604 - Flags: review?(jmaher)
Comment on attachment 813604 [details] [diff] [review]
Patch v1

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

please verify on try server for the tegras sys path.

::: build/mobile/remoteautomation.py
@@ +10,5 @@
>  import subprocess
>  
>  from automation import Automation
>  from devicemanager import NetworkTools, DMError
> +import mozcrash

are there dependencies here?  We run on the tegras which isn't mozharness, so we need to ensure all dependencies of mozcrash are available, more specifically the modules are in the sys.path (this requires sys.path hacking, but is probably already done at the runner script)
Attachment #813604 - Flags: review?(jmaher) → review+
(In reply to Joel Maher (:jmaher) from comment #2)
> > +import mozcrash
> 
> are there dependencies here?  We run on the tegras which isn't mozharness,
> so we need to ensure all dependencies of mozcrash are available, more
> specifically the modules are in the sys.path (this requires sys.path
> hacking, but is probably already done at the runner script)

automation.py.in already uses mozcrash on Android, and appends the necessary directories to the path here:
https://hg.mozilla.org/integration/mozilla-inbound/file/bf856e026871/build/automation.py.in#l38
...which unless I'm mistaken, permanently changes the path for all subsequent imports in all files.

But yeah, will verify on Try (you don't need to worry about a sheriff not using Try... would be kind of hypocritical not to... ;-))
With intentional-crash patch applied:
remote:   https://tbpl.mozilla.org/?tree=Try&rev=a29796f74d73
(In reply to Ed Morley [:edmorley UTC+1] from comment #4)
> With intentional-crash patch applied:
> remote:   https://tbpl.mozilla.org/?tree=Try&rev=a29796f74d73

Ok, few issues:
1) On the pandas, the releng pypi mirror is missing mozcrash-0.9, I'll file a bug to have it added.
2) In mozharness for pandas we should specify a minimum version of mozcrash, so we fail early in cases like this. Guessing we do this somewhere here:
https://hg.mozilla.org/build/mozharness/file/55fa038de460/scripts/android_panda.py#l133
https://hg.mozilla.org/build/mozharness/file/55fa038de460/scripts/android_panda_talos.py#l88
3) (But not an issue with this patch in particular) The panda mochitest-1 run had an uncaught exception whilst trying to process the java-exception, and yet the exception didn't turn the run orange.

Joel, presume I'm just good to file a releng bug for #1? Happy for me to do #2 (ie have a >= for mozcrash-0.9)?
Flags: needinfo?(jmaher)
More specifically:

> 1) On the pandas, the releng pypi mirror is missing mozcrash-0.9
...
> 2) In mozharness for pandas we should specify a minimum version of mozcrash

16:40:31     INFO - Installing mozcrash into virtualenv /builds/panda-0854/test/build/venv
16:40:31     INFO - Running command: ['/builds/panda-0854/test/build/venv/bin/pip', 'install', '--download-cache', '/builds/panda-0854/test/build/venv/cache', '--no-index', '--find-links', 'http://pypi.pvt.build.mozilla.org/pub', '--find-links', 'http://pypi.pub.build.mozilla.org/pub', 'mozcrash'] in /builds/panda-0854/test/build
16:40:31     INFO - Copy/paste: /builds/panda-0854/test/build/venv/bin/pip install --download-cache /builds/panda-0854/test/build/venv/cache --no-index --find-links http://pypi.pvt.build.mozilla.org/pub --find-links http://pypi.pub.build.mozilla.org/pub mozcrash
16:40:33     INFO -  Ignoring indexes: http://pypi.python.org/simple/
16:40:33     INFO -  Downloading/unpacking mozcrash
16:40:33     INFO -    Downloading mozcrash-0.5.tar.gz
16:40:33     INFO -    Storing download in cache at ./venv/cache/http%3A%2F%2Freleng-puppet2.build.scl1.mozilla.com%2Fpython%2Fpackages%2Fmozcrash-0.5.tar.gz


> 3) (But not an issue with this patch in particular) The panda mochitest-1
> run had an uncaught exception whilst trying to process the java-exception

16:57:15     INFO -  INFO | zombiecheck | Reading PID log: /tmp/tmp1PoLeMpidlog
16:57:16     INFO -  Traceback (most recent call last):
16:57:16     INFO -    File "/builds/panda-0854/test/build/tests/mochitest/runtests.py", line 1005, in runTests
16:57:16     INFO -      onLaunch=onLaunch
16:57:16     INFO -    File "/builds/panda-0854/test/build/tests/mochitest/runtestsremote.py", line 542, in runApp
16:57:16     INFO -      return self._automation.runApp(*args, **kwargs)
16:57:16     INFO -    File "/builds/panda-0854/test/build/tests/mochitest/automation.py", line 899, in runApp
16:57:16     INFO -      crashed = self.checkForCrashes(os.path.join(profileDir, "minidumps"), symbolsPath)
16:57:16     INFO -    File "/builds/panda-0854/test/build/tests/mochitest/remoteautomation.py", line 118, in checkForCrashes
16:57:16     INFO -      javaException = mozcrash.check_for_java_exception(logcat)
16:57:16     INFO -  AttributeError: 'module' object has no attribute 'check_for_java_exception'
16:57:16     INFO -  /data/anr/traces.txt not found
16:57:16     INFO -  Automation Error: Received unexpected exception while running application
16:57:16     INFO -  WARNING | leakcheck | refcount logging is off, so leaks can't be detected!
16:57:16     INFO -  runtests.py | Running tests: end.
yes, we will need releng bugs for both of those issues.  Once those are updated, we can work on rolling this out, I would think this would be a 1 day turnaround.

please cc, kmoir, aki, armen, callek on the bug(s) for releng.
Flags: needinfo?(jmaher)
Depends on: 927055
(In reply to Ed Morley [:edmorley UTC+1] from comment #6)
> 2) In mozharness for pandas we should specify a minimum version of mozcrash

In fact, I think this will be made redundant by bug 921596.
All seemed good on the try retriggers now that the releng pypi store has mozcrash-0.9, so landed:
https://hg.mozilla.org/integration/mozilla-inbound/rev/7652896ed115
https://hg.mozilla.org/mozilla-central/rev/7652896ed115
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: