GNOME Bugzilla – Bug 561631
gailbutton.c:571:idle_do_action: code should not be reached
Last modified: 2009-02-26 02:28:43 UTC
(gedit:20150): Gtk-CRITICAL **: gtk_button_leave: assertion `GTK_IS_BUTTON (button)' failed ** ERROR:/build/buildd/gtk+2.0-2.14.4/modules/other/gail/gailbutton.c:571:idle_do_action: code should not be reached Aborted (core dumped) (gdb) thread apply all bt
+ Trace 210031
On running the following LDTP script, gedit crashes from ldtp import * import threading callbackRunning = threading.Event () callbackRunning.clear () callbackState = threading.Event () callbackState.clear () def call (): callbackState.set () if waittillguiexist ('dlgReplace'): click ('dlgReplace', 'btnClose') callbackState.clear () callbackRunning.set () onwindowcreate ('Replace', call) click ('*-gedit', 'btnReplace') click ('*-gedit', 'btnOpen') #import time #time.sleep (2) if waittillguiexist ('dlgOpenFiles'): # time.sleep (2) click ('dlgOpenFiles', 'btnCancel') # time.sleep (2) if callbackState.isSet (): print 'Waiting for callback to complete' callbackRunning.wait () I'm able to reproduce this in Ubuntu 8.10 - 32 bit Shall I provide any other info ?
From the code, LDTP calls do_action on button with the action number greater than 2 which is not allocated to any action. Could you check LDTP's code please?
Li, All the click events, I have implemented as 0 for sure and in the above code, I'm just doing click action only.
Can you paste the action number during the crash?
This happens with seahorse application as well. My test environment Ubuntu 8.10. In console, I notice the following error message: ----- (.:12476): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated (.:12476): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated (.:12476): Gtk-CRITICAL **: gtk_button_leave: assertion `GTK_IS_BUTTON (button)' failed ** Message: could not grab keyboard (.:12476): Gtk-CRITICAL **: gtk_button_leave: assertion `GTK_IS_BUTTON (button)' failed ** ERROR:/build/buildd/gtk+2.0-2.14.4/modules/other/gail/gailbutton.c:571:idle_do_action: code should not be reached ----- Steps to reproduce the issue: The way to reproduce the error is getting the latest tests and running (you need bzr installed) $ bzr branch lp:ubuntu-desktop-testing $ cd ubuntu-desktop-testing $ ./bin/ubuntu-desktop-tests -a seahorse It should work in both Suse and Ubuntu. The test opens seahorse and tries to create a PGP key. But when it enters the passphrase, it crashes. Above steps created by Ara
I'm able to reproduce this in openSUSE / Ubuntu with latest GNOME. Looks like a new regression ?
Most of my tests (using LDTP) in Ubuntu 8.10 / openSUSE 11.1 are failing because of this. Unable to run VMware workstation tests / Ubuntu desktop testing tests. Confirming the bug.
I tried the seahorse case. Seahorse is started but does nothing, and doesn't crash. Did I missed something? The code of gailbutton has not been touched for a long time.
Reproducing this on Solaris NEVEADA with LDTP-1.4.0(Testing gedit), pasting BugReportTool reports: Distribution: Solaris Express Community Edition snv_105 X86 Gnome Release: 2.24.2 2008-12-01 (Sun Microsystems, Inc.) BugBuddy Version: 2.24.2 X Vendor: Sun Microsystems, Inc. X Vendor Release: 10300000 Selinux: No Accessibility: Enabled GTK+ Theme: nimbus Icon Theme: nimbus Memory status: size: 151175168 vsize: 151175168 resident: 27570176 share: 2703360 rss: 27570176 rss_rlim: 0 CPU usage: start_time: 1232421671 rtime: 128 utime: 1075821 stime: 209776 cutime:0 cstime: 0 timeout: 0 it_real_value: 0 frequency: 0 Backtrace was generated from '/usr/bin/gedit' 3430: gedit ----------------- lwp# 1 / thread# 1 -------------------- fef120a5 waitid (0, d77, 80467dc, 3) feec2be5 waitpid (d77, 8046898, 0, fe488bfd) + 65 fe489004 g_spawn_sync (0, 8621c30, 0, 4, 0, 0) + 418 fe489404 g_spawn_command_line_sync (862e010, 0, 0, 0, 80469b8) + 5c fa2f1791 __1cNrun_bug_buddy6Fpkclp0_b_ (80fe210, d66, 0, d66) + 71 fa2f1a19 __1cMcheck_if_gdb6F_v_ (feee7dc5, fef90000, 8046b38, fef0ca5f, 6, 0) + 145 fa2f1458 __1cUbugbuddy_segv_handle6Fi_v_ (6, 0, 8046bec) + 64 fef0ca5f __sighndlr (6, 0, 8046bec, fa2f13f4) + f feeffdaf call_user_handler (6) + 2af feefffdf sigacthandler (6, 0, 8046bec) + df --- called from signal handler with signal 6 (SIGABRT) --- fef11c35 _lwp_kill (1, 6, 8046e28, feeba1fe) + 15 feeba20a raise (6, 6, 8046e60, fee916a4) + 22 fee9170c abort (884c830, fe4f967c, 8046ea8, fe4e7820, 313735, 880f020) + 74 fe478403 g_assertion_message (0, fcdc299c, 23b, fcdc1684, 0, 8046f00) + db fcda081e idle_do_action (880f020, fef90000, 8046f98, fe56fc5c) + 1aa fe56fc79 gdk_threads_dispatch (884b030, fe4f967c, 8046fc8, fe454f08) + 49 fe454f1e g_idle_dispatch (8841888, fe56fc30, 884b030, 8047020) + 22 fe4528a6 g_main_context_dispatch (811f268, c8, 86741e8, f) + 262 fe452f49 g_main_context_iterate (811f268, 1, 1, 80fd228) + 475 fe4535bd g_main_loop_run (8269bc8, 8269bc8, 0, fe7670e2) + 1dd fe76718b gtk_main (8047150, fefc5244, 0, fee80db2, 29, fef989bc) + b7 0807dac6 main (1, 8047190, 8047198, 804714c) + 4ca 0807cc8d _start (1, 80472c8, 0, 80472ce, 80472f2, 8047353) + 7d ----------------- lwp# 6 / thread# 6 -------------------- fef0c9d9 lwp_park (0, f57c0dec, 0) fef0610d cond_wait_queue (8590e68, 8149da0, f57c0dec, fef062f6) + 60 fef064d3 cond_wait_common (8590e68, 8149da0, f57c0dec, fef06716) + 1eb fef0676e __cond_timedwait (8590e68, 8149da0, f57c0e6c, fef06800) + 66 fef06811 cond_timedwait (8590e68, 8149da0, f57c0e6c, fef06844) + 27 fef0685c pthread_cond_timedwait (8590e68, 8149da0, f57c0e6c, fe0e1971) + 24 fe0e19bb g_cond_timed_wait_posix_impl (8590e68, 8149da0, f57c0f3c, fe42b296) + 57 fe42b318 g_async_queue_pop_intern_unlocked (8149d80, 0, f57c0f3c, fe42b746) + 90 fe42b79c g_async_queue_timed_pop (8149d80, f57c0f3c, f57c0f6c, fe47c312) + 64 fe47c40f g_thread_pool_wait_for_new_pool (fe4fa68c, fe4f967c, 49754340, 1369d, fe4fa69c, 0) + 10b fe47c64c g_thread_pool_thread_proxy (827f6e8, 8653c50, 200, fe47ae12) + 180 fe47af37 g_thread_create_proxy (8653c50, fef90000, f57c0fec, fef0c6be) + 133 fef0c6f6 _thrp_setup (fa382200) + 7e fef0c980 _lwp_start (fa382200, 0, 0, fef0c6be, 0, 0) Output of custom script "/usr/lib/gedit-2/gedit-bugreport.sh":
Because of this bug, I'm unable to run any test on openSUSE 11.1 / Ubuntu 8.10 / Mandriva 2009. Thanks
Code being used to reproduce this crash: action = Accessible_getAction (object); if (action) { flag = AccessibleAction_doAction (action, 0); Accessible_unref (action); } http://cgit.freedesktop.org/ldtp/ldtp/tree/src/push-button.c#n80 Please let me know, if I need to change anything in LDTP. Thanks
Yue Wang is working on this.
When I tried to reproduce in ubuntu, I get:
+ Trace 212497
from ubuntutesting.gnome import *
How to get the "ubuntutesting.gnome" module?
It is there under /home/yue/Download/ubuntu-desktop-testing/ubuntutesting You can install all the necessary modules by: $ sudo python /home/yue/Download/ubuntu-desktop-testing/setup.py install
(In reply to comment #13) > It is there under > > /home/yue/Download/ubuntu-desktop-testing/ubuntutesting > > You can install all the necessary modules by: > > $ sudo python /home/yue/Download/ubuntu-desktop-testing/setup.py install > Thanks for your help. After that I run the test case successfully. But it didn't crash. I will show you my log. Thanks.
Created attachment 128612 [details] gedit_chains.log
Created attachment 128613 [details] generate_pgp.log There is an error about exit, but not clicking button.
Second time when I try the test case today morning in ubuntu, I reproduced it on my box in "./bin/ubuntu-desktop-tests -a seahorse": GTK Accessibility Module initialized ** Message: init gpgme version 1.1.6 ** (.:12122): WARNING **: couldn't open file to check for SSH key: /home/yue/.ssh/id_dsa: Permission denied (.:12122): Gtk-CRITICAL **: gtk_button_leave: assertion `GTK_IS_BUTTON (button)' failed (.:12122): Gtk-CRITICAL **: gtk_button_leave: assertion `GTK_IS_BUTTON (button)' failed ** ERROR:gailbutton.c:571:idle_do_action: code should not be reached but not in "./bin/ubuntu-desktop-tests -a gedit".
ah ! nice, in any case, the issue is same :) Thanks
Yes, we are debugging it.
Created attachment 128619 [details] [review] patch
(In reply to comment #20) > Created an attachment (id=128619) [edit] > patch > Thanks for the quick fix :) To build this, I need to get the complete gtk+ tree ?
Yes. GAIL is in Gtk+ now.
Li, will this be part of previous gnome dot releases ? So, that it might be available via package update. Building gtk+ to produce binary for individual distribution will be a nightmare :) Thanks
With the new fixes, I tried it in Ubuntu 9.04 and able to reproduce the crash Core was generated by `seahorse'. Program terminated with signal 11, Segmentation fault. [New process 18760]
+ Trace 212878
Thread 1 (process 18760)
reopening the bug Thanks
This is a different crash. The queue has gone before we used it. Seems the button has been finalized. Could you add a printf in gail_button_finalize to see if it is called before idle_do_action?
(In reply to comment #25) > This is a different crash. The queue has gone before we used it. Seems the > button has been finalized. Could you add a printf in gail_button_finalize to > see if it is called before idle_do_action? > I'm just using it from binary, probably Ara can you try this ? Thanks
How did you apply the patch?
(In reply to comment #27) > How did you apply the patch? > Li, This is now part of Ubuntu 9.04 update. Thanks
Yue Wang can not reproduce the bug. Can you reproduce it every time? From the trace, I suspect LDTP free the button immediately after do_action?
(In reply to comment #29) > Yue Wang can not reproduce the bug. Can you reproduce it every time? Both me and Ara able to reproduce always > > From the trace, I suspect LDTP free the button immediately after do_action? > Yes, more detail in comment #10 Thanks
Created attachment 129472 [details] [review] a new patch
OK... Although I can't reproduce the crash, I think it is possible. This is a multi-thread issue. The button is finalized when idle_do_action is being executed. So ref the button in the beginning of idle_do_action and unref it before return can fix the bug. Yue Wang will paste the patch. P.S. We met a multi-thread problem in bug #329454. Although we fixed that bug, a thread can be scheduled accidentally. Wish we can get rid of such bugs after transfer to DBus.
Nagappan and Ara, would you please try the patch today so we can commit the patch tomorrow to catch up with gnome 2.25.92?
Created attachment 129475 [details] [review] the mew patch Adding g_object_unref before the other "return".
I will try it today. Thanks a lot.
The patch solved the issue! Thanks a lot. Please, tell me when you commit this, so I can track it better. Thanks again, Ara.
Created attachment 129534 [details] [review] final patch