Closed Bug 1871523 Opened 10 months ago Closed 9 months ago

iloop printing "Attempt to render into a Canvas2d after shutdown" after a Canvas IPC timeout can lead to continuous generation of gfx-log on the mainthread (STR on Comment #4)

Categories

(Core :: Graphics: Canvas2D, defect)

defect

Tracking

()

RESOLVED FIXED
123 Branch
Tracking Status
firefox123 --- fixed

People

(Reporter: mayankleoboy1, Assigned: lsalzman)

References

()

Details

Attachments

(3 files)

Dont have exact STR, but it involves running D2d-canvas applications, manualling "terminate GPU process" and tearing out tabs.

Reproduced this on two occassions on two different websites (codepen, fxhash.xyz)

Profile: https://share.firefox.dev/3RS9DBW (Look at the parent process and the content process)

bug 1871842 has some STR that may be relavent.
I used mozregression GUI tool and reprod the STR from bug 1871842. When the browser flashed white, mozregression console was filled with continuous messages of

(#1118) CP+[GFX1]: Attempt to render into a Canvas2d after shutdown.

See Also: → 1871842
Summary: The browser can get into a state where content-process and main-thread are spending 26 seconds generating gfx-log → The browser can get into a state where content-process and main-thread are spending 26 seconds generating gfx-log (iloop printing Attempt to render into a Canvas2d after shutdown)

After I did STR from , this is the gfx-log. Notice the number is in 7000 range!

(#0) Error Killing GPU process due to IPC reply timeout
(#7575) CP+[GFX1]: Attempt to render into a Canvas2d after shutdown.
(#7576) CP+[GFX1]: Attempt to render into a Canvas2d after shutdown.
(#7577) CP+[GFX1]: Attempt to render into a Canvas2d after shutdown.
(#7578) CP+[GFX1]: Attempt to render into a Canvas2d after shutdown.
(#7579) CP+[GFX1]: Attempt to render into a Canvas2d after shutdown.
(#7580) CP+[GFX1]: Attempt to render into a Canvas2d after shutdown.
(#7581) CP+[GFX1]: Attempt to render into a Canvas2d after shutdown.
(#7582) CP+[GFX1]: Attempt to render into a Canvas2d after shutdown.
(#7583) CP+[GFX1]: Attempt to render into a Canvas2d after shutdown.
(#7584) CP+[GFX1]: Attempt to render into a Canvas2d after shutdown.
(#7585) CP+[GFX1]: Attempt to render into a Canvas2d after shutdown.
(#7586) CP+[GFX1]: Attempt to render into a Canvas2d after shutdown.
(#7587) CP+[GFX1]: Attempt to render into a Canvas2d after shutdown.
(#7588) CP+[GFX1]: Attempt to render into a Canvas2d after shutdown.
(#7589) CP+[GFX1]: Attempt to render into a Canvas2d after shutdown.

See Also: 18718421871841

This might just be a symptom of bug 1871841. The patch there will probably fix this too. Not entirely sure.

STR:
1.Go to https://js1k.com/2013-spring/demo/1390
2.Let the demo run for 10-15 seconds. (It will slow down pretty quickly)
3. Once the demo slows down, try right clicking on the tab-bar, or right clicking on the demo, or clicking on some othe UI element. Once you Right-click, maybe wait for a few seconds then right-click again.
3. The demo will flash white and nothing will draw on the demo. DO NOT CLOSE THE DEMO TAB from this point onwards.

Wait with the demo tab in the foreground for 15-20 seconds
Now open about:support and check the gfx-logs. You should see 100k+ messages.
If you now run the profiler, the parent process will be busy in gfx-log-uy things.

https://share.firefox.dev/3TOb7OW

(#0) Error Killing GPU process due to IPC reply timeout
(#1074026) CP+[GFX1]: Attempt to render into a Canvas2d after shutdown.
(#1074027) CP+[GFX1]: Attempt to render into a Canvas2d after shutdown.
(#1074028) CP+[GFX1]: Attempt to render into a Canvas2d after shutdown.
(#1074029) CP+[GFX1]: Attempt to render into a Canvas2d after shutdown.
(#1074030) CP+[GFX1]: Attempt to render into a Canvas2d after shutdown.
(#1074031) CP+[GFX1]: Attempt to render into a Canvas2d after shutdown.
(#1074032) CP+[GFX1]: Attempt to render into a Canvas2d after shutdown.
(#1074033) CP+[GFX1]: Attempt to render into a Canvas2d after shutdown.
(#1074034) CP+[GFX1]: Attempt to render into a Canvas2d after shutdown.
(#1074035) CP+[GFX1]: Attempt to render into a Canvas2d after shutdown.
(#1074036) CP+[GFX1]: Attempt to render into a Canvas2d after shutdown.
(#1074037) CP+[GFX1]: Attempt to render into a Canvas2d after shutdown.
(#1074038) CP+[GFX1]: Attempt to render into a Canvas2d after shutdown.
(#1074039) CP+[GFX1]: Attempt to render into a Canvas2d after shutdown.
(#1074040) CP+[GFX1]: Attempt to render into a Canvas2d after shutdown.

Summary: The browser can get into a state where content-process and main-thread are spending 26 seconds generating gfx-log (iloop printing Attempt to render into a Canvas2d after shutdown) → iloop printing "Attempt to render into a Canvas2d after shutdown" after a Canvas IPC timeout can lead to continuous generation of gfx-log on the mainthread (STR on Comment #4)
Attached file about:support

Here is a log. FWIW, enabling logging makes this issue harder to repro.

EnsureTarget() is called in many places in the code without checking the result, so
in error cases, like processing path builder commands, it can lead to EnsureTarget()
generating an error to the log on every single invocation, with some users noticing
thousands upon thousands of errors being generated.

One notice of this error should be sufficient, given that this is a shutdown error.

Assignee: nobody → lsalzman
Status: NEW → ASSIGNED
Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8ad5da3a894f Only error once when rendering into a canvas after shutdown. r=gfx-reviewers,ahale
Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 123 Branch

This is fixed. Thanks.

I now get this :
(#0) Error Killing GPU process due to IPC reply timeout
(#24) Error CompositorBridgeChild receives IPC close with reason=AbnormalShutdown
(#25) Error CompositorBridgeChild receives IPC close with reason=AbnormalShutdown
(#26) Error CompositorBridgeChild receives IPC close with reason=AbnormalShutdown
(#27) Error CompositorBridgeChild receives IPC close with reason=AbnormalShutdown
(#28) CP+[GFX1-]: CompositorBridgeChild receives IPC close with reason=AbnormalShutdown
(#29) CP+[GFX1-]: CompositorBridgeChild receives IPC close with reason=AbnormalShutdown
(#30) CP+[GFX1-]: CompositorBridgeChild receives IPC close with reason=AbnormalShutdown
(#31) CP+[GFX1-]: CompositorBridgeChild receives IPC close with reason=AbnormalShutdown
(#32) CP+[GFX1-]: CompositorBridgeChild receives IPC close with reason=AbnormalShutdown
(#33) CP+[GFX1-]: CompositorBridgeChild receives IPC close with reason=AbnormalShutdown
(#34) CP+[GFX1-]: CompositorBridgeChild receives IPC close with reason=AbnormalShutdown
(#35) CP+[GFX1]: Attempt to render into a Canvas2d after shutdown.
(#36) CP+[GFX1-]: IPC Channel is already torn down unexpectedly
(#37) CP+[GFX1-]: IPC Channel is already torn down unexpectedly
(#38) CP+[GFX1-]: IPC Channel is already torn down unexpectedly
(#39) Assert Attempt to render into a Canvas2d after shutdown.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: