Sometimes Granite.SimpleCommand hangs & freezes wingpanel

Bug #1474082 reported by xapantu
80
This bug affects 16 people
Affects Status Importance Assigned to Milestone
Granite
Confirmed
Undecided
Unassigned
Wingpanel Network Indicator
Fix Released
Critical
Felipe Escoto

Bug Description

If the network indicator uses SimpleCommand, sometimes wingpanel freezes. Here is a backtrace:

#0 0x00007ffff5f1af1d in read () from /usr/lib/libc.so.6
#1 0x00007ffff647c89d in ?? () from /usr/lib/libglib-2.0.so.0
#2 0x00007ffff642adb8 in ?? () from /usr/lib/libglib-2.0.so.0
#3 0x00007ffff642b46d in ?? () from /usr/lib/libglib-2.0.so.0
#4 0x00007ffff642be74 in g_io_channel_read_line () from /usr/lib/libglib-2.0.so.0
#5 0x00007ffff7b84993 in __lambda20_ (condition=<optimized out>, source=<optimized out>, self=<optimized out>) at /build/granite-bzr/src/granite/build/lib/Services/SimpleCommand.c:159
#6 ___lambda20__gio_func (source=<optimized out>, condition=<optimized out>, self=0xbf3f60) at /build/granite-bzr/src/granite/build/lib/Services/SimpleCommand.c:210
#7 0x00007ffff643790d in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#8 0x00007ffff6437ce0 in ?? () from /usr/lib/libglib-2.0.so.0
#9 0x00007ffff6437d8c in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#10 0x00007ffff787547c in g_application_run () from /usr/lib/libgio-2.0.so.0
#11 0x00007ffff7b6f120 in granite_application_run (self=self@entry=0x8301b0, args=0x7fffffffe4f8, args_length1=1) at /build/granite-bzr/src/granite/build/lib/Application.c:304
#12 0x00000000004066a4 in wingpanel_main (args=0x7fffffffe4f8, args_length1=2) at /build/wingpanel-rewrite-x11-bzr/src/wingpanel-rewrite-x11/src/Wingpanel.vala:24
#13 0x00007ffff5e60790 in __libc_start_main () from /usr/lib/libc.so.6
#14 0x0000000000406359 in _start ()

And indeed, the code used there looks quite weird (for instance the exceptions block are definitively not long enough because the code that follows can use uninitialized data).

Uncomment the code in show_settings in src/Widget/PopoverWidget.vala to test (in wingpanel-indicator-network).

xapantu (xapantu)
Changed in granite:
status: New → Confirmed
assignee: nobody → xapantu (xapantu)
Revision history for this message
xapantu (xapantu) wrote :

So, the branch linked should fix some issues, I think there is another problem with the read_line that are fired too often, but I am not sure and it takes time to investigate.

xapantu (xapantu)
Changed in granite:
assignee: xapantu (xapantu) → nobody
summary: - Sometimes Granite.SimpleCommand hangs
+ Sometimes Granite.SimpleCommand hangs & freezes wingpanel
Changed in wingpanel-indicator-network:
status: New → In Progress
assignee: nobody → Felipe Escoto (philip.scott)
Changed in wingpanel-indicator-network:
status: In Progress → Fix Committed
no longer affects: wingpanel
Cody Garver (codygarver)
Changed in wingpanel-indicator-network:
importance: Undecided → Critical
milestone: none → 2.0.1
status: Fix Committed → Fix Released
Revision history for this message
Midhun kr (midhun02) wrote :

Based on the backtrace, it seems that there is an issue with the SimpleCommand service that is being used by the network indicator in wingpanel. The issue could be related to the way the service is implemented or it could be a problem with the data that is being passed to the service.

It's hard to provide a specific solution without seeing the code in question, but one suggestion would be to review the code that uses the SimpleCommand service and make sure that any exceptions are handled properly. It's also important to make sure that any data passed to the service is properly initialized.

Additionally, uncommenting the code in show_settings in src/Widget/PopoverWidget.vala as suggested in the message could be a helpful step in identifying the issue. It may provide more information on where the problem is occurring and how it can be resolved.

If the issue persists, it may be necessary to reach out to the developer or community support for assistance in debugging and resolving the issue.

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.