gnome-terminal hung, eating all CPU

Bug #23923 reported by Chris Moore
12
Affects Status Importance Assigned to Milestone
gnome-terminal (Ubuntu)
Invalid
Medium
Sebastien Bacher

Bug Description

I was using firefox (1.50b2) when I noticed the CPU meter was at 100%. I
checked 'top'.

top showed:

  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
 8184 chris 25 0 40996 11m 7456 R 97.5 3.4 3:09.49 gnome-terminal

My gnome-terminal had stopped responding. Here are a couple of backtraces:

$ ps -ef | grep gnome-terminal
chris 8184 1 0 Oct13 ? 00:04:25 gnome-terminal

$ gdb /usr/bin/gnome-terminal 8184
(gdb) where
#0 0xb7308204 in __i686.get_pc_thunk.bx () from /usr/lib/libgthread-2.0.so.0
#1 0xb7308868 in g_private_get_posix_impl (private_key=0x80c0ee0)
    at gthread-posix.c:272
#2 0xb77621f0 in IA__g_mem_chunk_free (mem_chunk=0x80c0658, mem=0x81c4824)
    at gmem.c:941
#3 0xb77420b9 in IA__g_array_free (array=0x81c4824, free_segment=1)
    at garray.c:133
#4 0xb7da5dec in _vte_trie_print () from /usr/lib/libvte.so.4
#5 0xb7da3555 in _vte_ring_insert () from /usr/lib/libvte.so.4
#6 0xb7da3733 in _vte_ring_append () from /usr/lib/libvte.so.4
#7 0xb7da68f8 in vte_terminal_set_encoding () from /usr/lib/libvte.so.4
#8 0xb7dade6d in vte_terminal_get_type () from /usr/lib/libvte.so.4
#9 0xb7dae40c in vte_terminal_get_type () from /usr/lib/libvte.so.4
#10 0xb7dbf161 in vte_terminal_copy_clipboard () from /usr/lib/libvte.so.4
#11 0xb7dbfc7c in vte_terminal_copy_clipboard () from /usr/lib/libvte.so.4
#12 0xb775c006 in g_timeout_dispatch (source=0x8219a08,
    callback=0xb7dbfc60 <vte_terminal_copy_clipboard+4500>,
    user_data=0x80c0ee0) at gmain.c:3293
#13 0xb775a4ee in IA__g_main_context_dispatch (context=0x80bd408)
    at gmain.c:1934
#14 0xb775d4f6 in g_main_context_iterate (context=0x80bd408, block=1,
    dispatch=1, self=0x80c05f8) at gmain.c:2565
#15 0xb775d7e3 in IA__g_main_loop_run (loop=0x80bdeb8) at gmain.c:2769
#16 0xb7bd8e65 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#17 0x08061567 in main ()

(gdb) quit
The program is running. Quit anyway (and detach it)? (y or n) y

$ gdb /usr/bin/gnome-terminal 8184
Attaching to program: /usr/bin/gnome-terminal, process 8184
(gdb) where
#0 0xb766ac35 in malloc_trim () from /lib/tls/i686/cmov/libc.so.6
#1 0xb766b2ca in free () from /lib/tls/i686/cmov/libc.so.6
#2 0xb7761054 in IA__g_free (mem=0x8241800) at gmem.c:187
#3 0xb7da5df4 in _vte_trie_print () from /usr/lib/libvte.so.4
#4 0xb7da3555 in _vte_ring_insert () from /usr/lib/libvte.so.4
#5 0xb7da3733 in _vte_ring_append () from /usr/lib/libvte.so.4
#6 0xb7da68f8 in vte_terminal_set_encoding () from /usr/lib/libvte.so.4
#7 0xb7dade6d in vte_terminal_get_type () from /usr/lib/libvte.so.4
#8 0xb7dae40c in vte_terminal_get_type () from /usr/lib/libvte.so.4
#9 0xb7dbf161 in vte_terminal_copy_clipboard () from /usr/lib/libvte.so.4
#10 0xb7dbfc7c in vte_terminal_copy_clipboard () from /usr/lib/libvte.so.4
#11 0xb775c006 in g_timeout_dispatch (source=0x8219a08, callback=0xb7dbfc60
<vte_terminal_copy_clipboard+4500>, user_data=0xb7733908) at gmain.c:3293
#12 0xb775a4ee in IA__g_main_context_dispatch (context=0x80bd408) at gmain.c:1934
#13 0xb775d4f6 in g_main_context_iterate (context=0x80bd408, block=1,
dispatch=1, self=0x80c05f8) at gmain.c:2565
#14 0xb775d7e3 in IA__g_main_loop_run (loop=0x80bdeb8) at gmain.c:2769
#15 0xb7bd8e65 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#16 0x08061567 in main ()

This is in 'breezy'.

Revision history for this message
Matt Zimmerman (mdz) wrote :

This bug has been marked as a duplicate of bug 23924.

Revision history for this message
Chris Moore (dooglus) wrote :

This isn't a duplicate of 17766.

I raised both bugs at the same time, and accidentally used the same summary line
for both, but later fixed the summary to be correct in both.

One bug is about the process hanging and eating all CPU, the other is a problem
with display corruption. They're quite different bugs and I would be amazed if
they had the same root cause.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for your bug. Do you have this issue often? What do you do when that
happens? What configuration do you use, the default one or do you change the
fonts and some other settings? Could you get a debug backtrace
(https://wiki.ubuntu.com/DebuggingProgramCrash) of it?

Revision history for this message
Chris Moore (dooglus) wrote :

(In reply to comment #3)
> Thanks for your bug.

You're welcome.

> Do you have this issue often?

I've only ever seen this once, and I run gnome-terminal all day, every day.

> What do you do when that happens?

I attach to the process with gdb, generate 2 debug backtraces and paste them
into a new bug report in bugzilla.

> What configuration do you use, the default one or do you change the
> fonts and some other settings?

I haven't changed much from the default configuration. I have changed the
colours to be white on black instead of the default black on white. And I have
changed the keyboard shortcut to create a new tab from control-t to
shift-control-t because due to a different bug control-k creates a new tab if I
leave it bound to control-t. I think it's a dvorak thing, but that's a separate
issue (bug 23244).

If there is some way I can export the configuration to attach it to this bug,
please tell me how and I'll do it.

> Could you get a debug backtrace
> (https://wiki.ubuntu.com/DebuggingProgramCrash) of it?

Yes. See the original bug description above for two of them. If I see the same
thing happen again, is there something different you would like me to do other
than doing a couple of 'where' commands in gdb?

Note that this happened the day after breezy was released - so the problem is in
the 'breezy' version of vte/gnome-terminal.

Revision history for this message
Chris Moore (dooglus) wrote :

I found out how to get a copy of the configuration I use. Note that I use a
large scrollback buffer. I'd forgotten about that change.

chris@chrislap:~$ gconftool-2 -R /apps/gnome-terminal/profiles/Default
 use_theme_colors = false
 background_color = #000000
 palette =
#000000000000:#AAAA00000000:#0000AAAA0000:#AAAA55550000:#00000000AAAA:#AAAA0000AAAA:#0000AAAAAAAA:#AAAAAAAAAAAA:#555555555555:#FFFF55555555:#5555FFFF5555:#FFFFFFFF5555:#55555555FFFF:#FFFF5555FFFF:#5555FFFFFFFF:#FFFFFFFFFFFF
 exit_action = close
 title = Terminal
 background_type = transparent
 allow_bold = true
 word_chars = -A-Za-z0-9,./?%&#:_
 background_darkness = 0.75428569316864014
 cursor_blink = true
 scroll_on_keystroke = true
 backspace_binding = ascii-del
 custom_command =
 delete_binding = escape-sequence
 foreground_color = #FFFFFF
 silent_bell = false
 icon = gnome-terminal.png
 background_image =
 default_show_menubar = true
 title_mode = replace
 scroll_on_output = false
 update_records = true
 visible_name = Default
 font = monospace 12
 scrollback_lines = 50000
 x_font = -misc-fixed-medium-r-semicondensed--*-120-*-*-c-*-*-*
 scroll_background = true
 use_system_font = true
 use_skey = true
 scrollbar_position = right
 login_shell = false
 use_custom_command = false

Revision history for this message
Phil Bull (philbull) wrote :

Thanks for the report.

Have you seen this issue since? If so, can you reproduce it?

Changed in gnome-terminal:
status: Unconfirmed → Needs Info
Revision history for this message
Chris Moore (dooglus) wrote :

I've not seen the issue since, but I've not used ubuntu much since, either.

I don't know how to reproduce it.

Revision history for this message
Phil Bull (philbull) wrote :

OK, I'll reject the bug for now then. If you do ever manage to reproduce the bug, please re-open this report.

Thanks

Changed in gnome-terminal:
status: Needs Info → Rejected
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.