Error in processing memory_report field

RESOLVED FIXED

Status

Socorro
General
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: erahm, Assigned: adrian)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

I tried to take a look at the memory report for a crash [1] and the 'memory_report' field just contains the snippet of an error message:

> memory_report	{ERROR: "error in json for /home/...cted object or value',)"}

[1] https://crash-stats.mozilla.com/api/UnredactedCrash/?crash_id=258c2b77-ce7a-4318-a12b-0d9ee2160416
Blocks: 1263774
No longer blocks: 1263774
(Assignee)

Comment 1

2 years ago
I'm not sure what to do with this. What would you expect? Where does this `memory_report` field come from?
(In reply to Adrian Gaudebert [:adrian] from comment #1)
> I'm not sure what to do with this. What would you expect? Where does this
> `memory_report` field come from?

I expect it to properly include the memory report, not a truncated error message. I'm not sure where in socorro this is processed, but the memory report comes from a user's machine.
The JSON might be malformed. If that is the case it would be better if this field was omitted entirely (as well as the "contains memory report" field), if that's possible.

Comment 4

2 years ago
The code distinguished three different errors --

https://github.com/mozilla/socorro/blob/831dbb2/socorro/processor/mozilla_transform_rules.py#L378

That particular one does indicate malformed JSON. We also note gzip errors and too large dumps. Do you wnat to omit memory on all of those conditions?
Flags: needinfo?(continuation)
(In reply to Chris Lonnen :lonnen from comment #4)
> That particular one does indicate malformed JSON. We also note gzip errors
> and too large dumps. Do you wnat to omit memory on all of those conditions?

Maybe there could be a memory_report_error field? The current approach just makes it hard to actually find reports with valid memory reports. Though I'm not sure my concern here is the same as Eric's.
Flags: needinfo?(continuation)

Comment 6

2 years ago
Eric -- thoughts?
Flags: needinfo?(erahm)
(In reply to Chris Lonnen :lonnen from comment #6)
> Eric -- thoughts?

Yes my concern is it looks like there's a memory report (to both me and my scripts), but instead it's just truncated error text.
Flags: needinfo?(erahm)
(Assignee)

Comment 8

2 years ago
OK, so what we want to do here is basically to not create a memory_report key if there was an error. Instead we'll add another key, like memory_report_error, which will contain the error.
Assignee: nobody → adrian
(In reply to Adrian Gaudebert [:adrian] from comment #8)
> OK, so what we want to do here is basically to not create a memory_report
> key if there was an error. Instead we'll add another key, like
> memory_report_error, which will contain the error.

Sounds good. When I analyzed 4,500 crash reports containing a 'memory_report' field in bug 1291068 there were a few hundred errors like this, so it's moderately common.

Comment 11

2 years ago
Commit pushed to master at https://github.com/mozilla/socorro

https://github.com/mozilla/socorro/commit/4240590aba55b4232935e46bd525ecc68ced906e
Fixes bug 1266601 - No memory_report key when erroring out. (#3490)

Updated

2 years ago
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.