GNOME Bugzilla – Bug 318797
gnome-terminal crashes if you start too many too quickly
Last modified: 2006-03-04 06:08:45 UTC
This bug has been opened here: https://bugzilla.ubuntu.com/show_bug.cgi?id=17247 "I was trying to find a reliable way to reproduce bug 17137. It only seems to happen when the window list at the bottom is full. So I decided to run a few gnome-terminals to fill it up. I often run terminals, so I have put an icon on the top panel to allow me to run them easily. I started with nothing showing in the window list at all and then clicked the gnome-terminal icon on my top panel 4 times quickly - like a double click on the mouse, only 4 of them, really quite fast. Only 3 of the 4 windows I requested appeared, and then I heard a clunking noise and saw a dialog telling me that "The Application "gnome-terminal" has quit unexpectedly. I told it to close, and the 3 windows all disappeared. This doesn't happen every time I try it, but about 1 in 10 times it does. I compiled gnome-terminal from the sources so I could bring you a stack trace. I waited for gnome-terminal to crash, then attached to it with gdb which the dialog telling me that it had crashed was still displayed. The processes running at the time looked like this: UID PID PPID C STIME TTY TIME CMD chris 32763 1 0 17:14 ? 00:00:00 sh -c cd /home/chris/src/gnome-terminal/gnome-terminal-2.12.0/src; ./gnome-terminal chris 32764 32763 0 17:14 ? 00:00:00 ./gnome-terminal chris 340 32764 0 17:14 ? 00:00:00 /usr/lib/libgnomeui-0/gnome_segv gnome-terminal 11 2.12.0 I attached to the process like this: "gdb ./gnome-terminal 32764" And saw this stack trace:
+ Trace 63522
I notice that no matter how many gnome-terminals you run, there's only one process. Perhaps starting 2 "at the same time" triggers a race condition."
*** Bug 329700 has been marked as a duplicate of this bug. ***
Confirming, I can reproduce this bug with gnome-terminal 2.13.90 as well.
Can we target that bug for that cycle? The crash happens quite often (got several people from the Ubuntu distro team facing it today), is easy to reproduce and is pretty annoying since it crash all your running jobs with it
I am seeing the bug in 2.13.91. It looks like handle_new_terminal_events couldn't cope with being called recursively. this was happening because someone recently added a call to some gconf stuff in get_child_environment. gconf uses bonobo too, so bonobo was taking the opportunity to deliver any backlogged "new_terminal" requests. I'll attach a patch that fixes. For the future, can no longer assume that terminal_new_event won't be called recursively.
Created attachment 59633 [details] [review] fix crash (hopefully) this is my fix apply to CVS head
Thanks for your work! =) I'll be reviewing this in a few moments.
Makes me wonder... ok, it doesn't freeze anymore, but doesn't fix the problem either (i.e. only one g-t will be launched).
Created attachment 59670 [details] [review] bigger, better, badder You're right -- I missed the difference between having 100 terminals open and 99 terminals open....
Now the problem's fixed! Thank you very much! =)