Executable got Killed
Peter Teuben
teuben at astro.umd.edu
Tue Feb 22 16:01:59 UTC 2005
On Tue, 22 Feb 2005, Reuben D. Budiardja wrote:
> On Monday 21 February 2005 23:19, James McKenzie wrote:
> > Reuben D. Budiardja wrote:
> > > Hello,
> > > This maybe slightly OT, but I hope someone could give me some insight.
> > >
> > > I have an executable that when I tried to run it, it got killed:
> > >
> > > $> ./boltztrans
> > > Killed
> >
> > strace is your friend. man strace for use.
>
> Ah.. should have though of that. Thanks.
>
> But, when I 'strace programname', I only see two lines of output. The first
> being the program execution itself, and the second line is
> "+++ Killed by SIGKILL +++"
>
> How do I figure out who send the SIGKILL ? FWIW, this program requires rather
> big amount of memory, is there a limit somewhere that send the SIGKILL? This
> is on a fresh installed FC3.
i bet you have a program that declared too much memory on the stack, e.g.
in local variables. E.g. if you have (in C/C++ lingo)
foo() {
float data[10000000];
...
}
this is bound to die on you. You can try (using the limit command in csh)
to up the stacksize, but a better way is to either declare the variable
in global scope, viz.
static float data[10000000];
foo() {
...
}
or use malloc() inside foo() . The former is for some people politically
incorrect.
peter
More information about the fedora-list
mailing list