On Sun, 23 Feb 2003, Mi Zhou wrote: > I have a c program that works fine on a local console but gives a > 'segmentation fault' during execution in SSH. > > The scenario is: > The program and its a.out are on system A running Redhat8.0. I have > another system B running the same OS. I sshed from system B to system A > and tried to run the a.out, it failed with a segmentation fault. I go to > system A , open up a console and then run it, it runs without any error. > > There is a huge 2-dimensional array(not malloced) created in the > program. Could this be the problem? Any idea how to solve this?
not sure, but some things you might want to check/consider: . does the sshd on system A run with user resource limits on memory? see if "ulimit -a" produces different results when run via ssh vs on console. . any chance an sshrc/some ssh config file is making the library search path different than it is on console, by setting $LD_LIBRARY_PATH or something? . is system A's sshd using an abnormally high amount of memory when a connection is made somehow, leaving the system with less memory to allocate to your program? . any chance system A has bad memory/faulty hardware, and the segfaults just happen to be coinciding with ssh use somewhat by chance? . does your program do anything else unusual, like accessing its terminal device somehow? see ssh's -t/-T options perhaps if so. hard to say, at least without more info, but at least there's a few possibilities you could check out. good luck. -tcl. -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list