Comment 1 for bug 1507711

Revision history for this message
Martin Pitt (pitti) wrote :

Ignoring the topmost function seems a bit dangerous to me, as it's usually the most important one. Imagine if the second and third etc. frames are only things like g_main_loop_process_event(), g_main_run(), and main(), and the topmost one is the particular callback. So entirely ignoring the first frame could easily lead to unifying crashes which are different.

What is the rationale for this? I. e. as it's coming from you Brian I suppose this is somehow related to whoopsie and errors.u.c. Don't we use the StacktraceAddressSignature for duplication anyway, as that's pretty much always available (albeit an N:1 mapping)? What happens if there is an SAS, but no DuplicateSignature because of a missing/broken first frame?

Depending on what we need this for, we could potentially be more clever here -- e. g. if we have 4 "named" frames, and the topmost one is ??, we could change the topmost one to be in the format of SAS, i. e. library+offset (based on the stack address). So instead of just having ?? we could have a "hybrid" DuplicateSignature like

  /lib/x86_64-linux-gnu/libc-2.19.so+36f79:connect_to_socket:wl_display_connect:_gdk_wayland_display_open:main()

i. e. if your use case does not depend on having function names but you treat the DuplicateSignature as an opaque blob, that'd be fine. I would exaggerate this, as the idea of a DuplicateSignature is that it's uniquely identifying a crash; as opposed to a SAS which is often N:1, i. e. a particular crash often has more than one (I've seen up to 6) SAS. But having a DupSig with max. one address offset as opposed to no DupSig at all indeed seems like a worthwhile improvement.