[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: $CRASHSERVER not honored?
From: |
olafBuddenhagen |
Subject: |
Re: $CRASHSERVER not honored? |
Date: |
Tue, 27 Apr 2010 17:57:14 +0200 |
User-agent: |
Mutt/1.5.19 (2009-01-05) |
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---
> ludo@flubber:~$ cat > t.c
> int main (int argc, char *argv[]) { *((char *) 0) = 0; return 0; }
> ludo@flubber:~$ gcc t.c
> ludo@flubber:~$ unset CRASHSERVER
> ludo@flubber:~$ ./a.out
> Segmentation fault
> ludo@flubber:~$ export CRASHSERVER=/servers/crash-suspend
> ludo@flubber:~$ ./a.out
> Segmentation fault (core dumped)
> ludo@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...
> ludo@flubber:~$ fsysopts /servers/crash-kill
> /hurd/crash --action=kill --orphan-action=kill
> ludo@flubber:~$ export CRASHSERVER=/servers/crash-kill
> ludo@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.
> ludo@flubber:~$ export CRASHSERVER=/foo/bar
> ludo@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-