zsh-workers
 help / color / mirror / code / Atom feed
From: Ryan Richter <bobort@abacus.dorm.reed.edu>
To: zsh-workers@sunsite.auc.dk
Subject: zsh bug-hang on startup after exec
Date: Wed, 21 Mar 2001 13:25:00 -0800 (PST)	[thread overview]
Message-ID: <XFMail.20010321132500.bobort@abacus.dorm.reed.edu> (raw)

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


             reply	other threads:[~2001-03-21 21:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-21 21:25 Ryan Richter [this message]
2001-03-22  1:01 ` Bart Schaefer
2001-03-22  1:56   ` Ryan Richter
2001-03-22 16:56     ` Bart Schaefer
2001-03-22 17:02       ` Ryan Richter
2001-03-25 21:07         ` Bart Schaefer
2001-03-25 22:34           ` Ryan Richter
2001-03-28  5:48             ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=XFMail.20010321132500.bobort@abacus.dorm.reed.edu \
    --to=bobort@abacus.dorm.reed.edu \
    --cc=bobort@bigfoot.com \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).