Closed Bug 822713 Opened 12 years ago Closed 3 years ago

JS RegExp doesn't call the operation callback (was: Memory reporting for telemetry can cause the main thread to block on workers for an arbitrary amount of time)

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
critical

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox17 --- affected
firefox18 - wontfix
firefox19 - ---
firefox20 - ---

People

(Reporter: bzbarsky, Unassigned)

References

Details

(Whiteboard: [js:p2][Snappy])

See the process sample in attachment 693265 [details].  It shows the main thread under CollectRuntimeStatsRunnable::DispatchInternal waiting on a condvar while the worker is under js::RegExpShared::execute in what looks like regexp jitcode for the whole time.  Bug 822407 comment 9 indicates that this state lasted for 23 minutes(!), which is ... rather unacceptable.

Ben, do we wait until we get back to the worker event loop to process the memory reporter runnable?  Or do we do it off the operation callback?  In the latter case, is the problem perhaps that regexp jitcode doesn't fire operation callbacks?
We run it off the operation callback so this shouldn't happen. I think this is a JS engine bug.
Assignee: nobody → general
Component: DOM: Workers → JavaScript Engine
So apparently there is no operation callback during regexp jitcode with yarr....  :(
Whiteboard: [Snappy]
FF17 appears to be affected so wontfixing for FF18 given where we are in the cycle. Is this even a FF17 regression? If not, this isn't a release tracking issue.
It's a regression probably from whenever we stopped firing the operation callback for regexps or started doing telemetry memory reporting, whichever came later....  I don't know offhand when those happened.
Blocks: 819573
Please re-nominate if there's reason to believe that this is a recent regression, or user impact has worsened recently.
Whiteboard: [Snappy] → [js:p2][Snappy]
Summary: Memory reporting for telemetry can cause the main thread to block on workers for an arbitrary amount of time → JS RegExp doesn't call the operation callback (was: Memory reporting for telemetry can cause the main thread to block on workers for an arbitrary amount of time)
Assignee: general → nobody

Hey Boris,
Does this issue still occur for you?

Flags: needinfo?(bzbarsky)

The regexp engine has been replaced twice since this bug was opened. The current engine handles interrupts during jitcode correctly.

Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(bzbarsky)
Resolution: --- → FIXED
Resolution: FIXED → WORKSFORME
You need to log in before you can comment on or make changes to this bug.