Bug 1432699
| Summary: | gnome-shell freezes when running dnf updates | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Devin Henderson <devin> | ||||||||||
| Component: | mutter | Assignee: | Owen Taylor <otaylor> | ||||||||||
| Status: | CLOSED WORKSFORME | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||||
| Severity: | urgent | Docs Contact: | |||||||||||
| Priority: | unspecified | ||||||||||||
| Version: | 25 | CC: | accounts+fedora, alex-redhatbugzilla, associations, axel.sommerfeldt, c.schwarzgruber.cs, dawid.zych, deron.meranda, fmuellner, greg, kroupa.matyas, otaylor, peter.verthez, rob.aston, ttomst, walters, work.eric | ||||||||||
| Target Milestone: | --- | ||||||||||||
| Target Release: | --- | ||||||||||||
| Hardware: | x86_64 | ||||||||||||
| OS: | Unspecified | ||||||||||||
| Whiteboard: | |||||||||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||||||||
| Doc Text: | Story Points: | --- | |||||||||||
| Clone Of: | Environment: | ||||||||||||
| Last Closed: | 2017-06-27 23:35:02 UTC | Type: | Bug | ||||||||||
| Regression: | --- | Mount Type: | --- | ||||||||||
| Documentation: | --- | CRM: | |||||||||||
| Verified Versions: | Category: | --- | |||||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||||
| Embargoed: | |||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Devin Henderson
2017-03-16 00:17:45 UTC
The fpaste link isn't working. Bugzilla is cutting off the last character. This one should work: https://paste.fedoraproject.org/paste/GqaW4kE4EAjvGKMdijnMol5M1UNdIGYhyRLivL9gydE=/raw I already commented on another bug of gnome-shell (#1419498) where you commented on and linked to this bug, and I can confirm this behaviour here as well. However, I am not using the nVidia proprietary drivers with my nVidia graphics card. I am using the current version of Wayland. As I mentioned in bug #1419498 for me the freeze sometimes coincides with segfault messages about gnome-software like this one: Mar 13 18:24:55 blackdev systemd-coredump[10743]: Process 10493 (gnome-software) of user 1000 dumped core. Mar 13 18:24:55 blackdev systemd-coredump[10743]: Core Dumping has been disabled for process 10493 (gnome-software). Mar 13 18:24:55 blackdev kernel: gnome-software[10493]: segfault at 7f5150079738 ip 00007f527b0d1016 sp 00007fffd5008e30 error 4 in libc-2.24.so[7f527b050000+1bd000] However, when the freeze happened today there were no such messages, and no messages at all that were out of the ordinary. So I'm not sure if the segfaulting is even related. I should also mention that I've gotten this freeze under 2 different conditions-- while running dnf updates or while launch the gnome-software app. Not while installing updates in gnome-software, but just when launching it. However, it doesn't always happen when I do this. Sometimes `dnf update` finishes without gnome freezing and sometimes gnome-software launches without causing the freeze. It has happened for me too in ~last two days: Once, updating using gnome-terminal, And today updating using a different tty. I can't confirm nor deny this behaviour when using gnome-software. I'm using Negativo17 Nvidia proprietary driver, kernel version: 4.9.13-201.fc25.x86_64 My fpase --sysinfo: https://da.gd/M9I5y I'm also having this issue. Gnome-shell freezes after `dnf upgrade`. Launching gnome-software does not make shell freeze on my system. Here's my fpaste --sysinfo https://paste.fedoraproject.org/paste/yXkaDOipBbIVjKPG~iJ6V15M1UNdIGYhyRLivL9gydE= My experience is the exact same as Toms in comment #5. I've had it freeze both on screen and using a tty. I'm also using the negativo17 nvidia driver. I've had the problem occur maybe 5 or 6 times in the past week. Today my system didn't freeze after upgrade for the first time in about two weeks! I think that yesterday's dnf update may have fixed that. Neither my system froze during the last update (I think it was one or two days ago, when it did not freeze for the first time, and yesterday's update of sole egl-wayland package did not freeze anything either). It happened to me again today. It has been intermittent for me from the beginning, happening roughly every other time I run dnf updates. Its been a couple days since it happened but it happened again today when I updated VirtualBox to 5.1.18 via dnf update http://download.virtualbox.org/virtualbox/5.1.18/VirtualBox-5.1-5.1.18_114002_fedora25-1.x86_64.rpm BTW, here is the reddit thread about this: https://redd.it/5zlc1x There are some logs linked on that page. If there are specific logs that I can provide please let me know. I've looked in journalctl several times when the freeze happens and aside from the segfault mentioned above I've never seen anything that to me looked related. So this is really interesting-- just now when I ran `dnf distro-sync` like I always do, while installing packages the system froze for about 1 second and it looked like the gnome freeze was happening again but this time it recovered after a second or two and in journalctl I notice that gdm seems to have restarted itself? Here are the logs: https://paste.fedoraproject.org/paste/~0fR6q2NrdQueNTP0LWcp15M1UNdIGYhyRLivL9gydE=/raw I had gnome-shell freeze and jump to 100% cpu usage as usual when the bug is triggered, but it actually happened when I wasn't doing any updates, just browsing the web and doing some programming. I'm assuming PackageKit or some other package manger related service kicked off in the background? As others have reported it usually happens for me when I'm running dnf, just this one time though it happened when I wasn't running dnf. Today I had a full system freeze again just after 'dnf update' was completed in tty3. But this time everything froze completely, I could not change tty's, the cursor looked frozen, it did not accept my inputs and I did a hard reset. The system seemed unresponsive, although I don't know, maybe it would have recovered if I would have waited a little longer as mentioned by Devin (Comment 11). Here's my log file: https://paste.fedoraproject.org/paste/~zbWZbEp5KhVvyJIxCzvIF5M1UNdIGYhyRLivL9gydE= Looking at the logs people have posted nothing ever seems to stand out. I tried to attach gdb to gnome-shell and see what it was doing but it's in some javascript function (the interpreter). Does anyone know how to debug the javascript code in gnome-shell? Obviously you can't use looking glass since it's dead basically. I'm running into the same issue as well. It sometimes happens when using gnome-software or running "dnf update". My logs: https://da.gd/1tKB "journalctl _COMM=gnome-shell --since today": https://da.gd/ShXpo I'm also affected on both my computers, including one laptop. On the laptop, i have a NVidia Graphic card that i don't use (nouveau disabled). They both use Intel Graphics Integrated. It does not only happen when running upgrade for me, but also for installation and removals. I noticed the same behavior when launching GNOME Software from the notification area, clicking on a notification telling me that i need more codecs. I don't notice any specific error excluding extensions in the logs. I also had gnome-shell hang with 100% CPU immediately after running a dnf update; the system was otherwise idle. It could have possibly hung during the update, but I didn't attempt any interaction until after the dnf update command appeared to complete in the shell output. I was doing a dnf update of the evolution package only, so no gnome, X, kernel, etc packages should have been involved. Killing the gnome-shell process in a console (via ssh) lets systemd restart it and then the session continued normally without any apparent side-effect, other than minimized windows become un-minimized. I'm running under X, not Wayland, and also am using the standard Fedora driver for AMD Radeon (not NVidia nor proprietary). More people with the same problem: https://redd.it/61z5jn It definitely seems repeatable: gnome-shell hanged again using 100% cpu while in the middle of doing a "dnf update" on the LibreOffice packages. This was after the packages were downloaded and it was in the middle of applying the update transaction (Upgrading step). Although the text output of dnf abruptly stopped, the dnf command itself did complete and gnome-shell was still in a hung state. Killing the gnome-shell process restores everything to full operation; as the parent process (gnome-session-binary) relaunches a new gnome-shell. I did see the following messages in journalctl at roughly the same time, though I don't know if they are applicable or not, as process 2413 (gnome-software) was not the one that hanged. Mar 31 01:39:30 HOSTNAME gnome-software-service.desktop[2413]: 05:39:30:0794 As failed to rescan: No valid root node specified Mar 31 01:39:30 HOSTNAME gnome-software-service.desktop[2413]: 05:39:30:0794 As failed to rescan: Failed to parse /usr/share/applications/libreoffice-impress.desktop file: cannot process file of type application/x-desktop Mar 31 01:39:31 HOSTNAME gnome-software-service.desktop[2413]: 05:39:31:0432 As failed to rescan: No valid root node specified Mar 31 01:39:31 HOSTNAME gnome-software-service.desktop[2413]: 05:39:31:0434 As failed to rescan: Failed to parse /usr/share/applications/libreoffice-writer.desktop file: cannot process file of type application/x-desktop Mar 31 01:39:31 HOSTNAME gnome-software-service.desktop[2413]: 05:39:31:0676 As failed to rescan: No valid root node specified Mar 31 01:39:31 HOSTNAME gnome-software-service.desktop[2413]: 05:39:31:0678 As failed to rescan: Failed to parse /usr/share/applications/libreoffice-draw.desktop file: cannot process file of type application/x-desktop Mar 31 01:39:32 HOSTNAME gnome-software-service.desktop[2413]: 05:39:32:0973 As failed to rescan: No valid root node specified Mar 31 01:39:32 HOSTNAME gnome-software-service.desktop[2413]: 05:39:32:0974 As failed to rescan: Failed to parse /usr/share/applications/libreoffice-calc.desktop file: cannot process file of type application/x-desktop Mar 31 01:39:33 HOSTNAME gnome-software-service.desktop[2413]: 05:39:33:0183 As failed to rescan: Failed to parse /usr/share/applications/libreoffice-math.desktop file: cannot process file of type application/x-desktop Mar 31 01:39:33 HOSTNAME gnome-software-service.desktop[2413]: 05:39:33:0345 As failed to rescan: Failed to parse /usr/share/applications/libreoffice-xsltfilter.desktop file: cannot process file of type application/x-desktop I just got it to hang again. This time I ran the "dnf update" from a remote ssh login; so the dnf command process was not part of the same user login session. The graphical session was completely idle. Again, at the moment gnome-session hung the following similar logs appeared in the journalctl output: Mar 31 02:15:14 HOSTNAME gnome-software-service.desktop[2413]: 06:15:14:0261 As failed to rescan: No valid root node specified Mar 31 02:15:14 HOSTNAME gnome-software-service.desktop[2413]: 06:15:14:0262 As failed to rescan: Failed to parse /usr/share/applications/firefox.desktop file: cannot process file of type application/x-desktop After source code diving I think the journalctl warnings I reported above that were coming from gnome-software process about failing to rescan are probably unrelated to this hang problem. So this gnome-shell hanging problem is still a mystery. FYI the gnome-software process, specifically it's flatpak plugin, maintains an inotify(7) watch on the directory /usr/share/applications, among others. When the directory contents change, as a "dnf upgrade" of any GUI application will likely do, then gnome-software will attempt to refresh all the application metadata. This would include things like icons, application titles, etc. That rescanning process basically looks for XML files in the AppStream format and processes those using the libappstream-glib package's API. However not all files in that directory are XML, many are in an X-Desktop format rather than AppStream. And those warning messages that get logged are just noisy complaints about files that libappstream-glib doesn't understand. See also bug https://bugzilla.redhat.com/show_bug.cgi?id=1329999 Created attachment 1268038 [details]
gdb stacktrace of gnome-shell process after hang from running dnf update
The gdb output is annotated at various times with lines starting with "###" to indicate the state of the system at that point in time.
I captured a stack trace of the gnome-shell process in a "hung" state (using 100% cpu) and attached it. This hang was triggered by a "dnf update gnome-documents gnome-documents-libs". I don't know for sure, but it seems circumstantially that dnf only causes a hang if it is updating a graphical program. For example doing "dnf update tzdata" or other non-graphical components complete as expected without causing gnome-shell to hang. FYI, I've lost the ability to reproduce this bug after rebooting; though I could reproduce it easily at will prior to that. I wonder if some sequence of recent updates had a weird interaction if you remained logged in during the update process? So this might not actually be caused by dnf or gnome-software. I can recreate the issue at will by running:
sudo touch --no-create /usr/share/icons/hicolor
(which, of course, is in the post-install and post-uninstall scriptlets for many packages)
Any ideas why this might be causing gnome-shell to hang?
Created attachment 1268271 [details]
Stacktrace during hang (1)
Created attachment 1268272 [details]
Stacktrace during hang (2)
I installed all the debuginfo packages for gnome-shell and made it hang twice. The stacktraces from gdb are attached to this bug report. Created attachment 1268284 [details]
Patch to fix typo causing infinite loop
I believe I have found out the cause of the issue. In update_style_contexts() in mutter, there's a typo in a while loop that causes an infinite loop if the theme has multiple variants. It tries to loop through a linked list, but never moves beyond the first item. After fixing this, I'm not running into the issue anymore. I've attached the patch to this bug report. A copr for testing has also been published here: https://copr.fedorainfracloud.org/coprs/chenxiaolong/rhbz1432699-fix/ I too am running into this problem. Gnome-shell goes to 100% during the cleanup phase while dnf is updating one or more packages. By using ssh to login into the machine from another, I can restart the window manager bu typing in "kill -1 <gnome-shell PID>". I see that the latest SRPM for mutter in Fedora 26 Alpha, "mutter-3.24.0" still has the error Andrew Gunnerson pointed out on 2017-04-02 at 17:40. I just checked the source code at "github.com/GNOME/mutter". I see the loop variable in "src/ui/frames.c" has been corrected. Hopefully this fix will get into fc25 and fc26 soon. PLEASE!!! I changed this bug report to be against mutter. Hopefully the right people will see this now. Andrew Gunnerson, thank you SO much for working on this and finding a fix!! Lots of people will be very, very happy to have this resolved. I will tryout your copr repo as soon as I have some time and verify that it solves this for me which I'm sure it will. Thanks again!! There is currently a new version of the mutter package in updates-testing. Version 3.22.4-1.fc25: https://bodhi.fedoraproject.org/updates/FEDORA-2017-9012909495 There is no mention of it containing a fix for this bug. Does anyone know if it does? So I looked in mutter-3.22.4-1.fc25 and sure enough the patch (variants->next changed to variant->next) seems to be there! So this update should fix the problem. It would probably be best if we all grab this latest package, test it, and submit positive karma if it does work so that it will hit the stable repo asap. You should be able to update to this version by running: sudo dnf update mutter --enablerepo=updates-testing --ref Submit karma here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-9012909495 I believe this has been fixed for quite a while and can be closed. The beta patch mentioned in comment 36 fixed the issue for me, and since the subsequent official release of mutter-3.22.4-1.fc25 or later I have never seen this bug reappear. I haven't seen the issue since the aforementioned mutter update either. I'll go ahead and close this. Thanks everyone! |