System freeze when going back and forth fullscreen mode with Firefox

Bug #1749779 reported by Hadrien
78
This bug affects 14 people
Affects Status Importance Assigned to Milestone
GNOME Shell
New
Unknown
Mozilla Firefox
Confirmed
Low
gnome-shell (Ubuntu)
Confirmed
High
Unassigned
mutter (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

https://gitlab.gnome.org/GNOME/gnome-shell/issues/71

---

Use Ubuntu 17.10
Open a Wayland session
Start Firefox
Press F11 repeatedly
--> The System freezes

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: gnome-shell 3.26.2-0ubuntu0.1
ProcVersionSignature: Ubuntu 4.13.0-32.35-generic 4.13.13
Uname: Linux 4.13.0-32-generic x86_64
ApportVersion: 2.20.7-0ubuntu3.7
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Thu Feb 15 20:09:27 2018
DisplayManager: gdm3
InstallationDate: Installed on 2017-10-02 (135 days ago)
InstallationMedia: Ubuntu 17.10 "Artful Aardvark" - Alpha amd64 (20170926)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
SourcePackage: gnome-shell
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
In , Hakon- (hakon-) wrote :

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021211
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021211

If you hold down the F11 key, there will be an continuous flicker when then gui
switches from normal view and fullscreen view, back and forth.

Reproducible: Always

Steps to Reproduce:
Hold down the F11 key.

Expected Results:
It should be so that once the first signal is acknowledged, no further
acknowledgement of this key would be done until it has first been released, and
then pressed again.

Now some might say it would be silly to cause this to happen, it's not like it
is an everyday problem. but I just think if someone has the time to change it,
it would be neat.

Revision history for this message
In , Torben-spamfence (torben-spamfence) wrote :

Confirming (build 2002121108, win95), Changing OS->All. I also think this is a
real bug, not an enhanchment, setting severity to minor.

Revision history for this message
In , Bugzillamozillaorg-serge-20140323 (bugzillamozillaorg-serge-20140323) wrote :

Filter "spam" on "guifeatures-nobody-20080610".

Revision history for this message
Hadrien (psydk) wrote :
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Please install 'openssh-server' and log into the system from another computer. Now reproduce the freeze and during the freeze, run this from your ssh login:

  apport-cli -u 1749779 --hanging -P `pidof -s gnome-shell`

With some luck that will give us the information we need to debug this.

Changed in gnome-shell (Ubuntu):
status: New → Incomplete
Revision history for this message
Hadrien (psydk) wrote :

Hello Daniel. Thank you for your suggestion. However, I get this error:

hadrien@c18:~$ apport-cli -u 1749779 --hanging -P `pidof -s gnome-shell`
Usage: apport-cli [options] [symptom|pid|package|program path|.apport/.crash file]

apport-cli: error: -u/--update-bug option cannot be used together with options for a new report

Revision history for this message
Hadrien (psydk) wrote :

These are the processes that take the most of CPU time when the freeze occurs:

  PID UTIL. PR NI VIRT RES SHR S %CPU %MEM TEMPS+ COM.
 1294 hadrien 20 0 4718668 345296 97152 R 67,4 2,1 1:37.87 gnome-shell
 2477 hadrien 20 0 2324412 423468 147072 R 18,6 2,6 0:32.11 firefox
 1322 hadrien 20 0 1528076 84308 69576 S 11,6 0,5 0:16.49 Xwayland
 2546 hadrien 20 0 2091172 203624 116160 R 11,6 1,2 0:19.49 Web Content
  221 root 20 0 0 0 0 S 10,3 0,0 0:01.79 kworker/u16:3

Revision history for this message
Hadrien (psydk) wrote :

I found the bug with my main computer which has an AMD gpu. I can reproduce the bug with the PC I'm using to connect with SSH. I just need to hold F11 down on Firefox. That PC has a nVidia gpu, so I guess the problem is gpu vendor independent.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Please try this instead then:

  apport-cli --hanging -P `pidof -s gnome-shell`

That should eventually create a new bug. If it does then please mention here what the new bug ID is.

Revision history for this message
Hadrien (psydk) wrote :

I ran the command and asked to save the report (creating a new bug requires a Web browser).

Revision history for this message
Hadrien (psydk) wrote :

Interestingly, doing the same with Sublime Text leads to the same result.

Revision history for this message
Hadrien (psydk) wrote :

I cannot reproduce the problem with gedit. Maybe the problem arises only with XWayland.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Yes you can copy the link out of ssh into your local machine's web browser to complete the bug creation. Please do that. Once you have that link it does not matter which machine you use the web browser on the to complete the process.

Unfortunately I cannot see the information we need in your attachment.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Sorry, I forgot to mention that you may need to apply the workaround for bug 994921 _first_.

Once you have done that you should find 'ubuntu-bug' and 'apport-cli' etc start reporting bugs correctly.

Revision history for this message
Hadrien (psydk) wrote :

I applied the workaround and ran again the command. It seems that nothing happens when I try to send the report:

hadrien@c18:~$ apport-cli --hanging -P `pidof -s gnome-shell`

*** Send problem report to the developers?

After the problem report has been sent, please fill out the form in the
automatically opened web browser.

What would you like to do? Your options are:
  S: Send report (170.3 KB)
  V: View report
  K: Keep report file for sending later or copying to somewhere else
  I: Cancel and ignore future crashes of this program version
  C: Cancel
Please choose (S/V/K/I/C): s
hadrien@c18:~$

I also tried "V" to view the report and I get the same kind of report I attached previously.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

OK, thanks. I don't know why that happens. It never fails like that for me but other people have reported the problem you describe.

Next we try an alternative approach:

1. kill -ABRT `pidof -s gnome-shell`
2. Look in /var/crash for a new crash file (may take a little while to be written)
3. ubuntu-bug /var/crash/YOURFILE.crash
4. Tell us the new bug ID created.
--
5. If #3-4 failed then set this bug to Private (top right of the page) and attach the crash file here.

Revision history for this message
Hadrien (psydk) wrote :

Because I did not want to leak any personal data in the crash files, I reinstalled an Ubuntu 17.10 on another hard drive to have a fresh generic installation and did the tests there before rebooting on my regular installation.

There are two crash files, one for gnome-shell, the other one for XWayland. I put them in a zip file and, as it seemed big to me, I uploaded the file on my web server:

http://mess.psydk.org/c18b_crash_firefox.zip

Other observations:
 - I tested the problem with a X11 session, and I can reproduce it.
 - I tested the problem on Ubuntu 16.04 and I could not reproduce it.
 - I've been looking at Firefox source code, it calls gtk_window_fullscreen(). I wrote a program to repeatedly call that function but I cannot make it freeze. There is some specific X11 code in Firefox though that I did not integrate in my test program.

Otherwise, are you able to reproduce the problem on your side? It seems quite easy to get. I will test other Ubuntu 17.10 installations tomorrow to get more statistics.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I've had a look at your crash files and unfortunately they do not contain stack traces we can read yet. Sometimes they do in plain text... Uploading the crash files with the 'ubuntu-bug' command should fix that, allowing robots to do proper retracing on them.

Asking other people to reproduce such problems is not a good idea, since there are too many similar gnome-shell crashes right now. Another person is just as likely to reproduce a different crash to yours which confuses the situation.

Next step: Please upload the crash files using the ubuntu-bug command only. We cannot proceed until that is done:
  ubuntu-bug _usr_bin_gnome-shell.1000.crash
  ubuntu-bug _usr_bin_Xwayland.1000.crash
When done, please tell us the new bug IDs.

P.S. Sharing crash files publicly on your own web server is considered insecure, because it is publicly readable by anyone. A more secure approach for sharing crash files (and only if 'ubuntu-bug' fails), is to set your bug report to "Private" and then attach them to the bug report. That way only a very small number of bug managers can see it, as well as yourself. Using the ubuntu-bug command also creates 'Private' bugs by default.

Revision history for this message
Hadrien (psydk) wrote :

When executing ubuntu-bug with the crash file, I do not get any bug ID.

A popup opens, with two buttons on the bottom: [Details] [Continue]
I click on [Continue] and I am back to my terminal, with the prompt. Nothing is written in my terminal and no Web browser opens.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Since you have applied the workaround from bug 994921 already, one of those approaches should work now.

Please try:
  apport-cli _usr_bin_gnome-shell.1000.crash
  apport-cli _usr_bin_Xwayland.1000.crash

Revision history for this message
Hadrien (psydk) wrote :
Revision history for this message
Hadrien (psydk) wrote :

I applied the procedure described there: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1751101/comments/7

I start Ubuntu 17.10
I start Firefox 58.0.2
I press F11 for more than 2 seconds
I wait for 35 minutes
I press on AltGr+PrintScreen+S just to be sure data is written on disk
I wait for several seconds
I reboot with AltGr+PrintScreen+B

There is nothing in /var/crash/

I feel a bit frustrated after all that time spent trying to obtain the data you need.

Daniel, you told it wasn't a good idea to ask you to reproduce the problem, but I still think this would be a good solution to get valuable data on your side. I understand this may expose a different bug, but with some chance, that other bug will be related to this one. At worst you could open another ticket with the data you collected and link the two tickets.

Maybe you don't have time, or won't be able to reproduce the problem, so I can also wait for Ubuntu 18.04 and try to reproduce it again. You told me there are many gnome-shell crashes at the moment, so maybe one of the fix that will ship with 18.04 will help with this bug.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Yes, sorry. I can confirm the bug exists in 18.04. It is trivial to reproduce, which is unusual :(

When the screen freezes multiple process start spinning:

  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
13113 dan 20 0 12.947g 7.897g 7.788g R 91.0 51.5 1:00.90 gnome-shell
13773 dan 20 0 2169752 277244 142700 S 46.2 1.7 0:17.66 firefox
13832 dan 20 0 2039840 165760 109716 S 28.6 1.0 0:10.49 Web Content
13132 dan 20 0 1241100 241772 220172 S 13.3 1.5 0:09.01 Xwayland

To un-freeze the system I just have to:
killall -9 firefox

This is a scary bug because it's also spinning consuming memory (see the above list).

I will get the upstream Gnome guys to look at this ASAP.

Changed in gnome-shell (Ubuntu):
status: Incomplete → Confirmed
importance: Undecided → High
Revision history for this message
Daniel van Vugt (vanvugt) wrote :
description: updated
tags: added: bionic
tags: added: disco
Changed in gnome-shell:
status: Unknown → New
Changed in firefox:
importance: Unknown → Low
status: Unknown → Confirmed
tags: removed: disco
tags: removed: artful
Revision history for this message
Hadrien (psydk) wrote :

No problem with Ubuntu 20.04 and Firefox 74

Revision history for this message
Tim Richardson (tim-richardson) wrote :

For me in 20.04, bug is definitely still present. I have earlyoom active, and 32 gb a few seconds of "freeze" (which is not really a freeze) earlyoom activates and nukes a few things, including Firefox, which brings back interactive response. It also killed Chrome and Remmina, which was irritating, but that's what earlyoom is there to do; better than minutes of no keyboard response.
Alt F2 seem to work after a few seconds too, which allows restart of the gnome shell.
I will comment on the upstream bug.

Changed in mutter (Ubuntu):
status: New → Confirmed
tags: added: focal
Revision history for this message
Danilo Alculete (alculete) wrote :

it also aftects me on ubuntu 20.04

Revision history for this message
J-Paul BERARD (arverne) wrote :

Same problem with Ubuntu 20.10 if I hold a little bit too much F11 with Firefox.
Ubuntu 20.10 AMD CPU Wayland
GPU RADEON 6850

tags: removed: bionic
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.