Closed Bug 1685178 Opened 4 years ago Closed 4 years ago

Figure out how to get good signatures from DLLs w/ only public function names

Categories

(Socorro :: Signature, task, P2)

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: gsvelto, Assigned: willkg)

Details

Attachments

(1 file)

In most DLLs for which we don't have access to the debuginfo there are vast areas of code that are covered by unwinding information but have no symbols attached to them. To improve the output of the stack walker we decide to modify dump_syms to generate "fake" symbols covering those areas that look like this:

<unknown in foobar.dll>

I tried the new symbols with some crashes but the results weren't great:

https://crash-stats.mozilla.org/report/index/e1ff24f1-27cc-4134-aae7-339570201227

I suspect that having put those angle brackets in the symbol is confusing signature generation. The prefix list seems to always skip symbols that end with .dll. Would symbols such as this work better?

unknown in foobar.dll

Or should we keep the current format and add a rule like this to the prefix list?

\<.*\.dll\>

I'm a bit wary that the angle brackets are tripping the signature generation logic into thinking that this is actually a template.

I can look into this tomorrow and tell you what's going on.

Assignee: nobody → willkg
Status: NEW → ASSIGNED
Priority: -- → P2

What's going on is that the CSignatureTool is collapsing <...> into <T> because it likes to do that. That bit of code supports exceptions, so if the exception matches, then it doesn't do that. I can add " in " as an exception and then we end up with something like this:

app@socorro:/app$ socorro-cmd signature --verbose e1ff24f1-27cc-4134-aae7-339570201227
Crash id: e1ff24f1-27cc-4134-aae7-339570201227
Original: <T>
New:      <unknown in msmpeg2vdec.dll> | BaseThreadInitThunk
Same?:    False
Debug:    (4)
          SignatureGenerationRule: using CSignatureTool
          SignatureGenerationRule: prefix; continue iterating: "<unknown in msmpeg2vdec.dll>"
          SignatureGenerationRule: not a prefix; stop: "BaseThreadInitThunk"
          SignatureGenerationRule: change: "" -> "<unknown in msmpeg2vdec.dll> | BaseThreadInitThunk"

Does that look ok?

Yes, that'd be perfect. Especially the lack of repetition of <unknown in msmpeg2vdec.dll>. That's going to make these signatures nicely readable.

I think the skip-repeated-frames code is specific to frames that have ".dll" in them. I wonder if it makes sense to de-dupe consecutive frames generally.

I pushed this to prod just now with bug #1686730 and reprocessed a bunch of crashes with <T> as the signature.

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: