Closed Bug 1645698 Opened 4 years ago Closed 3 years ago

Firefox freezes and crashes when skipping in an instagram video.

Categories

(Core :: Audio/Video: Playback, defect)

77 Branch
x86_64
Linux
defect

Tracking

()

RESOLVED INVALID
Tracking Status
firefox77 --- affected
firefox78 --- affected
firefox79 --- affected

People

(Reporter: smurfendrek123, Unassigned)

References

Details

Crash Data

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0

Steps to reproduce:

  1. Go to https://www.instagram.com/tv/CBVo2bJn-wZ/?utm_source=ig_embed&utm_campaign=loading
  2. Skip to the middle of the video
  3. Observe firefox freezing

Actual results:

Firefox and my entire system freezes

When I skip around in an instagram video, firefox, and my entire system hangs, after that firefox either crashes, and my system becomes responsive again, or it stays frozen and i have to power cycle my laptop. Sometimes the audio keeps playing but other times it starts looping a short part of the audio.
Playing the video normally without skipping works as expected.

This was tested on an xps 13 with a Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz
And also on a toshiba sattelite c55-c-13w with a i3-4005u. Both machines are running fedora 32. I haven't changed any I tried this both with the facebook container extension, and without it in a private window.

As far as i can remember i haven't changed anything in about:config, there are a fair amount of non default settings though, but i think those are just set by fedora itself.

Expected results:

I expect firefox and my entire system to not freeze. Also if firefox freezes, it shouldn't freeze my entire system.

Dmesg shows nothing, but this is related journal -b output from the crash:

Jun 16 15:45:21 localhost.localdomain systemd[2264]: vte-spawn-272fd4c9-c851-40cf-8f5b-e0b031c76121.scope: Succeeded.
Jun 16 15:45:21 localhost.localdomain systemd[2264]: Starting Tracker metadata database store and lookup manager...
Jun 16 15:45:21 localhost.localdomain systemd[2264]: Started Tracker metadata database store and lookup manager.
Jun 16 15:45:23 localhost.localdomain systemd[2264]: vte-spawn-20b14f1a-9e97-486a-8a45-fad3f7a52a97.scope: Succeeded.
Jun 16 15:45:43 localhost.localdomain rtkit-daemon[1442]: Supervising 4 threads of 2 processes of 1 users.
Jun 16 15:45:43 localhost.localdomain rtkit-daemon[1442]: Supervising 4 threads of 2 processes of 1 users.
Jun 16 15:45:43 localhost.localdomain rtkit-daemon[1442]: Supervising 4 threads of 2 processes of 1 users.
Jun 16 15:45:43 localhost.localdomain rtkit-daemon[1442]: Supervising 4 threads of 2 processes of 1 users.
Jun 16 15:45:43 localhost.localdomain rtkit-daemon[1442]: Successfully made thread 49389 of process 48914 (/usr/lib64/firefox/firefox) owned by '1000' RT at priority 10.
Jun 16 15:45:43 localhost.localdomain rtkit-daemon[1442]: Supervising 5 threads of 3 processes of 1 users.
Jun 16 15:45:54 localhost.localdomain firefox[48841]: Error flushing display: Resource temporarily unavailable
Jun 16 15:45:54 localhost.localdomain firefox.desktop[49108]: Exiting due to channel error.
Jun 16 15:45:54 localhost.localdomain firefox.desktop[49046]: Exiting due to channel error.
Jun 16 15:45:54 localhost.localdomain firefox.desktop[48914]: Exiting due to channel error.
Jun 16 15:45:54 localhost.localdomain firefox.desktop[49183]: Exiting due to channel error.
Jun 16 15:45:54 localhost.localdomain firefox.desktop[49007]: Exiting due to channel error.
Jun 16 15:45:54 localhost.localdomain systemd[2264]: gnome-launched-firefox.desktop-48841.scope: Succeeded.

I tried in safe mode, and the same thing happens there. As i said it also happens in a private window.

I forgot to say, but the video already has to be playing when you try it out. So press play -> skip -> observe crash

I did also test without any extensions enabled, and it still freezes.

This also happens with the mozilla provided binaries, both in wayland and x11 mode.

I did however notice, that sometimes, it doesn't immediately freeze, but it rapidly flashes between playing and pausing (5-10 times/second) and then freezes.

Sometimes, firefox does manage to recover and gives me the option to report this tab crash. I've done so, and linked this bug report in the description of that report. I hope that helps. I don't know what causes it to recover to a crash tab, vs crashing firefox entirely.

Component: Untriaged → Graphics: Layers
Product: Firefox → Core

I managed to profile the crashing/freezing by quickly exiting out of the tab while it's rapidly switching between playing/pausing. https://share.firefox.dev/3hCmGU3

That includes a period before playing, clicking play, skipping, then closing the tab, and then clicking on capture in the profiler.

Also, one time i managed to get a crash report from the tab, but i'm not entirely sure if that's what actually causing the issue, or just a result of the freezing, or even me trying to exit firefox: https://crash-stats.mozilla.org/report/index/217cbcc0-7bcf-462a-8af1-5f1fe0200617 The crash report linked above by Asif, is also mine, and also related.

Another trace: https://share.firefox.dev/3fLjcwX

I mentioned this when talking with Asif, but when it freezes, i can still ssh into the frozen laptop and see performance characteristics. I still have enough memory left during a freeze, but "web content" is using 90-100%cpu, and gnome-shell 70% (on a 2C4T machine)

Blocks: 1645591
Crash Signature: [@ __memmove_avx_unaligned_erms | mozilla::layers::MappedYCbCrChannelData::CopyInto ]
Keywords: crash
OS: Unspecified → Linux
Hardware: Unspecified → x86_64

I also saw systemd-coredump making a (i think related) coredump during a crash, i can provide this coredump, but i assume some confidential information might be contained in a coredump, so i'd prefer to send it to a firefox employee trough another channel if that's possible. The coredump seems to have been made where only the tab crashed, instead of forcing me to restart the pc entirely.

I cannot reproduce on Windows with hardware acceleration disabled, so this appears to be Linux-only. It does however totally freeze my computer every time on Linux.

Running mozregression is hard because if it reproduces I need to reboot the computer! But it definitely reproduces as far back as 2019-01-01. When I tried 2018-01-01, the video wouldn't play it all, so I couldn't check whether it was affected. Safe to say it's a long-standing issue though.

As Jan noted, it has the same crash signature as bug 1645591 so they are probably the same underlying cause. Sotaro, do you have any ideas what the problem could be?

Severity: -- → S2
Flags: needinfo?(sotaro.ikeda.g)
Flags: needinfo?(jbonisteel)

Gnome Wayland, Debian Testing, Macbook Pro
Omg, I can reproduce this even with the Wayland backend (MOZ_WAYLAND=1), but apparently only if I use software decoding (default).
My desktop froze while audio kept playing. I was not able to close Firefox by keyboard shortcut, so I had to press the power button.

Status: UNCONFIRMED → NEW
Has STR: --- → yes
Ever confirmed: true
Keywords: hang
Assignee: nobody → sotaro.ikeda.g
See Also: → 1636711

I confirmed that the freeze happen on Ubuntu 18.04. And the freeze happened even with Attachment 9158107 [details] [diff]. It disables video frame data handling within gfx. From it, it seems that gfx is not related to the freeze. I wonder if software decoder might be related to the freeze.

Flags: needinfo?(sotaro.ikeda.g)
Assignee: sotaro.ikeda.g → nobody

:jya, can you comment to comment 11?

Flags: needinfo?(jyavenard)

Please provide a copy of about:support ; did you enable wayland and HW decoding on linux?

Flags: needinfo?(jyavenard) → needinfo?(smurfendrek123)
Attached file copy of about:support

I put my about:support in an attachment, but as i said, it happens both in x-11 and wayland.

As far as hw decode settings go, those were left on default, meaning:

dom.maxHardwareConcurrency 16
media.hardware-video-decoding.enabled true
media.hardware-video-decoding.force-enabled false
media.hardwaremediakeys.enabled false

Flags: needinfo?(smurfendrek123)

Change component by Comment 11.

Component: Graphics: Layers → Audio/Video: Playback

I can reproduce it without crash under MATE, there's a profile: https://share.firefox.dev/31pUtdr

When the scenario happens, the video can't be stopped, it keeps starting/pausing in a loop. It's reproducible on latest nightly.

Also it happens with SW decoding/rendering under X11, i.e. default safe setup and clean profile.

It looks like an issue with a JS script at instagram which keeps to start/stop the video. I can't reproduce it with noscript addon. Also the profile shows JS scripts from instagram running.

Removing crash/hang as it does not crash. It only maximizes resources used by Firefox, when the page is blocked (by noscript, tab closed), Firefox behaves normally. The crash is a bug in underlying WM, for instance MATE does not crash.

No longer blocks: 1645591
Keywords: crash, hang
Flags: needinfo?(jbonisteel)

Cannot reproduce anymore, according to latest comments in https://gitlab.gnome.org/GNOME/mutter/-/issues/938 this might be obsolete

I can still reproduce this, GNOME Shell 3.38.1 and Mozilla Firefox 82.0.3 (I'm on a fully up to date f33 laptop).

I'd post another crash report, but i can't open about:crashes anymore due to a firefox bug i filed on fedora's bugtracker: https://bugzilla.redhat.com/show_bug.cgi?id=1897322

A gnome developer has done some in depth research into this bug. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3405#note_964698

So it seems that Instagram has a buggy video player, which floods firefox with MPRIS messages, which then freezes gnome shell.

So this is not a bug in firefox. I also just tried to reproduce in Google chrome, and the bug happens there in exactly the same manner as well.

A nice improvement might be that firefox would be able to gracefully handle whatever these websites throw at them? For example by throtteling these events? But I agree that this isn't really something that should be fixed on firefox's side.

Feel free to close :)

Hi,
Based on comment 23, I will close this issue as resolved - invalid since its not a firefox issue.
Thanks for the updates!

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: