Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
zsh bug-hang on startup after exec
- X-seq: zsh-workers 13693
- From: Ryan Richter <bobort@xxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: zsh bug-hang on startup after exec
- Date: Wed, 21 Mar 2001 13:25:00 -0800 (PST)
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- Reply-to: bobort@xxxxxxxxxxx
- Sender: bobort@xxxxxxxxxxxxxxxxxxxx
I had been using bash as my login shell, and had it set up to exec zsh. I just
upgraded zsh from 3.1.6 to 3.1.9, and when I log in, zsh hangs immediately
after being execed, before it even processes the startup scripts. This does
not happen if bash just runs zsh instead of execing it, and it no longer
happens now that zsh is my login shell. Also it does not happen if I run bash
interactively and exec zsh.
Fortunately(?) the hanging behavior persisted when I had bash do:
exec strace zsh 2>strace.out
Here are the results:
execve("/usr/local/bin/zsh", ["zsh"], [/* 21 vars */]) = 0
brk(0) = 0x80af778
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40014000
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_ISGID|S_ISVTX|0464, st_size=0, ...}) = 0
mmap(0, 27685, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40015000
close(3) = 0
open("/lib/libdl.so.2", O_RDONLY) = 3
fstat(3, {st_mode=0, st_size=0, ...}) = 0
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3"..., 4096) = 4096
mmap(0, 12428, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4001c000
mprotect(0x4001e000, 4236, PROT_NONE) = 0
mmap(0x4001e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1000)
= 0x4001e000
close(3) = 0
open("/lib/libnsl.so.1", O_RDONLY) = 3
fstat(3, {st_mode=0, st_size=0, ...}) = 0
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3"..., 4096) = 4096
mmap(0, 88104, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40020000
mprotect(0x40032000, 14376, PROT_NONE) = 0
mmap(0x40032000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x11000)
= 0x40032000
mmap(0x40034000, 6184, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) =
0x40034000
close(3) = 0
open("/lib/libtermcap.so.2", O_RDONLY) = 3
fstat(3, {st_mode=0, st_size=0, ...}) = 0
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3"..., 4096) = 4096
mmap(0, 12520, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40036000
mprotect(0x40038000, 4328, PROT_NONE) = 0
mmap(0x40038000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1000)
= 0x40038000
close(3) = 0
open("/lib/libm.so.6", O_RDONLY) = 3
fstat(3, {st_mode=0, st_size=0, ...}) = 0
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3"..., 4096) = 4096
mmap(0, 117208, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4003a000
mprotect(0x40056000, 2520, PROT_NONE) = 0
mmap(0x40056000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1b000)
= 0x40056000
close(3) = 0
open("/lib/libc.so.6", O_RDONLY) = 3
fstat(3, {st_mode=0, st_size=0, ...}) = 0
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3"..., 4096) = 4096
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40057000
mmap(0, 1001532, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40058000
mprotect(0x40145000, 30780, PROT_NONE) = 0
mmap(0x40145000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0xec000) = 0x40145000
mmap(0x40149000, 14396, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0)
= 0x40149000
close(3) = 0
mprotect(0x40058000, 970752, PROT_READ|PROT_WRITE) = 0
mprotect(0x40058000, 970752, PROT_READ|PROT_EXEC) = 0
munmap(0x40015000, 27685) = 0
personality(0 /* PER_??? */) = 0
getpid() = 20122
brk(0) = 0x80af778
brk(0x80af7b0) = 0x80af7b0
brk(0x80b0000) = 0x80b0000
getuid() = 500
geteuid() = 500
getgid() = 500
getegid() = 500
ioctl(0, TCGETS, {B9600 opost isig icanon echo ...}) = 0
ioctl(0, TCGETS, {B9600 opost isig icanon echo ...}) = 0
ioctl(0, TCGETS, {B9600 opost isig icanon echo ...}) = 0
brk(0x80b2000) = 0x80b2000
readlink("/proc/self/fd/0", "/dev/ttyp0", 4095) = 10
open("/dev/ttyp0", O_RDWR|O_NOCTTY|0x8000) = 3
fcntl(3, F_DUPFD, 10) = 10
close(3) = 0
fcntl(10, F_GETFL) = 0x8002 (flags O_RDWR|0x8000)
recvmsg(10, 0xbffff86c, 0x40148d40) = -1 ENOSYS (Function not implemented)
fstat(10, {st_mode=S_ISVTX|0400, st_size=0, ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40015000
ioctl(10, TCGETS, {B9600 opost isig icanon echo ...}) = 0
_llseek(0xa, 0, 0, 0xbffff8ac, 0x1) = -1 ESPIPE (Illegal seek)
munmap(0x40015000, 4096) = 0
ioctl(10, TCGETS, {B9600 opost isig icanon echo ...}) = 0
getpgrp() = 20120
ioctl(10, TIOCGPGRP, [20121]) = 0
SYS_175(0, 0xbffff96c, 0xbffff8ec, 0x8, 0) = 0
SYS_174(0x11, 0, 0xbffff6f0, 0x8, 0x11) = 0
SYS_175(0x2, 0xbffff8ec, 0, 0x8, 0x2) = 0
nanosleep(0xbffff858, 0xbffff858, 0x401481cc, 0xbffff858, 0xbffff96c) = 0
getpgrp() = 20120
ioctl(10, TIOCGPGRP, [20121]) = 0
kill(-20120, SIGTTIN) = 0
--- SIGTTIN (Stopped (tty input)) ---
getpgrp() = 20120
ioctl(10, TIOCGPGRP, [20121]) = 0
SYS_175(0, 0xbffff96c, 0xbffff8ec, 0x8, 0) = 0
SYS_174(0x11, 0, 0xbffff6f0, 0x8, 0x11) = 0
SYS_175(0x2, 0xbffff8ec, 0, 0x8, 0x2) = 0
nanosleep(0xbffff858, 0xbffff858, 0x401481cc, 0xbffff858, 0xbffff96c) = 0
getpgrp() = 20120
ioctl(10, TIOCGPGRP, [20121]) = 0
kill(-20120, SIGTTIN) = 0
--- SIGTTIN (Stopped (tty input)) ---
getpgrp() = 20120
ioctl(10, TIOCGPGRP, [20121]) = 0
SYS_175(0, 0xbffff96c, 0xbffff8ec, 0x8, 0) = 0
SYS_174(0x11, 0, 0xbffff6f0, 0x8, 0x11) = 0
SYS_175(0x2, 0xbffff8ec, 0, 0x8, 0x2) = 0
nanosleep(0xbffff858, 0xbffff858, 0x401481cc, 0xbffff858, 0xbffff96c) = 0
getpgrp() = 20120
ioctl(10, TIOCGPGRP, [20121]) = 0
kill(-20120, SIGTTIN) = 0
--- SIGTTIN (Stopped (tty input)) ---
These last 10 lines (between getpgrp() and getting SIGTTIN) repeat ad
infinitum. SYS_174 and SYS_175 are rt_sigaction and rt_sigprocmask
respectively (dunno why strace doesn't know that...).
Anyway, this is a linux 2.2.19 i686 system with glibc 2.1.3, and zsh was
compiled with egcs 1.1.2.
And thanks for the cool shell :)
--
Ryan
Messages sorted by:
Reverse Date,
Date,
Thread,
Author