Closed Bug 1585073 Opened 1 year ago Closed 1 year ago

Tab hang while viewing google sheet

Categories

(Core :: Graphics, defect, P1)

Desktop
Windows 7
defect

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox-esr68 --- unaffected
firefox70 --- disabled
firefox71 --- disabled
firefox72 --- fixed

People

(Reporter: jimm, Assigned: bobowen)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Tab hang while interacting with a google sheet. I have canvasipc turned on.

While viewing the sheet, clicked on a cell which caused a block of the whole sheet to paint black. Flipped to another tab and back, hung tab with the spinner.

[External Code]

xul.dll!mozilla::CrossProcessSemaphore::Wait(const mozilla::Maybe<mozilla::BaseTimeDuration<mozilla::TimeDurationValueCalculator> > & aWaitTime) Line 60 C++
xul.dll!mozilla::layers::CanvasEventRingBuffer::WaitForReadCount(unsigned int aReadCount, mozilla::BaseTimeDuration<mozilla::TimeDurationValueCalculator> aTimeout, int aRetryCount) Line 380 C++
xul.dll!mozilla::layers::CanvasEventRingBuffer::WaitForAndRecalculateAvailableSpace() Line 109 C++
xul.dll!mozilla::layers::CanvasEventRingBuffer::write(const char * const aData, const unsigned __int64 aSize) Line 124 C++
xul.dll!mozilla::gfx::RecordedSourceSurfaceCreation::Record<mozilla::gfx::EventStream>(mozilla::gfx::EventStream & aStream) Line 2816 C++
xul.dll!mozilla::gfx::EventRingBuffer::RecordEvent<mozilla::gfx::RecordedSourceSurfaceCreation>(const mozilla::gfx::RecordedSourceSurfaceCreation * aRecordedEvent) Line 196 C++
xul.dll!mozilla::gfx::DrawEventRecorderPrivate::StoreSourceSurfaceRecording(mozilla::gfx::SourceSurface * aSurface, const char * aReason) Line 28 C++
xul.dll!mozilla::gfx::EnsureSurfaceStoredRecording(mozilla::gfx::DrawEventRecorderPrivate * aRecorder, mozilla::gfx::SourceSurface * aSurface, const char * reason) Line 46 C++
xul.dll!mozilla::gfx::DrawTargetRecording::CopySurface(mozilla::gfx::SourceSurface * aSurface, const mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> & aSourceRect, const mozilla::gfx::IntPointTyped<mozilla::gfx::UnknownUnits> & aDestination) Line 444 C++
xul.dll!mozilla::layers::PersistentBufferProviderShared::BorrowDrawTarget(const mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> & aPersistedRect) Line 377 C++
xul.dll!mozilla::dom::CanvasRenderingContext2D::EnsureTarget(const mozilla::gfx::RectTyped<mozilla::gfx::UnknownUnits,float> * aCoveredRect, bool) Line 1286 C++
xul.dll!mozilla::dom::CanvasRenderingContext2D::Save() Line 1719 C++
xul.dll!mozilla::dom::CanvasRenderingContext2D_Binding::save(JSContext * cx, JS::Handle<JSObject *> obj, mozilla::dom::CanvasRenderingContext2D * self, const JSJitMethodCallArgs & args) Line 6242 C++
xul.dll!mozilla::dom::binding_detail::GenericMethod<mozilla::dom::binding_detail::NormalThisPolicy,mozilla::dom::binding_detail::ThrowExceptions>(JSContext * cx, unsigned int argc, JS::Value * vp) Line 0 C++
[External Code]

Regressed by: canvas-ipc

After running for a while with the spinner going, it triggered an exception -

Exception thrown at 0x000007FED2EB8111 (xul.dll) in firefox.exe: 0xC0000005: Access violation reading location 0x00000000000001A8.

xul.dll!mozilla::layers::SourceSurfaceCanvasRecording::SourceSurfaceCanvasRecording(const RefPtr<mozilla::gfx::SourceSurface> & aRecordedSuface, mozilla::layers::CanvasChild * aCanvasChild, const RefPtr<mozilla::layers::CanvasDrawEventRecorder> & aRecorder) Line 49 C++
xul.dll!mozilla::layers::CanvasChild::WrapSurface(const RefPtr<mozilla::gfx::SourceSurface> & aSurface) Line 269 C++
xul.dll!mozilla::layers::RecordedTextureData::BorrowSnapshot() Line 61 C++
xul.dll!mozilla::layers::TextureClient::BorrowSnapshot() Line 861 C++
xul.dll!mozilla::layers::PersistentBufferProviderShared::BorrowSnapshot() Line 0 C++
xul.dll!mozilla::dom::CanvasRenderingContext2D::GetSurfaceSnapshot(gfxAlphaType * aOutAlphaType) Line 1703 C++
xul.dll!mozilla::dom::HTMLCanvasElement::GetSurfaceSnapshot(gfxAlphaType * aOutAlphaType) Line 1289 C++
xul.dll!nsLayoutUtils::SurfaceFromElement(mozilla::dom::HTMLCanvasElement * aElement, unsigned int aSurfaceFlags, RefPtr<mozilla::gfx::DrawTarget> & aTarget) Line 7587 C++
xul.dll!nsLayoutUtils::SurfaceFromElement(mozilla::dom::Element * aElement, unsigned int aSurfaceFlags, RefPtr<mozilla::gfx::DrawTarget> & aTarget) Line 7680 C++
xul.dll!mozilla::dom::CanvasRenderingContext2D::DrawImage(const mozilla::dom::HTMLImageElementOrSVGImageElementOrHTMLCanvasElementOrHTMLVideoElementOrImageBitmap & aImage, double aSx, double aSy, double aSw, double aSh, double aDx, double aDy, double aDw, double aDh, unsigned char aOptional_argc, mozilla::ErrorResult & aError) Line 4417 C++
xul.dll!mozilla::dom::CanvasRenderingContext2D_Binding::drawImage(JSContext * cx, JS::Handle<JSObject *> obj, mozilla::dom::CanvasRenderingContext2D * self, const JSJitMethodCallArgs & args) Line 0 C++
xul.dll!mozilla::dom::binding_detail::GenericMethod<mozilla::dom::binding_detail::NormalThisPolicy,mozilla::dom::binding_detail::ThrowExceptions>(JSContext * cx, unsigned int argc, JS::Value * vp) Line 0 C++
[External Code]
xul.dll!js::jit::CallNativeGetter(JSContext * cx, JS::Handle<JSFunction *> callee, JS::Handle<JSObject *> obj, JS::MutableHandle<JS::Value> result) Line 1560 C++
[External Code]

OS: Unspecified → Windows 7
Hardware: Unspecified → Desktop
Blocks: 1547286

STR:

  1. open a big sheet (like our roadmap sheets)
  2. use the scroll wheel on your mouse to scroll up and down

reproduces pretty reliably for me.

Priority: -- → P3

Calling this disabled for 71 since it blocks 1547286.

Assignee: nobody → bobowencode
Status: NEW → ASSIGNED
Priority: P3 → P1

This is caused when other problems (hopefully now fixed) cause a timeout while trying to write to the ring buffer in a loop for surfaces.
This multiplies the timeout and causes the hang.
I have a patch to fail early if the stream has been marked as bad.

Attachment #9105253 - Attachment description: Bug 1585073: In Moz2D recording, check stream is good before waiting for space of data. r=jrmuizel! → Bug 1585073: In Moz2D recording, check stream is good before waiting for space or data. r=jrmuizel!
Attachment #9105253 - Attachment description: Bug 1585073: In Moz2D recording, check stream is good before waiting for space or data. r=jrmuizel! → Bug 1585073: In CanvasEventRingBuffer, check stream is good before waiting for space or data. r=jrmuizel!
Pushed by bobowencode@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/b79b68ee36fc
In CanvasEventRingBuffer, check stream is good before waiting for space or data. r=jrmuizel
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
You need to log in before you can comment on or make changes to this bug.