Closed Bug 1588839 Opened 6 months ago Closed 4 months ago

SpecialPowers.spawn (and potentially other SpecialPowers APIs?) like to throw "OperationError: The operation failed for an operation-specific reason" which is unhelpful for narrowing down what's actually going wrong

Categories

(Testing :: Mochitest, defect, P2)

Version 3
defect

Tracking

(Fission Milestone:M4.1, firefox73 fixed)

RESOLVED FIXED
mozilla73
Fission Milestone M4.1
Tracking Status
firefox73 --- fixed

People

(Reporter: Gijs, Assigned: kmag)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

https://bugzilla.mozilla.org/buglist.cgi?quicksearch=%22OperationError%3A%20The%20operation%20failed%20for%20an%20operation-specific%20reason%22&list_id=14942157

This is confusing both for local debugging and for the intermittents that are being filed for this error that then obscure what the actual error is. Causes I've seen so far include:

  • passing broken arguments (e.g. null as the 'args' parameter)
  • errors in the execution of the spawned task (e.g. ReferenceError when referencing functions that don't exist, attempting to access properties on things that are null, etc.)

Kris, did you have some bug on file for this already?

Flags: needinfo?(kmaglione+bmo)

I'm marking this as blocking Fission mochitests because it makes fixing them way more annoying.

No, but I've been working on it.

Assignee: nobody → kmaglione+bmo
Flags: needinfo?(kmaglione+bmo)

This is necessary for sanity checking values sent from content processes
before using them with APIs which require SavedFrame objects.

In order to be able to reasonably debug error results from things like
JSWindowActor.sendQuery, we need to be able to clone errors across process
boundaries, so that they can be propagated to the caller that initiated a
query. The standard for the structured clone algorithm does not allow cloning
errors directly, so this patch instead adds a chrome-only wrapper object which
supports structured clone writing, and on reading, automatically decodes to
the error object it wraps. Callers who wish to clone an Error or Exception
object simply need to wrap it in a ClonedErrorHolder before sending.

This makes it much simpler to track down the source of message handler errors
by linking the cross-process caller chains which sent the problematic message.

The priority flag is not set for this bug.
:ahal, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(ahal)
Flags: needinfo?(ahal)
Priority: -- → P2
Attachment #9104798 - Attachment description: Bug 1588839 - Part 1 - Add helper to allow structured cloning Error/Exception objects. r=nika → Bug 1588839 - Part 1 - Add helper to allow structured cloning Error/Exception objects. r=bzbarsky
Attachment #9104799 - Attachment description: Bug 1588839 - Part 2: Return the actual rejection value when a sendQuery handler rejects. r=nika → Bug 1588839 - Part 2: Return the actual rejection value when a sendQuery handler rejects. r=bzbarsky
Attachment #9104800 - Attachment description: Bug 1588839 - Part 3: Preserve cross-process async stacks in sendQuery/sendAsyncMessage calls. r=nika → Bug 1588839 - Part 3: Preserve cross-process async stacks in sendQuery/sendAsyncMessage calls. r=bzbarsky
Fission Milestone: --- → M4.1
Attachment #9104797 - Attachment description: Bug 1588839 - Part 0 - Add js::IsSavedFrame helper. r=mccr8 → Bug 1588839 - Part 0 - Add js::IsSavedFrame helper. r=jimb
Duplicate of this bug: 1600615
Pushed by tjovanovic@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2f8b5b48c896
Part 0 - Add js::IsSavedFrame helper. r=jimb
https://hg.mozilla.org/integration/autoland/rev/65cc1910918c
Part 1 - Add helper to allow structured cloning Error/Exception objects. r=bzbarsky
https://hg.mozilla.org/integration/autoland/rev/cde41501372a
Part 2: Return the actual rejection value when a sendQuery handler rejects. r=bzbarsky
https://hg.mozilla.org/integration/autoland/rev/7cfcd0f5da4f
Part 3: Preserve cross-process async stacks in sendQuery/sendAsyncMessage calls. r=bzbarsky
Flags: needinfo?(kmaglione+bmo)
Pushed by maglione.k@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/df371f905d3a
Part 0 - Add js::IsSavedFrame helper. r=jimb
https://hg.mozilla.org/integration/autoland/rev/e4783542b7c8
Part 1 - Add helper to allow structured cloning Error/Exception objects. r=bzbarsky
https://hg.mozilla.org/integration/autoland/rev/c51a9a372a81
Part 2: Return the actual rejection value when a sendQuery handler rejects. r=bzbarsky
https://hg.mozilla.org/integration/autoland/rev/aa4e0207b45f
Part 3: Preserve cross-process async stacks in sendQuery/sendAsyncMessage calls. r=bzbarsky
See Also: → 1608760
Regressions: 1608760
See Also: 1608760
You need to log in before you can comment on or make changes to this bug.