30 sec wait on CHAIN/RUN
by Steve Bywaters » Fri, 24 Oct 2003 13:35:54 GMT
I have a problem where I am trying to restart the same program upon
completion, using Chain or Run
When the user changes certain settings, I terminate the program. At the very
last embed (Program end) I have tried issuing CHAIN('MyProg.exe') (and/or
RUN("MyProg.exe", 0) - but there is a 30 sec delay before it actually
starts.. nothing is happening (apart from 100% cpu!!), no file activity..
just waiting!
So I tried to call an intermediate program, whose function was simply to
call the main program.
So MyProg.exe (on termination) called Launcher.exe (via Chain or Run), which
simply executed a RUN("MyProg.exe", 0)
Same result - big wait.
This is running on W2k, and I notice that while the delay is occuring, all 3
program ( 2 x MyProg, 1 x Launcher) are still in memory, and the 99% cpu
utilisation is from the *new* copy of MyProg.exe (as far as I can tell).
If I replace launcher.exe with Launcher.bat, I get the result I expected
(quick start).
Any thoughts, anyone?
Steve
30 sec wait on CHAIN/RUN
by Terkild » Fri, 24 Oct 2003 16:00:15 GMT
Steve> Any thoughts, anyone?
Only that I can confirm your issue also exists when using
RUN("MyProg.exe",1) - yesterday (C55EE07).
The second time RUN is executed it results in these stupid idle delays ...
on a WinXP-SP2 box.
Is this also a C6 CR6 issue - anyone at EA care to comment ?
Terkild
Re: 30 sec wait on CHAIN/RUN
by Steve Bywaters » Fri, 24 Oct 2003 17:25:22 GMT
Setting the second paraneter to 1 will cause a wait - s/be zero (or leave
out, for default)
Re: 30 sec wait on CHAIN/RUN
by Terkild » Fri, 24 Oct 2003 22:10:32 GMT
Please note my reply was to Steve who wrote :
very
which
3
Wether it is RUN("MyProg.exe",0) - as Steve does - or RUN("MyProg.exe",1)
as I do doesn't matter .... The delay is there - of course in my case after
"MyProg.exe" finishes and are rerun.
Maybe its got something to do with what "MyProg.exe" is doing or exiting ??
Therefore : Is this also a C6 CR6 issue - anyone at EA care to comment ?
Terkild
....
return
the
....
Re: 30 sec wait on CHAIN/RUN
by Andy Morgan » Fri, 24 Oct 2003 22:35:18 GMT
Terklid - This is not a clarion issue in c55. I use it all the time. Using
a zero instead of a 1, my program restarts instantly on W2k sp2
Andy
(and/or
activity..
all
after
??
RUN
statement
Re: 30 sec wait on CHAIN/RUN
by Derek Noffke » Fri, 24 Oct 2003 22:41:36 GMT
oes your 'MyProg.exe' open files or is the file opening done by threads
from the main?
I have found that opening a second handle on files can be suprisingly slow.
Derek Noffke
CapeSoft
"Andy Morgan" < XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...
Using
the
to
cpu
tell).
expected
RUN("MyProg.exe",1)
delays
to
delays
Re: 30 sec wait on CHAIN/RUN
by Andy Morgan » Fri, 24 Oct 2003 23:02:58 GMT
Derek Noffke" < XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...
slow.
Good thought - My app opens to a source procedure with no tables (just
checks resolution) and then calls my main procedure with data. That may be
it. I will have to remember that.
Andy
actually
simply
Run),
occuring,
exiting
?
whether
immediately
execution."
Re: 30 sec wait on CHAIN/RUN
by Steve Bywaters » Sat, 25 Oct 2003 09:16:13 GMT
es, main program opens files.. but so what? <g>
ie, what is the mechanism that's blocking for 30sec?
If a program terminates, then it *terminates*... closing files...etc
In my case Myprog closes and chains (Launcher - which opens NO FILES, Source
proc).. which then terminates and runs MyProg.
Don't get it.....
Steve
"Derek Noffke" < XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...
slow.
actually
simply
Run),
occuring,
exiting
?
whether
immediately
execution."
Re: 30 sec wait on CHAIN/RUN
by Steve Bywaters » Sat, 25 Oct 2003 11:31:47 GMT
k.. whatever the mechanism (and I don't understand).. if I explictly close
every table before issuing the CHAIN call then it works!
MyProg.exe directly CHAINS to MyProg.exe
Thanks for that..... now tell me why? <BG>
Steve
"Derek Noffke" < XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...
slow.
actually
simply
Run),
occuring,
exiting
?
whether
immediately
execution."
Re: 30 sec wait on CHAIN/RUN
by Terkild » Sat, 25 Oct 2003 15:49:25 GMT
> Ok.. whatever the mechanism (and I don't understand).. if I explictly
close
Yes please. Derek and Steves observation with RUN('MyProg.exe',0) must be
reproducable.
MyProg.exe does not open tables or files ... despite of that
RUN('MyProg.exe',1) is slow on closedown the second time its called - but
never when called from Explorer. Why ?
Terkild
Re: 30 sec wait on CHAIN/RUN
by Derek Noffke » Sat, 25 Oct 2003 17:09:01 GMT
our second (chained) exe was requesting access to files that the original
exe had open.
Now this is where the guessing starts.
I have found that often servers give you very fast access to the first
handle on a file but then slow down once multiple handles are opened onto
the file.
Even worse under some circumstances the server may delay opening the second
handle for 35 secs (default oplock break timeout)
This might be related to "oplock" settings. see msdn for lots of detail.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/types_of_opportunistic_locks.asp
Derek Noffke
CapeSoft
"Steve Bywaters" < XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...
close
upon
At
99%
case
comment
returns
Similar Threads:
1.Printing delay 30 Sec in Win2k
2.Tiffany Key Chains,Tiffany Cuff licks,Tiffany Packaging,"Tiffany Key Chains"+"Tiffany Cuff licks"+"Tiffany Packaging"
3.object-wait-multiple - timing out long running thunks
DrScheme has a form
(object-wait-multiple timeout thunk)
which returns #f is thunk fails to return within timeout secs, or
returns the value of thunk
are there any similar constructs in openmcl or sbcl?
thanks
Chris Wright
4.LOOP and WAIT (was: POLL and WAIT !)
hutch-- wrote:
[snipped]
You mean LOOP?
--
Regards
Alex McDonald
5.How to make "fork/wait" to WAIT longer?
Hi All,
I encountered a funny thing, and my code schetch as below:
#define READ 0
#define WRITE 1
int byteRead, status, pd[2];
char buff[100];
pipe(pd);
if (fork()) {
wait(&status);
byteRead = read(pd[READ], buff, 100);
buff[byteRead] = '\0';
} else {
close(WRITE);
dup(pd[WRITE]);
execl("./c_executable", argv1, argv2, NULL);
}
This piece of code works very well for years for me. However, when my
c_executable got slightly heavier work load (a number of hash and
processing, and tesed thoroghly), it was broken. While I replaced
c_executable with lighter work load, it worked again. I am puzzled:
does the fork/wait pair has a timeout that terminates the child
process of execl()? If not, why a heavier work load in child process
failed? If yes, how to make the wait() to WAIT longer? If it is not
the issue of timeout, what is the kicker behind?
Thanks!
Huey
6. why "vwait ever" always report "can not wait for variable ever, would wait forever" on linux
7. 360/30 memory
8. 360/30 memory (was 64 gig memory)