Closed Bug 1849266 Opened 1 years ago Closed 10 months ago

Stack frame with parentheses cut off when filing as a bugzilla bug

Categories

(Socorro :: Webapp, defect, P2)

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mccr8, Assigned: willkg)

Details

Attachments

(1 file, 1 obsolete file)

Frame 2 of the bp-1a5f09ec-2b87-4354-ae30-40ef60230817 crash report is:
mozilla::dom::(anonymous namespace)::DebuggerImmediateRunnable::WorkerRun(JSContext*, mozilla::dom::WorkerPrivate*)

However, if you do "create a bug" in the Bugzilla tab, that frame shows up as
mozilla::dom::

I'm guessing the parentheses is causing issues.

Grabbing this to look into.

Assignee: nobody → willkg
Status: NEW → ASSIGNED
Type: task → defect
Priority: -- → P2

The problem is here:

https://github.com/mozilla-services/socorro/blob/6a23fac6a5247a5fa91ca24a68cba249652c96ac/webapp/crashstats/crashstats/templatetags/jinja_helpers.py#L231-L282

I'm not sure I understand why it's helpful to remove arguments in the first place other than to reduce the number of characters involved. There's a limit on how many characters can be in a url--but we handle that elsewhere with truncation.

I wonder if it makes more sense to stop dropping the arguments and instead truncate long symbols to 80 characters. Then we'd end up with something like this for bp-1a5f09ec-2b87-4354-ae30-40ef60230817:

0  libxul.so  MOZ_Crash(char const*, int, char const*)  mfbt/Assertions.h:281
0  libxul.so  js::ContextChecks::fail(JS::Compartment*, JS::Compartment*, int)  js/src/vm/JSContext-inl.h:54
0  libxul.so  js::ContextChecks::check(JS::Compartment*, int)  js/src/vm/JSContext-inl.h:70
0  libxul.so  js::ContextChecks::check(JSObject*, int)  js/src/vm/JSContext-inl.h:83
0  libxul.so  js::ContextChecks::check(JS::Value const&, int)  js/src/vm/JSContext-inl.h:124
1  libxul.so  JSContext::checkImpl<JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::Handle...  js/src/vm/JSContext-inl.h:206
1  libxul.so  JSContext::check<JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::HandleValu...  js/src/vm/JSContext-inl.h:213
1  libxul.so  JS_CallFunctionValue(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>...  js/src/vm/CallAndConstruct.cpp:47
2  libxul.so  mozilla::dom::(anonymous namespace)::DebuggerImmediateRunnable::WorkerRun(JSC...  dom/workers/WorkerPrivate.cpp:665
3  libxul.so  mozilla::dom::WorkerRunnable::Run()  dom/workers/WorkerRunnable.cpp:372

Andrew: What do you think of that? Is that better? Is 80 too long/short?

Flags: needinfo?(continuation)

Thanks. Yeah, that looks fine to me. It has the nice property that truncation is going to happen for a frame for less surprising reasons. My only concern would be if we start hitting the total length limit more often, but I don't have a sense of how much of an issue that is.

checkImpl is kind of a mess there, but that's all due to the template arguments, which weren't being removed before anyways.

Flags: needinfo?(continuation)

I think we only hit the total length with JavaStackTrace because that can be inordinately large and it's a single, unstructured string.

I don't think this change will affect how often we hit the total length limit. When we do, it's pretty obvious for whoever is creating a new bug and they can write up a bug about it and then I can go twiddle with things again.

I'll mention this on #stability and see what others think and whether anyone has an opinion on whether 80 is too long/short.

No one on #stability or anywhere else I asked had any opinions, so we're free to make changes.

I'll look at doing this soon.

Attachment #9382902 - Attachment is obsolete: true

willkg merged PR [mozilla-services/socorro]: bug 1849266: change generate_create_bug_url to truncate symbols and refactor (#6563) in 28c9229.

This refactored the comment-creating code so it's easier to use by external users and it'll be easier to evolve.

This deployed to production just now in bug #1890341.

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

Attachment

General

Creator:
Created:
Updated:
Size: