xterm segfaults randomly

Bug #219294 reported by Matt Fischer on 2008-04-18
This bug report is a duplicate of:  Bug #199285: xterm crashes when compiz is on. Edit Remove
6
Affects Status Importance Assigned to Milestone
xterm (Ubuntu)
Undecided
Unassigned

Bug Description

UPDATE: The fault seems to be totally random since the same args can succeed sometimes and will segfault on others. See the 2nd comment below.

Binary package hint: xterm

xterm is segfaulting whenever I use more than 9999 scroll lines. I was previously using 50000 lines of scrollback and it worked fine, but now it's broken. I would have to guess that it broke with the latest version (229-1ubuntu1) because it has previously worked for me.

I am running 229-1ubuntu1, I will try to run an older version and see what happens.

Here is the command line I've used for testing, although the colors don't seem to matter:

xterm +vb -sb -sl 5000 -bg black -fg red -fn 7x13bold --> Works
xterm +vb -sb -sl 9999 -bg black -fg red -fn 7x13bold --> Works
xterm +vb -sb -sl 10000 -bg black -fg red -fn 7x13bold --> segfault
xterm +vb -sb -sl 10001 -bg black -fg red -fn 7x13bold --> segfault

I will also try to get a core dump and update the bug.

Matt Fischer (mfisch) wrote :

Two notes:

1) I cannot seem to get a core file. The program is crashing as follows:

mfisch@tadow:~$ xterm +vb -sb -sl 50000 -bg black -fg red -fn 7x13bold
Segmentation fault
mfisch@tadow:~$ echo $?
139

I have looked "all over" for the core file and I have "apport" installed as I found mentioned in the Wiki. It's not in /var/crash either.

2) The bug title is now inaccurate. xterm seems to like some values and not like others. For example:

10000 - works
10001 - segfault
10002 - segfault
9993 - segfault
9992 - segfault
9999 - segfault (sometimes)

I will run this under gdb since this is getting more and more odd.

Matt Fischer (mfisch) wrote :

More notes.

1) I ran run this under the same args and sometimes it will fail and sometimes succeed. I am killing the window after each run, so I am not showing hundreds of windows (and so I'm not out of memory).

In this example, you see the same ags and they fail, then work, then fail!

mfisch@tadow:~$ xterm +vb -sb -sl 10001 -bg black -fg red -fn 7x13bold
Segmentation fault
mfisch@tadow:~$ xterm +vb -sb -sl 10001 -bg black -fg red -fn 7x13bold
mfisch@tadow:~$ xterm +vb -sb -sl 10001 -bg black -fg red -fn 7x13bold
Segmentation fault

2) I noticed that this keeps showing up in .xsession-errors when there is an error. Unfortunately, I'm more of a systems programmer (think commandline), so I'm out of my element on what this means:

X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 19
  Minor opcode: 0
  Resource id: 0x3800010

description: updated

I get similar results with 7.10 on Ubuntu 64-bit. I removed the -sb, -sl, -bg, and -fg parameters from my command line and it seemed to fare better.

I'm brand new here, though, and don't know how to help beyond this.

Mattias Jansson (m-yanson) wrote :

Same problem for me. I just upgraded to Heron, and I've noticed that Xterm sometimes works and sometimes does not. For example, I just tried all the xterm commands which tadowguy filled in in the first post, and they sometimes worked, and sometimes did not. (yes, I re-ran them a couple times).

Right now I've discovered that "xterm +sb" worked four times in a row. It seems to work every time.

$ xterm -sb
Segmentation fault
$ echo $?
139

package name:
$ dpkg -S $(which xterm)
xterm: /usr/bin/xterm

my version of Xterm:
$ xterm -version
XTerm(229)

I cant find a core dump (I've set 'ulimit -c 1024') in pwd nor in /var/crash.

Bryce Harrington (bryce) wrote :

Does it make a difference whether Compiz is running? If turning off Compiz makes the issue go away, my bet is that this is the same as bug 199285. I posted a patch there, which I'd appreciate if someone would test to confirm where the problem is.

Mattias Jansson (m-yanson) wrote :

Yes, turning off desktop effects completely solved the problem. Thanks, I'll look at 199285.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers