[mozcrash] kill_and_get_minidump fail on windows when dump_directory is not specified

NEW
Unassigned

Status

Testing
Mozbase
2 years ago
2 years ago

People

(Reporter: parkouss, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(firefox44 affected)

Details

(Reporter)

Description

2 years ago
So I saw this from bug 1195288, here is the stack trace:

> 12:54:16    ERROR -  Traceback (most recent call last):
> 12:54:16     INFO -    File "C:\slave\test\build\tests\talos\talos\run_tests.py", line 241, in <module>
> 12:54:16     INFO -      main()
> 12:54:16     INFO -    File "C:\slave\test\build\tests\talos\talos\run_tests.py", line 237, in main
> 12:54:16     INFO -      sys.exit(run_tests(config, browser_config))
> 12:54:16     INFO -    File "C:\slave\test\build\tests\talos\talos\run_tests.py", line 196, in run_tests
> 12:54:16     INFO -      talos_results.add(mytest.runTest(browser_config, test))
> 12:54:16     INFO -    File "C:\slave\test\build\tests\talos\talos\ttest.py", line 75, in runTest
> 12:54:16     INFO -      return self._runTest(browser_config, test_config, setup)
> 12:54:16     INFO -    File "C:\slave\test\build\tests\talos\talos\ttest.py", line 185, in _runTest
> 12:54:16     INFO -      if counter_management else None),
> 12:54:16     INFO -    File "C:\slave\test\build\tests\talos\talos\talos_process.py", line 95, in run_browser
> 12:54:16     INFO -      mozcrash.kill_and_get_minidump(proc.pid)
> 12:54:16     INFO -    File "C:\slave\test\build\venv\lib\site-packages\mozcrash\mozcrash.py", line 442, in kill_and_get_minidump
> 12:54:16     INFO -      write_minidump(pid, dump_directory)
> 12:54:16     INFO -    File "C:\slave\test\build\venv\lib\site-packages\mozcrash\mozcrash.py", line 374, in write_minidump
> 12:54:16     INFO -      str(uuid.uuid4()) + ".dmp")
> 12:54:16     INFO -    File "C:\slave\test\build\venv\lib\ntpath.py", line 96, in join
> 12:54:16     INFO -      assert len(path) > 0
> 12:54:16    ERROR -  TypeError: object of type 'NoneType' has no len()

From talos we are calling "kill_and_get_minidump" with only the pid:

https://dxr.mozilla.org/mozilla-central/source/testing/talos/talos/talos_process.py#95

This seems pretty reasonable since there dump_directory is a nmed optional arg, and the function documentation is not that clear (to me) that it must be defined on windows. But then dump_directory is None and that fails with the above stack trace.

https://dxr.mozilla.org/mozilla-central/source/testing/mozbase/mozcrash/mozcrash/mozcrash.py#422

I suggest we should either:

1. provide a default value for dump_directory that will work (e.g, "." for example)
2. update the doc to warn that it MUST be defined to work on windows
3. do no make dump_dir an optional parameter

The solutions are sorted according to my preferences, a default value of "." would be good for me.


Ted, what do you think ?
(Reporter)

Updated

2 years ago
See Also: → bug 1210920
(Reporter)

Updated

2 years ago
Flags: needinfo?(ted)
Let's change this to make it non-optional. Thanks for filing this!
Flags: needinfo?(ted)
(Reporter)

Updated

2 years ago
Depends on: 1211608
You need to log in before you can comment on or make changes to this bug.