After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 704646 - gnome-shell becomes unresponsive from time to time
gnome-shell becomes unresponsive from time to time
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
3.8.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 705559 705757 706023 706026 706030 706133 706169 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-07-21 19:39 UTC by Pacho Ramos
Modified: 2013-08-20 19:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
backtrace (5.86 KB, text/plain)
2013-07-23 20:07 UTC, Pacho Ramos
  Details
gdb.txt (12.94 KB, text/plain)
2013-07-24 06:03 UTC, Pacho Ramos
  Details
gdb.txt (11.71 KB, text/plain)
2013-07-24 18:40 UTC, Pacho Ramos
  Details
Revert "background: fix asynchronous management of background loading operations" (6.75 KB, patch)
2013-08-16 12:53 UTC, drago01
committed Details | Review

Description Pacho Ramos 2013-07-21 19:39:35 UTC
I often see gnome-shell becoming unresponsive. I can "unhang" it running "killall -HUP gnome-shell" in a console, but would like to know how to try to get more useful information. I have reviewed journalctl output but don't see anything related :(

Thanks

I am running gnome-shell-3.8.3 (plus all committed patches from gnome 3.8 branch)
Comment 1 drago01 2013-07-22 09:33:42 UTC
Attach gdb after the hang and get a backtrace please. (Also "killall gnome-shell" would have done the same no need for -HUP).
Comment 2 Pacho Ramos 2013-07-22 20:23:38 UTC
I have abrt running and it catches all traces but this one, that is because I am really unsure about what is the status of gnome-shell when it goes to this "paused" problem :(
Comment 3 drago01 2013-07-22 21:26:55 UTC
It is not a crash so abrt won't help you here. You have to attach gdb by hand:

https://live.gnome.org/GnomeShell/Debugging
Comment 4 Pacho Ramos 2013-07-23 20:07:27 UTC
I have had multiple problems when trying to get the trace:
"Immediately press CTRL-A, release, SHIFT-H. Screen will confirm that it is now recording the session to screenlog.0 or hardcopy.0, depending on your distribution. Make a note of the file name."

I have pressed SHIFT-H and nothing occurred, even running under screen :/

"Attach to an existing instance:
$ gdb attach $(pidof gnome-shell)"

Should I attach it to just hung process? In that case, gdb tells me "attach" doesn't exist, I need to run:
$ gdb gnome-shell $(pidof gnome-shell)

What does I need now to do? Restart gnome-shell with --replace from here? I tried by it continued hung and needed to press Ctrl+C from gdb shell, I then was able to get a trace:
$ set logging on
$ t a a bt
$ call gjs_dumpstack ()
$ set logging off
Comment 5 Pacho Ramos 2013-07-23 20:07:47 UTC
Created attachment 249938 [details]
backtrace
Comment 6 Pacho Ramos 2013-07-24 06:03:00 UTC
Created attachment 249999 [details]
gdb.txt

This one has been generated as follows:
1. gnome-shell gets unresponsive
2. I go to tty and run "gdb gnome-shell $(pidof gnome-shell)"
set logging on
bt
set logging off
Comment 7 drago01 2013-07-24 06:26:23 UTC
Can you do "call gjs_dumpstack()" in gdb as well and get the stderr output?
Comment 8 Pacho Ramos 2013-07-24 06:38:09 UTC
(In reply to comment #7)
> Can you do "call gjs_dumpstack()" in gdb as well and get the stderr output?

Will try next time, how can I get the stderr output?  If it's logged by journalctl (the old .xsession-errors stuff), nothing new is appended there when hanging)
Comment 9 drago01 2013-07-24 06:39:27 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > Can you do "call gjs_dumpstack()" in gdb as well and get the stderr output?
> 
> Will try next time, how can I get the stderr output?  If it's logged by
> journalctl (the old .xsession-errors stuff), nothing new is appended there when
> hanging)

It will print something out when you call gjs_dumpstack()
Comment 10 Pacho Ramos 2013-07-24 18:40:18 UTC
(In reply to comment #7)
> Can you do "call gjs_dumpstack()" in gdb as well and get the stderr output?

I have just run it but outputs nothing
Comment 11 Pacho Ramos 2013-07-24 18:40:36 UTC
Created attachment 250061 [details]
gdb.txt

Updated trace
Comment 12 drago01 2013-07-24 18:44:50 UTC
(In reply to comment #10)
> (In reply to comment #7)
> > Can you do "call gjs_dumpstack()" in gdb as well and get the stderr output?
> 
> I have just run it but outputs nothing

The output goes to stderr not to the gdb console.

You can try doing

call open("/dev/tty", 2) 
call dup2($x, 2)
call gjs_dumpstack()

(where x is the result you get from the first line).
Comment 13 Pacho Ramos 2013-07-24 21:02:51 UTC
I get this:
(gdb) call open("/dev/tty", 2)
$1 = -1
(gdb) call dup2($x, 2)
$2 = 128
(gdb) call gjs_dumpstack()
(gdb) set logging off
Comment 14 Pacho Ramos 2013-07-27 15:16:21 UTC
I am testing now with plain 3.8.3 gnome-shell (without applying patches from the branch). It looks to be solved now but I will wait a bit more 

https://git.gnome.org/browse/gnome-shell/log/?h=gnome-3-8

Not sure witch one could be the culprit
https://git.gnome.org/browse/gnome-shell/commit/?h=gnome-3-8&id=1020d8a0f8523a04d8336b1348388b8b242e414f
?

(I have a background changing every some minutes)
Comment 15 Pacho Ramos 2013-07-28 19:11:40 UTC
Yeah, dropping that patch solves the issue for me :O
Comment 16 Pacho Ramos 2013-08-07 09:01:35 UTC
Still the same with 3.8.4 :| (as it includes offending commit)
Comment 17 Evandro Giovanini 2013-08-10 16:58:37 UTC
I've seen the same issue with 3.8.4.
Comment 18 Lionel Landwerlin 2013-08-10 23:30:59 UTC
I'll have a look.
Comment 19 Lionel Landwerlin 2013-08-12 15:31:28 UTC
Could you add your background to the bug, so I can test with it.
I can't reproduce on my machine with the default background.
Comment 20 Ray Strode [halfline] 2013-08-12 15:38:18 UTC
I wonder if this bug and bug 705732 are related.
Comment 21 Lionel Landwerlin 2013-08-13 09:20:45 UTC
I definitely found a memory leak in the BackgroundCache class.
Every time you change of background we "leak" a MetaBackgroundContent. Even if we had that file already loaded previously.
It seems there is a design problem with that component, because it doesn't seem to release memory at any point.
Comment 22 Pacho Ramos 2013-08-13 13:25:25 UTC
I cannot upload all backgrounds that are rotated because I am accessing to internet using my smartphone and it has a limited quota. But I am using Ubuntu ones on Gentoo:
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/x11-themes/ubuntu-wallpapers/ubuntu-wallpapers-13.04.0.ebuild?view=markup

As you can see, we use plain ubuntu wallpapers and don't modify them
Comment 23 Ray Strode [halfline] 2013-08-13 13:52:30 UTC
Lionel so is there a reference to the old content still in the javascript? Does manually running the GC from LG "fix" it ?
Comment 24 Pacho Ramos 2013-08-14 08:34:47 UTC
I have just seen that, when it becomes stalled, I see this in journalctl:
ago 14 10:30:15 localhost gnome-session[496]: (gnome-settings-daemon:537): power-plugin-DEBUG: Received session is active change: now inactive
ago 14 10:30:15 localhost gnome-session[496]: (gnome-settings-daemon:537): mouse-plugin-DEBUG: Trying to set device enabled for 6
ago 14 10:30:15 localhost gnome-session[496]: (gnome-settings-daemon:537): mouse-plugin-DEBUG: Trying to set device enabled for 7
ago 14 10:30:15 localhost gnome-session[496]: (gnome-settings-daemon:537): mouse-plugin-DEBUG: Trying to set device enabled for 8
ago 14 10:30:15 localhost gnome-session[496]: (gnome-settings-daemon:537): mouse-plugin-DEBUG: Trying to set device enabled for 9

-> for some reason session becomes inactive, but no idea if this could be a consequence of the hang instead of a cause
Comment 25 Branko Grubic (bitlord) 2013-08-16 06:44:56 UTC
I have same problem with shell on two different machines, and I was testing 3.8.4 without commit in comment #14 for some time (one session), for now, no issues, it doesn't lock-up. 
I was using this package for F19 ( http://koji.fedoraproject.org/koji/taskinfo?taskID=5820073 )
I'll continue testing it and if something changes, I'll report ;-)
Comment 26 drago01 2013-08-16 12:53:11 UTC
Created attachment 251832 [details] [review]
Revert "background: fix asynchronous management of background loading operations"

This reverts commit 1020d8a0f8523a04d8336b1348388b8b242e414f.

---

This patch seems to add more problems then it solves, so lets revert
it at least for 3.8.x.
Comment 27 Ray Strode [halfline] 2013-08-16 19:26:11 UTC
Comment on attachment 251832 [details] [review]
Revert "background: fix asynchronous management of background loading operations"

okay let's get this in and reopen the the bug it came from.
Comment 28 drago01 2013-08-16 19:33:22 UTC
Attachment 251832 [details] pushed as 062235f - Revert "background: fix asynchronous management of background loading operations"
Comment 29 drago01 2013-08-16 19:40:21 UTC
*** Bug 706030 has been marked as a duplicate of this bug. ***
Comment 30 drago01 2013-08-18 12:23:51 UTC
*** Bug 706133 has been marked as a duplicate of this bug. ***
Comment 31 drago01 2013-08-18 12:26:39 UTC
*** Bug 706169 has been marked as a duplicate of this bug. ***
Comment 32 drago01 2013-08-18 12:27:36 UTC
*** Bug 706023 has been marked as a duplicate of this bug. ***
Comment 33 drago01 2013-08-18 12:28:27 UTC
*** Bug 706026 has been marked as a duplicate of this bug. ***
Comment 34 drago01 2013-08-18 12:30:54 UTC
*** Bug 705559 has been marked as a duplicate of this bug. ***
Comment 35 drago01 2013-08-18 12:30:59 UTC
*** Bug 705757 has been marked as a duplicate of this bug. ***
Comment 36 Pacho Ramos 2013-08-20 17:53:45 UTC
Do you know if a 3.8.5 release is scheduled soon? (for knowing if we should get patches from 3.8 branch applied downstream if not)

Thanks! :)
Comment 37 Ray Strode [halfline] 2013-08-20 19:46:34 UTC
i'd probably go with downstream patches for now. we'll want to figure out the "right" fix first before doing a 3.8.5