Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re: how to localise a problem?

by choroba (Bishop)
on Nov 26, 2012 at 14:34 UTC ( #1005675=note: print w/replies, xml ) Need Help??

in reply to how to localise a problem?

As far as my memory and Googling skills reach, "Argument list too long" is not a shell error, it is reported by the kernel. The argument space limit is set to 1/4 of the stack, so you might postpone the crash by increasing the stack size - but there is probably something somewhere leaking in the process, so try to detect the source. I have used valgrind several times for similar tasks, but it slows the process significantly.
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^2: how to localise a problem?
by Dave Howorth (Scribe) on Nov 26, 2012 at 16:42 UTC

    Thanks. That removes one mystery if it's a kernel message! I'm not seeing any evidence of leaks, although sometimes these things flare up suddenly and disappear almost before you can catch them.

    I think any kind of trace, monitor or logging is pretty much a non-starter given how long the process runs before it crashes. The monitoring will slow it down and/or create huge logs.

    What I have done is put some extra variables into the die message from IPC::Run so hopefully in another couple of days I should know more about the argument data. Whether that will help, I'm not sure, since the program happily recalculates the particular graph when it is restarted.


      I do see the problem of logging everything. But in your case I'm pretty sure that you have to see the whole process until the argument list is too long. I guess that there is some weired case of accumulation as I said before.

      Anyway, IMHO you don't have to change the code of IPC::Run, as I'm sure you could catch the argument list this way (only an example):

      my $gv = GraphViz2->new(%args); eval { $gv->run(); }; if(my $rc = $@) { print STDERR "argument string: " . $gv->dot_input . "\n"; confess $rc; }
      I'm really curious whether you catch your bug. Perhaps you have the time to tell us.

      Happy digging

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1005675]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (10)
As of 2018-04-24 19:30 GMT
Find Nodes?
    Voting Booth?