Hi, On Mon, Apr 26, 2010 at 03:25:02PM +0200, Ludovic Courtès wrote:
> In addition to > <http://www.gnu.org/software/hurd/open_issues/crash_server.html>, it > seems that $CRASHSERVER isn???t honored, as suggested some time ago [0], > or perhaps the observations below are a side effect of another problem: > > --8<---------------cut here---------------start------------->8--- > l...@flubber:~$ cat > t.c > int main (int argc, char *argv[]) { *((char *) 0) = 0; return 0; } > l...@flubber:~$ gcc t.c > l...@flubber:~$ unset CRASHSERVER > l...@flubber:~$ ./a.out > Segmentation fault > l...@flubber:~$ export CRASHSERVER=/servers/crash-suspend > l...@flubber:~$ ./a.out > Segmentation fault (core dumped) > l...@flubber:~$ fsysopts /servers/crash-suspend > /hurd/crash --action=suspend --orphan-action=suspend > # > # Should have been suspended instead of dumping core. Well, obviously it *is* honoured, as the result is different with than without... Though indeed there must be a bug somewhere, as it doesn't take the right action :-) Note though that this is actually mentioned on the open_issues page you linked to -- albeit somewhat indirectly... > l...@flubber:~$ fsysopts /servers/crash-kill > /hurd/crash --action=kill --orphan-action=kill > l...@flubber:~$ export CRASHSERVER=/servers/crash-kill > l...@flubber:~$ ./a.out > Segmentation fault > # > # I???d expect a message like ???Killed???. Nah, it's the default action. Other systems don't print any extra explanation either. > l...@flubber:~$ export CRASHSERVER=/foo/bar > l...@flubber:~$ ./a.out > Segmentation fault > # > # A warning would be nice. Hm, yeah, I guess you are right... > In practice what???s the best way to debug a segfault? Same as most people do on other systems: run the problematic program in GDB. -antrik-
