[Swift-devel] 0.7rc1 + local coasters + communicado

Mihael Hategan hategan at mcs.anl.gov
Wed Nov 5 15:00:28 CST 2008


On Wed, 2008-11-05 at 20:36 +0000, Ben Clifford wrote:
> The below one-liner seems to fix hanging on my laptop. I didn't commit in 
> case I'm missing something in the logic, but I think its ok:
> 
> 
> --- 
> src/org/globus/cog/abstraction/impl/execution/local/JobSubmissionTaskHandler.java   
> (revision 2257)
> +++ 
> src/org/globus/cog/abstraction/impl/execution/local/JobSubmissionTaskHandler.java   
> (working copy)
> @@ -342,6 +342,7 @@
>                  boolean any = processPairs();
>                  if (processDone()) {
>                      closePairs();
> +                    return;

Right. That's how it's supposed to be.

>                  }
>                  else {
>                      if (!any) 
> 
> 
> 
> Also, though I don't see that it would cause a lock, this looks wrong:
> 
>                 int avail = sp.is.available();
>                 if (avail > 0) {
>                     any = true;
>                     int len = sp.is.read();
>                     sp.os.write(buf, 0, len);
>                 }
> 

Also right. It's supposed to be sp.is.read(buf).

Fixed these in r2259.

> 
> InputStream.read() with no parameter returns the read byte, not a buffer 
> length. read(buf, offset, len) is perhaps what is intended - I think at 
> present its going to send out big wads of empty space instead of stream 
> content.
> 
> Also, I was wrong about it passing on the nmi buid and test system - that 
> test is still queued to run at the moment.

I was about to be surprised that NMI computers have found a way of
gracefully exiting an infinite loop.




More information about the Swift-devel mailing list