Closed
Bug 1270091
Opened 8 years ago
Closed 8 years ago
fix_stack_using_bpsyms.py should handle parsing errors more gracefully
Categories
(Testing :: General, defect)
Testing
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: ted, Assigned: rillian)
Details
Attachments
(1 file, 1 obsolete file)
1.18 KB,
patch
|
rillian
:
review+
|
Details | Diff | Splinter Review |
in bug 1268617, rillian pushed a patch that caused dump_syms to generate .sym files with FUNC lines that were missing function names, like: `FUNC 3eee0 c0 0 ` fix_stack_using_bpsyms.py barfs on parsing these: https://dxr.mozilla.org/mozilla-central/rev/0a25833062a880f369e6f9f622413a94cc671bf4/tools/rb/fix_stack_using_bpsyms.py#46 ``` 14:49:03 INFO - File "C:\slave\test\build\tests\bin\fix_stack_using_bpsyms.py", line 46, in __init__ 14:49:03 INFO - (junk, rva, size, ss, name) = line.split(None, 4) 14:49:03 INFO - ValueError: need more than 4 values to unpack ``` (from https://treeherder.mozilla.org/logviewer.html#?job_id=27162094&repo=mozilla-inbound#L26653 ) The parser should handle these more gracefully so that we get useful output instead of a Python stacktrace.
Reporter | ||
Comment 1•8 years ago
|
||
The symbol file in that log is xul.sym from https://queue.taskcluster.net/v1/task/CQo_Tn5fSkeiwe5Ae7C6vg/artifacts/public/build/firefox-49.0a1.en-US.win64.crashreporter-symbols.zip .
Assignee | ||
Comment 2•8 years ago
|
||
Here's a minimal patch to work around the exception with the `rustc -g` output. A better fix would be to catch ValueError on the whole parse stanza and do something sensible, but I'd like to land this in the short term to unblock bug 1266309.
Attachment #8750912 -
Flags: review?(dminor)
Assignee | ||
Comment 3•8 years ago
|
||
Does seem to work on try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=bcf5299f221b
Comment 4•8 years ago
|
||
Comment on attachment 8750912 [details] [diff] [review] Handle missing function names Review of attachment 8750912 [details] [diff] [review]: ----------------------------------------------------------------- ::: tools/rb/fix_stack_using_bpsyms.py @@ +48,5 @@ > # http://code.google.com/p/google-breakpad/wiki/SymbolFiles > if line.startswith("FUNC "): > # FUNC <address> <size> <stack_param_size> <name> > + bits = line.split(None, 4) > + expandListTo(bits, 5) I think you could just do: if len(bits) < 5: bits.append('unnamed_function') and avoid having to add the expandListTo function.
Attachment #8750912 -
Flags: review?(dminor) → review+
Assignee | ||
Comment 5•8 years ago
|
||
Thanks. I guess we don't have to handle the case with empty `size` or `ss`. Carrying forward r=dminor.
Attachment #8750912 -
Attachment is obsolete: true
Attachment #8750950 -
Flags: review+
Comment 6•8 years ago
|
||
(In reply to Ralph Giles (:rillian) needinfo me from comment #5) > Created attachment 8750950 [details] [diff] [review] > Handle missing function names v2 > > Thanks. I guess we don't have to handle the case with empty `size` or `ss`. I was thinking it best to fix the problem at hand and save a larger cleanup for later, rather than do a partial cleanup now. I'm not familiar with this code, it would be better to have Ted review anything larger than this :)
Assignee | ||
Comment 7•8 years ago
|
||
Ok, thanks. Giving it a try now that inbound is open again.
Keywords: leave-open
Comment 9•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/8b6e362858f2
Comment 10•8 years ago
|
||
rillian, can we remove the leave-open keyword and close this bug?
Flags: needinfo?(giles)
Reporter | ||
Updated•8 years ago
|
Assignee: nobody → giles
Status: NEW → RESOLVED
Closed: 8 years ago
Keywords: leave-open
Resolution: --- → FIXED
Reporter | ||
Updated•8 years ago
|
Flags: needinfo?(giles)
You need to log in
before you can comment on or make changes to this bug.
Description
•