gnome-pie hangs up and causes 100% CPU usage #73

Closed
verfriemelt-dot-org opened this Issue Dec 16, 2013 · 13 comments

Comments

Projects
None yet
5 participants
@verfriemelt-dot-org

Hi

i have some issues with gnomepie right now and i couldnt figure out what causes this trouble ...

sometimes gnome-pie runs in some sort of deadlock and raises cpu usage to 100% and doesnt respond at all ... i have to SIGKILL the executable and when i restart everythings runs fine.

the only error i get right now is the following

[WARNING] Failed to fetch path: No such interface `org.ayatana.bamf.application' on object at path /org/ayatana/bamf/application0x1db9ae0

but i have no idea, if this has something todo with the deadlock

im using
[MESSAGE] Welcome to Gnome-Pie 0.5.5!
with mate 1.6 on an debian-testing

@Simmesimme

This comment has been minimized.

Show comment
Hide comment
@Simmesimme

Simmesimme Jan 23, 2015

Owner

Hey there! Sorry for the late reply --- Does this still occur with the latest version?

Owner

Simmesimme commented Jan 23, 2015

Hey there! Sorry for the late reply --- Does this still occur with the latest version?

@verfriemelt-dot-org

This comment has been minimized.

Show comment
Hide comment
@verfriemelt-dot-org

verfriemelt-dot-org Jan 23, 2015

hi usign the lates version from sid repositories and ýeapp, still happening.

https://packages.debian.org/sid/gnome-pie

hi usign the lates version from sid repositories and ýeapp, still happening.

https://packages.debian.org/sid/gnome-pie

@haedri

This comment has been minimized.

Show comment
Hide comment
@haedri

haedri Feb 2, 2015

I have updated today to 0.5.7 and I don't seem to have the problem anymore, thanks !
(previously I was using a script to kill gnome-pie whenever it was using 100% cpu for too long, I'm glad I can remove it)

haedri commented Feb 2, 2015

I have updated today to 0.5.7 and I don't seem to have the problem anymore, thanks !
(previously I was using a script to kill gnome-pie whenever it was using 100% cpu for too long, I'm glad I can remove it)

@Simmesimme Simmesimme closed this Feb 4, 2015

@and3rson

This comment has been minimized.

Show comment
Hide comment
@and3rson

and3rson Feb 20, 2015

Same on my end - fixed by upgrading from 0.5.6 to 0.5.7. Thanks!

Same on my end - fixed by upgrading from 0.5.6 to 0.5.7. Thanks!

@gabdub

This comment has been minimized.

Show comment
Hide comment
@gabdub

gabdub Apr 14, 2015

Contributor

Hi everyone!
I still see this issue from time to time in version 0.5.7.
I'm running Ubuntu 14.04 LTS (I saw it in the 32 and the 64 bits version).
I attached gdb and found that during the almost 100% cpu use, gnome-pie is in a thight loop dispatching messages.
Here are 5 snapshots of the stack (captured in a VM running the 32bit version):

  • g_poll()
  • g_main_context_check() -> g_source_get_time() -> g_get_monotonic_time()
  • g_main_context_prepare() -> dbus_connection_get_dispatch_status()
  • g_main_context_dispatch() -> g_mutex_lock()
  • g_main_context_prepare() -> g_source_get_time() -> g_get_monotonic_time()

note: g_poll is where the program normally wait for events.

I put some prints in the code and saw that the hang occurs after the gnome-pie window is destroyed (after that, no more calls are received in the event filter function)

To generate this bug: open/close/open/close/.. "a lot" of times in a rapid series over the launcher, the auto-hide scrollbars, the screen corners, etc.
Best regards,
Gabriel

Contributor

gabdub commented Apr 14, 2015

Hi everyone!
I still see this issue from time to time in version 0.5.7.
I'm running Ubuntu 14.04 LTS (I saw it in the 32 and the 64 bits version).
I attached gdb and found that during the almost 100% cpu use, gnome-pie is in a thight loop dispatching messages.
Here are 5 snapshots of the stack (captured in a VM running the 32bit version):

  • g_poll()
  • g_main_context_check() -> g_source_get_time() -> g_get_monotonic_time()
  • g_main_context_prepare() -> dbus_connection_get_dispatch_status()
  • g_main_context_dispatch() -> g_mutex_lock()
  • g_main_context_prepare() -> g_source_get_time() -> g_get_monotonic_time()

note: g_poll is where the program normally wait for events.

I put some prints in the code and saw that the hang occurs after the gnome-pie window is destroyed (after that, no more calls are received in the event filter function)

To generate this bug: open/close/open/close/.. "a lot" of times in a rapid series over the launcher, the auto-hide scrollbars, the screen corners, etc.
Best regards,
Gabriel

@gabdub

This comment has been minimized.

Show comment
Hide comment
@gabdub

gabdub Apr 14, 2015

Contributor

Same thing with Ubuntu MATE 14.04.
Seems that with less memory the issue shows up easier.

Contributor

gabdub commented Apr 14, 2015

Same thing with Ubuntu MATE 14.04.
Seems that with less memory the issue shows up easier.

@gabdub

This comment has been minimized.

Show comment
Hide comment
@gabdub

gabdub Apr 16, 2015

Contributor

More info in case someone can figure out what's happening...

I can hang up gnome-pie in Ubuntu 14.04 64 bits with some easy (the system is up to date).
I'm using "glossy" but I saw the hang up with other themes as well.
When I stopped gnome-pie in a hanged condition, I saw 4 threads in gdb named: "dconf_worker", "gdbus", "gmain" and "gnome-pie". The fist 3 are all waiting in "poll()". The last one moves continuously as indicated before, dispatching some event for ever.
I will try to hang up gnome-pie with another distribution because my 3 test cases are Ubuntu 14.04 based.
I saw the problem usually after closing the pie but sometimes it happens opening it from the launcher and the whole system stop responding to mouse/keyboard until gnome-pie is destroyed.

Contributor

gabdub commented Apr 16, 2015

More info in case someone can figure out what's happening...

I can hang up gnome-pie in Ubuntu 14.04 64 bits with some easy (the system is up to date).
I'm using "glossy" but I saw the hang up with other themes as well.
When I stopped gnome-pie in a hanged condition, I saw 4 threads in gdb named: "dconf_worker", "gdbus", "gmain" and "gnome-pie". The fist 3 are all waiting in "poll()". The last one moves continuously as indicated before, dispatching some event for ever.
I will try to hang up gnome-pie with another distribution because my 3 test cases are Ubuntu 14.04 based.
I saw the problem usually after closing the pie but sometimes it happens opening it from the launcher and the whole system stop responding to mouse/keyboard until gnome-pie is destroyed.

@gabdub

This comment has been minimized.

Show comment
Hide comment
@gabdub

gabdub Apr 16, 2015

Contributor

Couldn't hang up version 0.5.6 in Ubuntu 12.04... and I really tried to!
By now seems something related to Ubuntu 14.04... I'll keep testing it.

Contributor

gabdub commented Apr 16, 2015

Couldn't hang up version 0.5.6 in Ubuntu 12.04... and I really tried to!
By now seems something related to Ubuntu 14.04... I'll keep testing it.

@gabdub

This comment has been minimized.

Show comment
Hide comment
@gabdub

gabdub Apr 18, 2015

Contributor

Hi Simon,
I think I finally got something here!
I added some stress option to gnome-pie to auto open-close one given pie 500 times with some small delay in between.
I discovered that the program sometimes hangs up when you move the mouse during opening/close cycles (entering/leaving the pie window).
I tried commenting a lot of code and the issue only gone away after commenting out the POINTER_MOTION_MASK event filter. Since after that all works the same, I commented out the add_events() call completely and everything works as usual, but with the big difference that the issue hasn't shown up by now in over 1000 open-close cycles!!
Uncommenting it, hungs up again after a random number of cycles (could be less than 100).

Could you please comment this line in pieRenderer.vala and confirm it could be removed?
// set up event filter
/* this.add_events(Gdk.EventMask.BUTTON_RELEASE_MASK |
Gdk.EventMask.KEY_RELEASE_MASK |
Gdk.EventMask.KEY_PRESS_MASK |
Gdk.EventMask.POINTER_MOTION_MASK |
Gdk.EventMask.SCROLL_MASK );
*/
I've tested it only in Ubuntu 14.04 64bits by now. I'll confirm if this solves the issue in 32bits and MATE 14.04 version as well.
Regards, Gabriel.

Contributor

gabdub commented Apr 18, 2015

Hi Simon,
I think I finally got something here!
I added some stress option to gnome-pie to auto open-close one given pie 500 times with some small delay in between.
I discovered that the program sometimes hangs up when you move the mouse during opening/close cycles (entering/leaving the pie window).
I tried commenting a lot of code and the issue only gone away after commenting out the POINTER_MOTION_MASK event filter. Since after that all works the same, I commented out the add_events() call completely and everything works as usual, but with the big difference that the issue hasn't shown up by now in over 1000 open-close cycles!!
Uncommenting it, hungs up again after a random number of cycles (could be less than 100).

Could you please comment this line in pieRenderer.vala and confirm it could be removed?
// set up event filter
/* this.add_events(Gdk.EventMask.BUTTON_RELEASE_MASK |
Gdk.EventMask.KEY_RELEASE_MASK |
Gdk.EventMask.KEY_PRESS_MASK |
Gdk.EventMask.POINTER_MOTION_MASK |
Gdk.EventMask.SCROLL_MASK );
*/
I've tested it only in Ubuntu 14.04 64bits by now. I'll confirm if this solves the issue in 32bits and MATE 14.04 version as well.
Regards, Gabriel.

@gabdub

This comment has been minimized.

Show comment
Hide comment
@gabdub

gabdub Apr 18, 2015

Contributor

Solved in MATE 14.04.2 (32 bits) too!! over 1000 cycles OK with this line commented out....
Only 100 cycles to hung up with this line in.

Now I'm using it normally all seems to work properly.

Congrats for 0.6 release!
I'll update and make a pull request with this line commented out.

Contributor

gabdub commented Apr 18, 2015

Solved in MATE 14.04.2 (32 bits) too!! over 1000 cycles OK with this line commented out....
Only 100 cycles to hung up with this line in.

Now I'm using it normally all seems to work properly.

Congrats for 0.6 release!
I'll update and make a pull request with this line commented out.

@Simmesimme

This comment has been minimized.

Show comment
Hide comment
@Simmesimme

Simmesimme Apr 18, 2015

Owner

Awesome! I'll test it and release 0.6.1 asap!

Owner

Simmesimme commented Apr 18, 2015

Awesome! I'll test it and release 0.6.1 asap!

@Simmesimme

This comment has been minimized.

Show comment
Hide comment
@Simmesimme

Simmesimme Apr 18, 2015

Owner

I have put it in a quick 0.6.1. Let's see how it goes :-)

Owner

Simmesimme commented Apr 18, 2015

I have put it in a quick 0.6.1. Let's see how it goes :-)

@Simmesimme Simmesimme closed this Apr 18, 2015

@Simmesimme

This comment has been minimized.

Show comment
Hide comment
Owner

Simmesimme commented Apr 18, 2015

You can read the post at my homepage: http://simmesimme.github.io/news/2015/04/18/gnome-pie-061/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment