[Swift-user] Deep recursion on subroutine "main::stageout" at /home/ketan/work/worker.pl line 1349

Michael Wilde wilde at mcs.anl.gov
Wed May 23 13:10:14 CDT 2012


Do you have a sense as to whats better: a closed stdin, or a stdin opened to /dev/null?

In this case, the app worked OK with stdin redirected from /dev/null, but failed with the closed stdin.

I guess we could leave the closed stdin semantics as-is, but make them consistent across all providers, and remedy apps that fail in that mode with the same solution we used here, stdin="/dev/null" on the app cmd line.

- Mike


----- Original Message -----
> From: "Mihael Hategan" <hategan at mcs.anl.gov>
> To: "Ketan Maheshwari" <ketancmaheshwari at gmail.com>
> Cc: "Michael Wilde" <wilde at mcs.anl.gov>, "Swift User" <swift-user at ci.uchicago.edu>
> Sent: Wednesday, May 23, 2012 1:01:43 PM
> Subject: Re: [Swift-user] Deep recursion on subroutine "main::stageout" at /home/ketan/work/worker.pl line 1349
> Good point. It probably should be there.
> 
> I first saw it in Globus somewhere. The rationale for it was that
> there
> are applications that, given a stdin, may hang waiting for user input
> (which is useless when the app is running on some remote cluster),
> whereas a closed stdin might determine them to go ahead and do
> whatever
> it is that they do without user input.
> 
> I'm assuming that Globus folks have actually seen this behavior before
> putting the respective piece of code in there.
> 
> Mihael
> 
> On Wed, 2012-05-23 at 09:59 -0400, Ketan Maheshwari wrote:
> > Just a note that this behavior (closed stdin) is not seen in the
> > local
> > execution provider.
> >
> > On Tue, May 22, 2012 at 11:00 PM, Michael Wilde <wilde at mcs.anl.gov>
> > wrote:
> >         Thanks, Mihael - strace solved the mystery. Turns out that
> >         when Swift runs an app, it closes stdin unless you specify
> >         stdin= in the app command line body.
> >
> >         This confused the MARS app, likely around the logic where it
> >         was reading the license file. (It seemed to be checking if
> >         stdin was a tty?) So it was failing even before it tried to
> >         open the license file.
> >
> >         The remedy was to specify stdin="/dev/null" on the app cmd
> >         body.
> >
> >         - Mike
> >
> >
> >         ----- Original Message -----
> >
> >         > From: "Mihael Hategan" <hategan at mcs.anl.gov>
> >         > To: "Ketan Maheshwari" <ketancmaheshwari at gmail.com>
> >         > Cc: "Michael Wilde" <wilde at mcs.anl.gov>, "Swift User"
> >         <swift-user at ci.uchicago.edu>
> >
> >         > Sent: Tuesday, May 22, 2012 8:37:56 PM
> >         > Subject: Re: [Swift-user] Deep recursion on subroutine
> >         "main::stageout" at /home/ketan/work/worker.pl line 1349
> >
> >         > On Tue, 2012-05-22 at 20:54 -0400, Ketan Maheshwari wrote:
> >         > > Mihael,
> >         > >
> >         > >
> >         > > As far as I know there is no environment setup required
> >         before
> >         > > running
> >         > > mars.
> >         > >
> >         >
> >         > There's an easy way to check. Type env after you verified
> >         that you
> >         > were
> >         > able to run the app and paste the output here.
> >         >
> >         > Also, you can strace the app from the wrapper and then we
> >         can see
> >         > where
> >         > it's looking for that file.
> >         >
> >         > Mihael
> >
> >
> >         --
> >         Michael Wilde
> >         Computation Institute, University of Chicago
> >         Mathematics and Computer Science Division
> >         Argonne National Laboratory
> >
> >
> >
> >
> >
> >
> > --
> > Ketan
> >
> >

-- 
Michael Wilde
Computation Institute, University of Chicago
Mathematics and Computer Science Division
Argonne National Laboratory




More information about the Swift-user mailing list