From: "Steve Simon" <steve@quintile.net>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] wait race?
Date: Sat, 16 Dec 2006 14:55:24 +0000 [thread overview]
Message-ID: <2b459c3d79844876c01956749cc7c35c@quintile.net> (raw)
In-Reply-To: <ee9e417a0612151812r74d8e0b4ka955dc57509d523a@mail.gmail.com>
>> for(i in `{seq 1 $n}){echo fu>/dev/null&}
> If you can reproduce the "hang", can you run ps and see if
> the pid that rc is waiting for.
I can reproduce this quite easily, with n=150,
one time in three the script hangs.
Waitfor seems to be waiting for a proc which has already exited.
felix% acid 63541
/proc/63541/text:386 plan 9 executable
/sys/lib/acid/port
/sys/lib/acid/386
acid: lstk()
await()+0x7 /sys/src/libc/9syscall/await.s:5
wait()+0x1b /sys/src/libc/9sys/wait.c:13
buf=0x35323536
fld=0xdfffcc04
l=0x33930
w=0x33938
Waitfor(pid=0xff7e)+0xb4 /sys/src/cmd/rc/plan9.c:210
w=0x33938
p=0x36538
errbuf=0x33b4c
Xbackq()+0x158 /sys/src/cmd/rc/havefork.c:120
wd=0x303531
ewd=0xdfffeeef
stop=0x1d958
pfd=0x5
f=0x33938
s=0xdfffceef
v=0x36538
c=0xa
pid=0xff7e
main(argc=0x1,argv=0xdfffefb4)+0x327 /sys/src/cmd/rc/exec.c:184
...
0xff7e == 65406
felix% ps
...
steve 63540 0:00 0:00 252K Await rc
steve 63541 0:00 0:00 252K Await rc
steve 63546 0:00 0:00 164K Pread stats
steve 63547 0:00 0:00 168K Pread stats
steve 63548 0:00 0:00 140K Pread clock
steve 63549 0:00 0:00 140K Sleep clock
steve 63550 0:00 0:00 376K Sleep faces
steve 63551 0:00 0:00 376K Pread faces
steve 63805 0:00 0:00 1116K Await rio
steve 63806 0:00 0:00 252K Await rc
steve 63807 0:00 0:00 124K Pread nedmail
steve 63960 0:00 0:00 1116K Await rio
steve 63961 0:00 0:00 252K Await rc
steve 65153 0:00 0:00 8K Sleep sleep
steve 65226 0:00 0:00 1116K Await rio
steve 65227 0:00 0:00 252K Await rc
steve 65228 0:00 0:00 228K Pread sam
steve 65229 0:00 0:00 320K Rendez samterm
steve 65230 0:00 0:00 320K Pread samterm
steve 65231 0:00 0:00 320K Pread samterm
steve 65232 0:00 0:00 320K Pread samterm
steve 65233 0:00 0:00 320K Pread samterm
steve 65251 0:00 0:00 1116K Await rio
steve 65252 0:00 0:00 252K Await rc
steve 65253 0:00 0:00 124K Pread nedmail
steve 65419 0:00 0:00 200K Pread ps
felix%
prev parent reply other threads:[~2006-12-16 14:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-15 23:08 erik quanstrom
2006-12-15 23:46 ` matt
2006-12-16 0:51 ` geoff
2006-12-16 1:11 ` matt
2006-12-17 16:24 ` [9fans] ,m0 Matt
2006-12-17 16:40 ` Rob Pike
2006-12-17 16:41 ` Rob Pike
2006-12-17 17:01 ` Matt
2006-12-17 17:03 ` Paul Lalonde
2006-12-17 23:07 ` Bruce Ellis
2006-12-16 2:12 ` [9fans] wait race? Russ Cox
2006-12-16 3:26 ` erik quanstrom
2006-12-16 4:43 ` Russ Cox
2006-12-16 14:55 ` Steve Simon [this message]
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=2b459c3d79844876c01956749cc7c35c@quintile.net \
--to=steve@quintile.net \
--cc=9fans@cse.psu.edu \
/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.
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).