in reply to Re: qx(....) suddenly failing
in thread qx(....) suddenly failing

Check $! for the reason.
Forgot to mention: $! said Bad file descriptor.

In the meantime, we had the same effect on a different process, and we found out that the general behaviour was that the process was not able to open a pipe for reading anymore. For example, open(H,"xxx|") failed in the same way. Since the application executes the external commands with qx(...)), and this implicitly requires reading from a pipe, every execution of an external command was affected (while execution of commands using system was not affected). Hence the cause was the sudden inability of opening pipes, and the effect happened twice so far (and on different hosts) within a couple of days (while we had no such problems during the weeks before). I suspected that, for some reason, the process might have too many open handles, but comparing this process with others on the same host (using ProcessExplorer) did not show anything unusual.

-- 
Ronald Fischer <ynnor@mm.st>

Replies are listed 'Best First'.
Re^3: qx(....) suddenly failing
by ikegami (Patriarch) on Jun 30, 2010 at 16:38 UTC
    On linux, I'd use strace to see what's happening under the hood. I don't know if there's a similar tool for Windows.
        I used Sysinternals' ProcessExplorer to check whether there are an unreasonable high number of handles or threads used, but nothing different from a "good" case. I will check out Process Monitor.

        Ah, one more thing which is different between the hosts where the failure suddenly occured, and the hosts where it runs well: The "failing" hosts are virtual ones (i.e. virtual machines), while the "good" hosts are real machines.

        -- 
        Ronald Fischer <ynnor@mm.st>