Closed Bug 1599146 Opened 5 years ago Closed 5 years ago

[siglist] Add __cxa_rethrow to the prefix list

Categories

(Socorro :: Signature, task, P2)

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: smichaud, Assigned: willkg)

Details

Attachments

(1 file)

You'll see this on the stack in macOS every time a C++ exception has been rethrown. Many different bugs will share this signature. It needs to be on the prefix list.

Grabbing this to do.

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

We have two lists of things. One is called the prefix list and when a frame is encountered that's in the prefix list, signature generation continues to the next frame. The other interesting list is the irrelevant list and when a frame is encountered that's in the irrelevant list, signature generation skips it--it doesn't show up in the signature.

There's a __cxa_throw in the irrelevant list. I'm going to add __cxa_rethrow there, too.

After doing that, we hit objc_exception_rethrow and objc_addExceptionHandler with the two crash ids in comment #2. We have objc_exception_throw in the prefix list, so I'll add objc_exception_rethrow there. I'll add objc_addExceptionHandler there, too, for now. If that's not interesting, then I can add it to the irrelevant list.

That gives us these:

app@socorro:/app$ socorro-cmd signature 229b74eb-9ef2-4f18-aef2-966ab0191125 cff884cf-a283-491f-bfe2-d1ff80191125
Crash id: 229b74eb-9ef2-4f18-aef2-966ab0191125
Original: __cxa_rethrow
New:      objc_addExceptionHandler | -[NSOpenGLLayer drawInOpenGLContext:pixelFormat:forLayerTime:displayTime:]
Same?:    False

Crash id: cff884cf-a283-491f-bfe2-d1ff80191125
Original: __cxa_rethrow
New:      objc_exception_rethrow | -[NSOpenGLLayer drawInOpenGLContext:pixelFormat:forLayerTime:displayTime:]
Same?:    False

Does that work better?

Flags: needinfo?(smichaud)

I'm uncertain about having __cxa_throw and __cxa_rethrow in the irrelevant list. I think it would cause important information to be lost in the first of your two examples. But I'm happy with having both objc_exception_throw and objc_exception_rethrow in the prefix list. The resulting signatures will certainly be more informative.

By the way, are the prefix list and the irrelevant list available somewhere, to view or download?

Flags: needinfo?(smichaud)

The signature is a hash of the probable cause so as to aggregate crash reports. It's not a string-form of the stack. We often throw frames in the irrelevant list when they're redundant with similar frames. For example, there's a bunch of Rust frames around "An exception was thrown" and most of those are in the irrelevant list.

There's documentation on signature generation, how it works, how to make changes, and where the files and code live here:

https://socorro.readthedocs.io/en/latest/signaturegeneration.html

So you're saying that the prefix list and irrelevant list aren't static, but are (somehow) generated on the fly?

The prefix list and irrelevant list are specified in files in the Socorro repository on GitHub. They can be changed by pull requests and are tracked with the rest of the Socorro code. Anyone can create pull requests to change them. There's a bunch of tooling to make that relatively easy to do.

The specifics, how they're used, the file locations, and all that is covered in the documentation. Maybe reading through that will help answer your questions?

I just pushed this to prod in bug #1600745.

Status: ASSIGNED → RESOLVED
Closed: 5 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: