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 167557 - gnome-terminal crashes by gconf schema injection
gnome-terminal crashes by gconf schema injection
Status: RESOLVED DUPLICATE of bug 499797
Product: gnome-terminal
Classification: Core
Component: general
2.9.x
Other All
: Normal critical
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-02-16 02:47 UTC by Thomas Eriksson
Modified: 2007-11-27 02:39 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
Fixes the crasher (1.12 KB, patch)
2005-07-21 19:05 UTC, Michele Baldessari
rejected Details | Review

Description Thomas Eriksson 2005-02-16 02:47:06 UTC
Please describe the problem:
I'm trying to load schemas into gnome terminal with the gconf command, however
it crashes randomly saying: 

** (gnome-terminal:21777): CRITICAL **: file terminal-profile.c: line 374
(terminal_profile_new): assertion `terminal_profile_lookup (name) == NULL'
failed


Steps to reproduce:
1. load a schema with gconftool-2 --load schemafile
2. change the list of current schemas via gconftool-2 (to make gnome-terminal
aware of the change)
3. if needed, repeat a few times with different schemas (or use the script below)


Actual results:
gnome-terminal crashes.

Expected results:
not to crash.

Does this happen every time?
no, random. but often.

Other information:
I have created a script with proof of concept code at:
http://bashish.sourceforge.net/gnome-crash/gnome-crash.tar.bz2

and the full backtrace:
http://bashish.sourceforge.net/gnome-crash/gnome-terminal.trace.bz2
Comment 1 Thomas Eriksson 2005-02-16 02:49:19 UTC
I included the message of gnome-terminal 2.8.2 in the bugreport, following is
the message for gnome-terminal 2.9.2:

** (gnome-terminal:32445): CRITICAL **: terminal_profile_new: assertion
`terminal_profile_lookup (name) == NULL' failed
Comment 2 Michele Baldessari 2005-07-21 18:36:06 UTC
I can confirm this problem. Here's a full stacktrace:

Backtrace was generated from '/home/devel/gnome/INSTALL/bin/gnome-terminal'

Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1208973632 (LWP 26137)]
[New Thread -1216607312 (LWP 26140)]
0x00d71402 in ?? ()

Thread 1 (Thread -1208973632 (LWP 26137))

  • #0 ??
  • #1 __waitpid_nocancel
    from /lib/libpthread.so.0
  • #2 libgnomeui_segv_handle
    at gnome-ui-init.c line 749
  • #3 <signal handler called>
  • #4 terminal_profile_update
    at terminal-profile.c line 1955
  • #5 sync_profile_list
    at terminal.c line 2056
  • #6 profile_list_notify
    at terminal.c line 2177
  • #7 notify_listeners_callback
    at gconf-client.c line 2368
  • #8 notify_listener_list
    at gconf-listeners.c line 588
  • #9 ltable_notify
    at gconf-listeners.c line 654
  • #10 gconf_listeners_notify
    at gconf-listeners.c line 184
  • #11 notify_one_entry
    at gconf-client.c line 2393
  • #12 gconf_client_flush_notifies
    at gconf-client.c line 2433
  • #13 notify_idle_callback
    at gconf-client.c line 2327
  • #14 g_idle_dispatch
    at gmain.c line 3813
  • #15 g_main_dispatch
    at gmain.c line 1934
  • #16 IA__g_main_context_dispatch
    at gmain.c line 2484
  • #17 g_main_context_iterate
    at gmain.c line 2565
  • #18 IA__g_main_loop_run
    at gmain.c line 2769
  • #19 IA__gtk_main
    at gtkmain.c line 972
  • #20 main
    at terminal.c line 1770

Comment 3 Michele Baldessari 2005-07-21 19:04:11 UTC
I'll attach a first tentative fix which makes the crasher go away here.
NOT to be applied yet, since I'm just patching the symptom
Comment 4 Michele Baldessari 2005-07-21 19:05:58 UTC
Created attachment 49533 [details] [review]
Fixes the crasher
Comment 5 Kjartan Maraas 2005-09-20 08:45:53 UTC
Michele, did you look into this further?
Comment 6 Guilherme de Siqueira Pastore 2006-01-10 04:00:55 UTC
Hiding the symptom of a deeper problem is not acceptable, marking the patch as rejected.
Comment 7 Jeff 2006-02-18 20:00:00 UTC
I think I found the 'deeper problem'.

The kamikaze script has an error that causes the profile '1' to be added to the gconf key "... global/profile_list" twice.  terminal_profile_new() correctly bails out if it sees a name that is already in its hash table, but the following call to terminal_profile_update() at terminal.c:2077 doesn't check for that condition (ie, that profile == NULL).

You can reproduce the problem directly if you just add a second 'Default' entry to key "... global/profile_list".

On principle I think this should be a wontfix, since the user is externally filling the gconf keys with crap data, and that's not our problem.  But... Michele's 1-line patch fixes the problem completely (it is exactly what I came up with independantly without seeing the patch beforehand).

In other words, the 'deeper problem' was merely that the gconf keys were being screwed up by somebody else, so gnome-terminal shouldn't worry about it.  Yet, since the fix is so simple, and (god knows why) somebody's tripped on this problem before, I vote for the patch being applied.
Comment 8 Behdad Esfahbod 2007-11-27 02:39:04 UTC
Thanks for taking the time to report this bug.
This particular bug has already been reported into our bug tracking system, but we are happy to tell you that the problem has already been fixed. It should be solved in the next software version. You may want to check for a software upgrade.


*** This bug has been marked as a duplicate of 499797 ***