Closed Bug 1405808 Opened 2 years ago Closed 2 years ago

AttributeError: 'NoneType' object has no attribute 'get' in mozlog

Categories

(Testing :: General, defect)

57 Branch
defect
Not set

Tracking

(firefox58 fixed)

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: kats, Assigned: ahal)

Details

Attachments

(1 file)

https://treeherder.mozilla.org/logviewer.html#?job_id=134977791&repo=try&lineNumber=3418

Lots of this output:

11:54:27     INFO -  mozlog.structuredlog: Failure calling log handler:
11:54:27     INFO -  Traceback (most recent call last):
11:54:27     INFO -    File "C:\slave\test\build\venv\lib\site-packages\mozlog\structuredlog.py", line 237, in _handle_log
11:54:27     INFO -      handler(data)
11:54:27     INFO -    File "C:\slave\test\build\venv\lib\site-packages\mozlog\handlers\base.py", line 94, in __call__
11:54:27     INFO -      formatted = self.formatter(data)
11:54:27     INFO -    File "C:\slave\test\build\venv\lib\site-packages\mozlog\handlers\base.py", line 63, in __call__
11:54:27     INFO -      return self.inner(item)
11:54:27     INFO -    File "C:\slave\test\build\venv\lib\site-packages\mozlog\formatters\errorsummary.py", line 17, in __call__
11:54:27     INFO -      rv = BaseFormatter.__call__(self, data)
11:54:27     INFO -    File "C:\slave\test\build\venv\lib\site-packages\mozlog\reader.py", line 71, in __call__
11:54:27     INFO -      return handler(data)
11:54:27     INFO -    File "C:\slave\test\build\venv\lib\site-packages\mozlog\formatters\errorsummary.py", line 43, in test_status
11:54:27     INFO -      return self._output_test(item["test"], item["subtest"], item)
11:54:27     INFO -    File "C:\slave\test\build\venv\lib\site-packages\mozlog\formatters\errorsummary.py", line 29, in _output_test
11:54:27     INFO -      "group": self.groups.get(test, ''),
11:54:27     INFO -  AttributeError: 'NoneType' object has no attribute 'get'
Interesting. I'll put up a patch to fix this particular error, but it looks like there might be another underlying issue. This can only happen if a test_status/test_end was logged without a suite_start message.

This is *supposed* to be prevented from happening by mozlog, but there is a bug which I haven't been able to land which means sometimes this check gets missed (bug 1372565). That said, all our suites should be logging suite_start. Is this some kind of new suite/mochitest flavor or something?
Assignee: nobody → ahalberstadt
Status: NEW → ASSIGNED
Nope, it's a reftest run on windows, with webrender forced on. I did make a slight tweak to the reftest harness [1] but it shouldn't affect the suite_start message. I've done a lot of try pushes with these same changes before and this is the first time I'm seeing this. So maybe intermittent? I assumed it was a regression somewhere else in the code but I don't know if it's reproducible.

[1] https://hg.mozilla.org/try/rev/61a7aa8a8e741ae22facbe84aac633b3fbb22a04
Oh there are some reftest intermittents where suite_start doesn't get logged, bug 1324961. I even think it spiked recently. So this bug is likely a byproduct of that, but might as well fix it to keep the logs clean.
Comment on attachment 8915578 [details]
Bug 1405808 - [mozlog] Default manifest groups to empty dict in errorsummary formatter,

https://reviewboard.mozilla.org/r/186770/#review191872
Attachment #8915578 - Flags: review?(gbrown) → review+
Pushed by ahalberstadt@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e7fbbfe24fba
[mozlog] Default manifest groups to empty dict in errorsummary formatter, r=gbrown
https://hg.mozilla.org/mozilla-central/rev/e7fbbfe24fba
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in before you can comment on or make changes to this bug.