in reply to Expect.pm causing Memory fault?

Hello

See what "free" command says about free memory, and what "ulimit" command says about limits has your user

But, wait! Which is the exact message which your application/perl give you ?

Maybe it is not a limit / free memory available problem

In your situation, I surely would test an "empty program" with only your sentence:

#!/usr/bin/perl use strict; use Expect; my $user="user"; my $source_DB="source"; Expect->spawn("ssh $User\@$source_DB"); Expect->interact;

And see if it is the root cause .. (I doubt it)

Maybe google has more hints

Regards,

Replies are listed 'Best First'.
Re^2: Expect.pm causing Memory fault?
by vishi (Beadle) on Aug 09, 2011 at 12:55 UTC

    I did that .. and a regular Perl program runs fine. When I use the module, it goes crazy. Another development is that I cannot use the debugger now - when I run the program in the debugging mode, I do not get the debugger prompt. Instead, it hangs and I see that CPU utilization hits 100%. I have to forcibly stop and kill the process (Ctrl Z & kill -9 PID).

    What's surprising is that other programs that use the same module are running fine. I'm not sure what's so special about this piece of code that's making Perl angry that it throws a "Memory fault" at me.