On a 2.6.21 kernel (MontaVista, x86_pentium4), I'm failing to see expected "core.pid" files dropped.
Consider this tiny program, "dumpcore.c":
#include <stdio.h>
#include <stdlib.h>
#include <sys/prctl.h>
int main( int argc, char ** argv )
{
printf("dumpable = %d\n", prctl( PR_GET_DUMPABLE, 0, 0, 0, 0 ) );
abort();
}
Build command is equally simple:
$ gcc -m32 -g -o dumpcore32 dumpcore.c
If I ssh into the MV system, login as root, and execute the program, I see a core file generated as expected:
$ ssh root@W.X.Y.Z
Last login: Fri Mar 21 22:04:03 2008 from W.X.Y.Q
root:/# /home/klittle/dumpcore32
dumpable = 1
Aborted (core dumped)
root:/# ls -la /disk/core
total 72
drwxrwxrwx 2 root root 4096 Mar 21 22:23 .
drwxrwxrwx 11 root root 4096 Mar 4 16:10 ..
-rw------- 1 root root 143360 Mar 21 22:23 dumpcore32.3314.1206138192.
But, if I "oneshot" the command by giving it on the ssh command line:
$ ssh -t -t root@W.X.Y.Z "/home/klittle/dumpcore32;ls -la /disk/core"
dumpable = 1
bash: line 1: 3344 Aborted /home/klittle/dumpcore32
total 8
drwxrwxrwx 2 root root 4096 Mar 21 22:24 .
drwxrwxrwx 11 root root 4096 Mar 4 16:10 ..
Connection to W.X.Y.Z closed.
The core file is nowhere to be found.
ulimit in both cases is "unlimited" (I double checked). Anyone have any insight here?
TIA,
-k