amd64/102716: ex with no argument in an xterm gets SIGSEGV

Matt Jacob mjacob at FreeBSD.org
Thu Aug 31 03:50:25 UTC 2006


>Number:         102716
>Category:       amd64
>Synopsis:       ex with no argument in an xterm gets SIGSEGV
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-amd64
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 31 03:50:16 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Matthew Jacob
>Release:        FreeBSD 7.0-CURRENT amd64
>Organization:
Feral Software
>Environment:
System: FreeBSD zorko.in1.lcl 7.0-CURRENT FreeBSD 7.0-CURRENT #16: Wed Aug 30 17:01:55 PDT 2006 mjacob at zorko.in1.lcl:/home/FreeBSD/p4/newisp/amd64/compile/GENERIC amd64


em64t, 8GB 4 logical CPUs (2 phys)

just updated as of yesterday -current

>Description:

Ran ex by mistake with no args. It got a SIGSEGV. vi works.

Ran truss on this (see below) from within a putty xterm emulation.

Here is a truss + stty output:

mmap(0x0,8768,PROT_READ|PROT_WRITE,MAP_ANON,4294967295,0x0) = 34365456384 (0x800574000)
munmap(0x800574000,8768)			 = 0 (0x0)
__sysctl(0x7fffffffe5d0,0x2,0x80067bbe0,0x7fffffffe5c8,0x0,0x0) = 0 (0x0)
mmap(0x0,32768,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,4294967295,0x0) = 34365456384 (0x800574000)
issetugid()					 = 0 (0x0)
open("/etc/libmap.conf",O_RDONLY,0666)		 ERR#2 'No such file or directory'
open("/var/run/ld-elf.so.hints",O_RDONLY,00)	 = 3 (0x3)
read(3,"Ehnt\^A\0\0\0\M^@\0\0\0l\0\0\0\0"...,128) = 128 (0x80)
lseek(3,0x80,SEEK_SET)				 = 128 (0x80)
read(3,"/lib:/usr/lib:/usr/lib/compat:/u"...,108) = 108 (0x6c)
close(3)					 = 0 (0x0)
access("/lib/libncurses.so.6",0)		 = 0 (0x0)
open("/lib/libncurses.so.6",O_RDONLY,0400031735300) = 3 (0x3)
fstat(3,{mode=-r--r--r-- ,inode=25,size=366792,blksize=4096}) = 0 (0x0)
read(3,"\^?ELF\^B\^A\^A\t\0\0\0\0\0\0\0"...,4096) = 4096 (0x1000)
mmap(0x0,1413120,PROT_READ|PROT_EXEC,MAP_PRIVATE|MAP_NOCORE,3,0x0) = 34366554112 (0x800680000)
mprotect(0x8006c6000,4096,PROT_READ|PROT_WRITE|PROT_EXEC) = 0 (0x0)
mprotect(0x8006c6000,4096,PROT_READ|PROT_EXEC)	 = 0 (0x0)
mmap(0x8007c6000,73728,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED,3,0x0) = 34367889408 (0x8007c6000)
mmap(0x8007d8000,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_ANON,4294967295,0x0) = 34367963136 (0x8007d8000)
close(3)					 = 0 (0x0)
access("/lib/libc.so.7",0)			 = 0 (0x0)
open("/lib/libc.so.7",O_RDONLY,0400031735300)	 = 3 (0x3)
fstat(3,{mode=-r--r--r-- ,inode=34,size=1166032,blksize=4096}) = 0 (0x0)
read(3,"\^?ELF\^B\^A\^A\t\0\0\0\0\0\0\0"...,4096) = 4096 (0x1000)
mmap(0x0,2240512,PROT_READ|PROT_EXEC,MAP_PRIVATE|MAP_NOCORE,3,0x0) = 34367967232 (0x8007d9000)
mprotect(0x8008c6000,4096,PROT_READ|PROT_WRITE|PROT_EXEC) = 0 (0x0)
mprotect(0x8008c6000,4096,PROT_READ|PROT_EXEC)	 = 0 (0x0)
mmap(0x8009c6000,118784,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED,3,0x0) = 34369986560 (0x8009c6000)
mmap(0x8009e3000,102400,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_ANON,4294967295,0x0) = 34370105344 (0x8009e3000)
close(3)					 = 0 (0x0)
sysarch(0x81,0x7fffffffe640)			 = 0 (0x0)
mmap(0x0,2752,PROT_READ|PROT_WRITE,MAP_ANON,4294967295,0x0) = 34365489152 (0x80057c000)
munmap(0x80057c000,2752)			 = 0 (0x0)
mmap(0x0,9248,PROT_READ|PROT_WRITE,MAP_ANON,4294967295,0x0) = 34365489152 (0x80057c000)
munmap(0x80057c000,9248)			 = 0 (0x0)
mmap(0x0,47520,PROT_READ|PROT_WRITE,MAP_ANON,4294967295,0x800000000) = 34365489152 (0x80057c000)
munmap(0x80057c000,47520)			 = 0 (0x0)
sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0)
sigprocmask(SIG_SETMASK,0x0,0x0)		 = 0 (0x0)
__sysctl(0x7fffffffe428,0x2,0x8009e7e60,0x7fffffffe420,0x0,0x0) = 0 (0x0)
__sysctl(0x7fffffffe3c0,0x2,0x8009f8b98,0x7fffffffe3b8,0x0,0x0) = 0 (0x0)
__sysctl(0x7fffffffe3e8,0x2,0x7fffffffe3dc,0x7fffffffe3e0,0x0,0x0) = 0 (0x0)
readlink("/etc/malloc.conf",0x7fffffffe450,1024) ERR#2 'No such file or directory'
issetugid()					 = 0 (0x0)
mmap(0x0,4194304,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,4294967295,0x800000000) = 34370207744 (0x8009fc000)
munmap(0x8009fc000,16384)			 = 0 (0x0)
munmap(0x800c00000,2080768)			 = 0 (0x0)
mmap(0x0,4194304,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,4294967295,0x800000000) = 34372321280 (0x800c00000)
munmap(0x800e00000,2097152)			 = 0 (0x0)
ioctl(0,TIOCGETA,0x7fffffffe8a0)		 = 0 (0x0)
ioctl(0,TIOCGETA,0x800c10504)			 = 0 (0x0)
issetugid()					 = 0 (0x0)
getuid()					 = 31154 (0x79b2)
geteuid()					 = 31154 (0x79b2)
issetugid()					 = 0 (0x0)
getuid()					 = 31154 (0x79b2)
geteuid()					 = 31154 (0x79b2)
access("/home/mjacob/.terminfo/x/xterm",4)	 ERR#2 'No such file or directory'
access("/usr/share/misc/terminfo/x/xterm",4)	 ERR#2 'No such file or directory'
issetugid()					 = 0 (0x0)
stat("/home/mjacob/.termcap.db",0x7fffffffd860)	 ERR#2 'No such file or directory'
open("/home/mjacob/.termcap.db",O_RDONLY,00)	 ERR#2 'No such file or directory'
open("/home/mjacob/.termcap",O_RDONLY,00)	 ERR#2 'No such file or directory'
stat("/usr/share/misc/termcap.db",{mode=-r--r--r-- ,inode=1981155,size=1327104,blksize=4096}) = 0 (0x0)
open("/usr/share/misc/termcap.db",O_RDONLY,00)	 = 3 (0x3)
fcntl(3,F_SETFD,FD_CLOEXEC)			 = 0 (0x0)
read(3,"\0\^F\^Ua\0\0\0\^B\0\0\^D\M-R\0"...,260) = 260 (0x104)
lseek(3,0x3b000,SEEK_SET)			 = 241664 (0x3b000)
read(3," \0\M-n\^O\M-"\^N\M^]\^Nu\^Nq\^N"...,4096) = 4096 (0x1000)
lseek(3,0x2e000,SEEK_SET)			 = 188416 (0x2e000)
read(3,"\^Z\0\M-K\^O\M^B\^O|\^O:\^O\^S"...,4096) = 4096 (0x1000)
close(3)					 = 0 (0x0)
ioctl(1,TIOCGETA,0x7fffffffe470)		 ERR#25 'Inappropriate ioctl for device'
ioctl(2,TIOCGETA,0x7fffffffe440)		 ERR#25 'Inappropriate ioctl for device'
ioctl(2,TIOCGWINSZ,0x7fffffffe8a0)		 ERR#25 'Inappropriate ioctl for device'
fstat(1,{mode=-rw-rw-r-- ,inode=6,size=4871,blksize=4096}) = 0 (0x0)
sigaction(SIGHUP,{ 0x403ff0 0x0 ss_t },{ SIG_DFL 0x0 ss_t }) = 0 (0x0)
sigaction(SIGINT,{ 0x404010 0x0 ss_t },{ SIG_DFL 0x0 ss_t }) = 0 (0x0)
sigaction(SIGTERM,{ 0x404030 0x0 ss_t },{ SIG_DFL 0x0 ss_t }) = 0 (0x0)
sigaction(SIGWINCH,{ 0x404050 0x0 ss_t },{ SIG_DFL 0x0 ss_t }) = 0 (0x0)
open("/usr/share/vi/catalog/",O_NONBLOCK,00)	 = 3 (0x3)
issetugid()					 = 0 (0x0)
sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGTRAP|SIGABRT|SIGEMT|SIGFPE|SIGKILL|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0)
gettimeofday({1156994135.851836},0x0)		 = 0 (0x0)
getpid()					 = 808 (0x328)
open("/dev/urandom",O_RDONLY,00)		 = 4 (0x4)
read(4,"H:\f\M^S\M-~\M-,\M-2\M^P\^E\M-[6"...,108) = 108 (0x6c)
close(4)					 = 0 (0x0)
stat("/tmp",{mode=drwxrwxrwt ,inode=2,size=512,blksize=4096}) = 0 (0x0)
open("/tmp/bt.klSS2CyD2m",O_RDWR|O_CREAT|O_EXCL,0600) = 4 (0x4)
unlink("/tmp/bt.klSS2CyD2m")			 = 0 (0x0)
sigprocmask(SIG_SETMASK,0x0,0x0)		 = 0 (0x0)
fcntl(4,F_SETFD,FD_CLOEXEC)			 = 0 (0x0)
fstat(4,{mode=-rw------- ,inode=8,size=0,blksize=4096}) = 0 (0x0)
fstat(4,{mode=-rw------- ,inode=8,size=0,blksize=4096}) = 0 (0x0)
lseek(3,0x0,SEEK_CUR)				 = 0 (0x0)
fstat(3,{mode=drwxr-xr-x ,inode=1978818,size=1536,blksize=4096}) = 0 (0x0)
getdtablesize()					 = 11095 (0x2b57)
fcntl(3,F_GETFL,)				 = 4 (0x4)
fstat(3,{mode=drwxr-xr-x ,inode=1978818,size=1536,blksize=4096}) = 0 (0x0)
read(3,"\M-B1\^^\0\f\0\^D\^A.\0\0\0\^S0"...,4096) = 1536 (0x600)
close(3)					 = 0 (0x0)
close(4)					 = 0 (0x0)
stat("/etc/vi.exrc",0x7fffffffe600)		 ERR#2 'No such file or directory'
stat("/home/mjacob/.nexrc",0x7fffffffe600)	 ERR#2 'No such file or directory'
stat("/home/mjacob/.exrc",0x7fffffffe600)	 ERR#2 'No such file or directory'
stat("/tmp",{mode=drwxrwxrwt ,inode=2,size=512,blksize=4096}) = 0 (0x0)
open("/tmp/vi.pBc9fHHYEs",O_RDWR|O_CREAT|O_EXCL,0600) = 3 (0x3)
close(3)					 = 0 (0x0)
gettimeofday({1156994135.861819},0x0)		 = 0 (0x0)
stat("/var/tmp/vi.recover",{mode=drwxrwxrwt ,inode=188417,size=512,blksize=4096}) = 0 (0x0)
stat("/var/tmp/vi.recover",{mode=drwxrwxrwt ,inode=188417,size=512,blksize=4096}) = 0 (0x0)
open("/var/tmp/vi.recover/vi.2cY1G6",O_RDWR|O_CREAT|O_EXCL,0600) = 3 (0x3)
chmod("/var/tmp/vi.recover/vi.2cY1G6",0700)	 = 0 (0x0)
close(3)					 = 0 (0x0)
open("/tmp/vi.pBc9fHHYEs",O_NONBLOCK,0666)	 = 3 (0x3)
open("/var/tmp/vi.recover/vi.2cY1G6",O_RDWR,0600) = 4 (0x4)
fcntl(4,F_SETFD,FD_CLOEXEC)			 = 0 (0x0)
fstat(4,{mode=-rwx------ ,inode=188426,size=0,blksize=4096}) = 0 (0x0)
fstat(4,{mode=-rwx------ ,inode=188426,size=0,blksize=4096}) = 0 (0x0)
lseek(3,0x0,SEEK_CUR)				 = 0 (0x0)
fstat(3,{mode=-rw------- ,inode=8,size=0,blksize=4096}) = 0 (0x0)
issetugid()					 = 0 (0x0)
sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGTRAP|SIGABRT|SIGEMT|SIGFPE|SIGKILL|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0)
stat("/tmp",{mode=drwxrwxrwt ,inode=2,size=512,blksize=4096}) = 0 (0x0)
open("/tmp/bt.Vh4elGw1GS",O_RDWR|O_CREAT|O_EXCL,0600) = 5 (0x5)
unlink("/tmp/bt.Vh4elGw1GS")			 = 0 (0x0)
sigprocmask(SIG_SETMASK,0x0,0x0)		 = 0 (0x0)
fcntl(5,F_SETFD,FD_CLOEXEC)			 = 0 (0x0)
fstat(5,{mode=-rw------- ,inode=9,size=0,blksize=4096}) = 0 (0x0)
fstat(5,{mode=-rw------- ,inode=9,size=0,blksize=4096}) = 0 (0x0)
flock(0x3,0x6)					 = 0 (0x0)
fcntl(3,F_SETFD,FD_CLOEXEC)			 = 0 (0x0)
ioctl(0,TIOCSETAW,0x7fffffffe5e0)		 = 0 (0x0)
SIGNAL 11 (SIGSEGV)
SIGNAL 11 (SIGSEGV)
Process stopped because of:  16
process exit, rval = 11

-----------------------------------
speed 9600 baud; 66 rows; 80 columns;
lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl
	-echoprt -altwerase -noflsh -tostop -flusho pendin -nokerninfo
	-extproc
iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel -ignbrk
	brkint -inpck -ignpar -parmrk
oflags: opost onlcr -ocrnl -oxtabs -onocr -onlret
cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow
	-dtrflow -mdmbuf
cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;
	eol2 = <undef>; erase = ^?; erase2 = ^H; intr = ^C; kill = ^U;
	lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q;
	status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W;
-----------------------------------
BASH=/bin/csh
BASH_ARGC=()
BASH_ARGV=()
BASH_LINENO=()
BASH_SOURCE=()
BASH_VERSINFO=([0]="3" [1]="1" [2]="17" [3]="0" [4]="release" [5]="amd64-portbld-freebsd7.0")
BASH_VERSION='3.1.17(0)-release'
BLOCKSIZE=K
CDSTACK=40
COLUMNS=80
CSHRC_RUN=1
CVSEDITOR=vi
CVS_RSH=ssh
DIRSTACK=()
EDITOR=vi
EUID=31154
FCEDIT=emacs
FTP_PASSIVE_MODE=YES
GROUP=eng
GROUPS=()
HISTFILESIZE=200
HISTSIZE=200
HOST=zorko.in1.lcl
HOSTNAME=zorko.in1.lcl
HOSTTYPE=FreeBSD
IFS=$' \t\n'
IGNOREEOF=10
LINES=66
MACHTYPE=unknown
MJARCH=FreeBSD-amd64
OLDPWD=/home/FreeBSD/p4/newisp/amd64/compile/GENERIC
OPENWINHOME=/usr/openwin
OPTERR=1
OPTIND=1
OSTYPE=FreeBSD
P4CONFIG=P4ENV
PIPESTATUS=([0]="0")
PPID=752
PS1='zorko.in1.lcl > '
PS2='>'
PS3='=> '
PS4='+ '
PWD=/home/FreeBSD/p4/newisp/dev/isp
REMOTEHOST=beppo.in1.lcl
SHELL=/usr/local/bin/bash
SHELLOPTS=braceexpand:emacs:hashall:histexpand:ignoreeof:interactive-comments:monitor
SHLVL=2
SSH_CLIENT='172.16.1.79 64853 22'
SSH_CONNECTION='172.16.1.79 64853 172.16.1.5 22'
SSH_TTY=/dev/ttyp0
SYSV=false
TAPE=/dev/nsa0
TERM=xterm
TMPDIR=/tmp
UID=31154
VENDOR=unknown
VISUAL=vi
XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB
_=-a
bash_INTERACTIVE=true
dt=/usr/dt

>How-To-Repeat:
	see above.
>Fix:

	


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-amd64 mailing list