! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
segfault seemingly in terminal_screen_vte_eof
Status:
RESOLVED: INVALID
Product:
Xfce4-terminal
Component:
General

Comments

Description Josh Grosse 2007-05-18 16:27:27 CEST
User-Agent:       Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.8.1.3) Gecko/20070505 Firefox/2.0.0.3
Build Identifier: 

This looks very very similar to closed bug 3018, as it is reproduced the same way ... opening and closing multiple tabs or multiple windows.  vte 0-16.3 segfaults in vte.c line 2735: terminal->pvt->pty_input_source = VTE_INVALID_SOURCE as terminal->pvt points to invalid memory.  Setting breakpoints in terminal_screen_vte_eof and terminal_screen_init shows that the screen and terminal pointers change between initialization and closing.

Reproducible: Sometimes

Steps to Reproduce:
1.Open initial terminal, produce text.
2.Open new tab or window, produce some text on new tab or window
3.Close either tab or window.  Segfault is intermittent (about 75% here).




I would be delighted to set more breakpoints and produce symbols for you, but I am unsure what would be of value here.
Comment 1 Zach White 2007-05-26 21:48:40 CEST
This seems to affect me as well on OpenBSD-current (2007 May 25 checkout and build).

Here is the output from running it under gbd. I can do whatever is requested, or meet someone on IRC to debug this if neccesary.

$ gdb ./Terminal                                                               
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-unknown-openbsd4.1"...
(no debugging symbols found)

(gdb) r
Starting program: /usr/ports/x11/xfce4/terminal/w-terminal-0.2.6/Terminal-0.2.6/terminal/Terminal 
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
Fontconfig warning: no <cachedir> elements found. Check configuration.
Fontconfig warning: adding <cachedir>/var/cache/fontconfig</cachedir>
Fontconfig warning: adding <cachedir>~/.fontconfig</cachedir>

Program received signal SIGSEGV, Segmentation fault.
0x072a2384 in vte_terminal_set_default_colors ()
   from /usr/local/lib/libvte.so.11.7
(gdb) c
Continuing.

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
Comment 2 Benoit Chesneau 2007-05-29 06:23:35 CEST
I have the same problem on openbsd 4.1-current with vte 0.16.3 :
zsh: segmentation fault (core dumped)  terminal

Here is a link to the core dump :
http://babilu.metavers.net/debug/Terminal.core
Comment 3 Josh Grosse 2007-05-31 13:13:24 CEST
I have just retested with vte 0.16.4, and the problem is still reproduceable.
Comment 4 Lawrence Teo 2007-06-27 03:33:03 CEST
Just a brief update: the problem is still reproducible with vte 0.16.6 on OpenBSD ( I upgraded the vte port using this simple diff at http://marc.info/?l=openbsd-ports&m=118273590215323&w=2 ).

Since the bug seems to be related to terminal->pvt pointing to invalid memory, I wonder if this is due to OpenBSD's strict malloc implementation catching some kind of incorrect memory usage.
Comment 5 Landry Breuil editbugs 2007-10-23 13:14:36 CEST
After further testing, it still segfaults badly (but less often it seems) using vte 0.16.9 and gtk 2.10.14 on OpenBSD-current. The bug is probably inside Terminal, as gnome-terminal users don't seem to be affected by a similar issue. I've tried running Terminal inside valgrind on a debian box, lots of complains and warnings inside gtk/glib but not specially in Terminal. 
Maybe a bad pointer somewhere, overwriting terminal->pvt value ?
Comment 6 bsdusr 2007-11-28 19:37:31 CET
This happens to me 100% of the time when i use ctrl-d to close a Terminal window.
Comment 7 Benedikt Meurer editbugs 2007-12-18 16:50:16 CET
Please attach a backtrace of the segfault.
Comment 8 bsdusr 2007-12-18 17:36:27 CET
Backtrace produced on OpenBSD 4.2-stable, i386, gtk+ 2.10.13, vte 0.16.6, terminal 0.2.6:

Program received signal SIGSEGV, Segmentation fault.
0x073375be in vte_terminal_set_default_colors ()
   from /usr/local/lib/libvte.so.11.9
(gdb) backtrace
#0  0x073375be in vte_terminal_set_default_colors ()
   from /usr/local/lib/libvte.so.11.9
#1  0x062c25b8 in g_source_set_callback_indirect ()
   from /usr/local/lib/libglib-2.0.so.1200.12
#2  0x062c342c in g_source_is_destroyed ()
   from /usr/local/lib/libglib-2.0.so.1200.12
#3  0x062c43e5 in g_main_context_dispatch ()
   from /usr/local/lib/libglib-2.0.so.1200.12
#4  0x062c470a in g_main_context_dispatch ()
   from /usr/local/lib/libglib-2.0.so.1200.12
#5  0x062c4c16 in g_main_loop_run () from /usr/local/lib/libglib-2.0.so.1200.12
#6  0x0f88e6e3 in gtk_main () from /usr/local/lib/libgtk-x11-2.0.so.1000.13
#7  0x1c00b11b in main (argc=1, argv=0xcfbc39c8) at main.c:277
Comment 9 Benedikt Meurer editbugs 2007-12-18 19:56:49 CET
Hm, no Terminal code involved. Looks like a VTE bug.

Bug #3246

Reported by:
Josh Grosse
Reported on: 2007-05-18
Last modified on: 2009-12-17

People

Assignee:
Nick Schermer
CC List:
4 users

Version

Attachments

Additional information