The amount of time it takes before failure is arbitrary.

I've seen it happen after half an hour of user time (using the unix time
command on jconsole). I've seen it happen after a fraction of a second of
user time (but only once). Right now, it's not happening at all. I've seen
it happen a total of maybe 10-20 times.

My impression was that this error prevented the underlying command from
executing (I'm using it to make a directory, and I believe I remember that
the directory was not being created, in the instance I spent significant
time investigating - but, since it's a debugging effort I need to be
paranoid about my own capability for mistakes, and I might have
misinterpreted something or misremembered something).

That's a good observation, that it's making a temp file and writing to it.
The magic number 5, though, is just the length of that string that prefixes
the tempname (looks like 3 space indent followed by '> ',tmpname).

Anyways, I imagine that the reason it writes to file instead of using a
pipe is code simplicity.

Thanks,

-- 
Raul


On Wed, Mar 12, 2014 at 9:16 PM, Joe Bogner <[email protected]> wrote:

> A couple troubleshooting questions come to mind:
>
> Is it consistently failing after 10K requests?
>
> Once it fails, is 2!:0 effectively broke for the j process and it must
> be restarted? Or does 2!:0 work for other commands?
>
> I'm somewhat baffled by what 2!:0 is actually doing. It seems to be
> redirecting the system command to a temporary file and reading from
> the file.  I can't figure out by looking at it how the tmpnam gets
> added to the system command.  I'm used to seeing popen
>
>
> https://github.com/openj/core/blob/18fd23bbdc2f50770eb3047e978cd5e4e3b47039/xh.c#L39
>
> I'm also suspect of the magic number 5 in that code.
>
> Sorry, not much help
>
> On Wed, Mar 12, 2014 at 8:33 PM, bill lam <[email protected]> wrote:
> > You may replace the argument to 2!:0 with a shell script and print the
> return code or other information to stderr.
> >
> > or || may already get it done.
> >
> > 13.03.2014, в 8:27, Raul Miller <[email protected]> написал(а):
> >
> >> Yes.
> >>
> >> But how do I get access to that particular return code?
> >>
> >> I guess I'll try running jconsole under gdb and see if that gives me the
> >> information I need.
> >>
> >> Thanks,
> >>
> >> --
> >> Raul
> >>
> >>
> >>
> >> On Wed, Mar 12, 2014 at 8:12 PM, bill lam <[email protected]> wrote:
> >>
> >>> perhaps it is the result of non-zero return code.
> >>>
> >>> 13.03.2014, в 3:35, Raul Miller <[email protected]> написал(а):
> >>>
> >>>> Running on ec2 linux, I'm seeing
> >>>>
> >>>> |interface error: spawn
> >>>>
> >>>> after only tens of thousands of calls out to the operating system.
> >>>>
> >>>> I can (and have) engineered around this, but it's annoying, and I'd
> like
> >>> to
> >>>> understand the cause.
> >>>>
> >>>> How can I determine the underlying error, so I can start tracing this
> >>> back?
> >>>>
> >>>> The description of 2!:0 at
> >>>> http://www.jsoftware.com/help/dictionary/dx002.htm currently does not
> >>>> suggest how I could isolate underlying OS issues.
> >>>>
> >>>> Thanks,
> >>>>
> >>>> --
> >>>> Raul
> >>>> ----------------------------------------------------------------------
> >>>> For information about J forums see
> http://www.jsoftware.com/forums.htm
> >>> ----------------------------------------------------------------------
> >>> For information about J forums see http://www.jsoftware.com/forums.htm
> >> ----------------------------------------------------------------------
> >> For information about J forums see http://www.jsoftware.com/forums.htm
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to