Unix

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • /hurd/crash --suspend doesn't work

    5 answers - 1784 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    URL:
    <>
    Summary: /hurd/crash doesn't work
    Project: The GNU Hurd
    Submitted by: tschwinge
    Submitted on: Friday 08/04/06 at 16:14
    Category: Hurd Servers
    Severity: 3 - Normal
    Priority: 5 - Normal
    Item Group: None
    Status: None
    Privacy: Public
    Assigned to: None
    Name:
    Email:
    /Closed:
    Reproducibility: Every Time
    Size (loc): None
    Planned Release: None
    Effort: 0.00
    Details:
    `/hurd/crash ' is usually running as a server on
    `/servers/crash-suspend' and may be linked to from `/servers/crash' to
    actually use it.
    It's meant to suspend a crashed process, i.e. keep it in a frozen state in
    memory (as opposed to dumping a core file) to make it attachable and
    debuggable by gdb.
    Unfortunately this doesn't work:
    #v+
    thomas@leibniz:/var/tmp $ cat crash.c
    int main (void) { return *(int *) 0; }
    thomas@leibniz:/var/tmp $ gcc crash.c
    thomas@leibniz:/var/tmp $ ./a.out
    Segmentation fault (core dumped)
    thomas@leibniz:/var/tmp $ ls -l core
    -rw 1 thomas root 16912384 Jun 15 20:43 core
    thomas@leibniz:/var/tmp $ ls -l /servers/crash
    lrwxr-xr-x 1 root root 13 Jun 15 20:42 /servers/crash -crash-suspend
    thomas@leibniz:/var/tmp $ showtrans /servers/crash-suspend
    /hurd/crash
    #v-
    According to Roland it has been working ``in the past'' (``Long before core
    dumping ever worked at all.'') and he also added that ``the crash server is
    one of the easier ones to debug with gdb.''
    Reply to this item at:
    <>
    Message sent via/by Savannah
    http://savannah.gnu.org/
    Bug-hurd mailing list
    Bug-hurd (AT) gnu (DOT) org
  • No.1 | | 839 bytes | |

    Follow-up Comment #1, bug #17319 (project hurd):

    Roland commented on bug-hurd:

    Make sure it's not just a bug in the option parsing or something. Check
    with fsysopts /servers/crash. I note that its trivfs_append_args doesn't
    show the setting. You might fix that.

    Try fsysopts and see if that changes the behavior.
    If it does, then the problem is in deciding whether it's an orphan.

    Then debug the server and see if crash_how is set correctly. Because
    nothing else (that's not dying) depends on it, it is easy to use gdb on
    crash.
    Break in S_crash_dump_task and see what's going on.

    Reply to this item at:

    <>

    Message sent via/by Savannah
    http://savannah.gnu.org/

    Bug-hurd mailing list
    Bug-hurd (AT) gnu (DOT) org
  • No.2 | | 496 bytes | |

    Follow-up Comment #2, bug #17319 (project hurd):

    Here is a patch that makes the crash server support in
    fsysopts.

    Incidentally I couldn't set the fsysopts as a regular user. Perhaps this is
    a bug also.

    Additional Item Attachment:

    File name:
    Size:0 KB

    <>

    Reply to this item at:

    <>

    Message sent via/by Savannah
    http://savannah.gnu.org/

    Bug-hurd mailing list
    Bug-hurd (AT) gnu (DOT) org
  • No.3 | | 1187 bytes | |

    Follow-up Comment #3, bug #17319 (project hurd):

    I tried the patched crash server, and it didn't quite work as expected.

    I retried Thomas' example:

    #v+
    thomas@leibniz:/var/tmp $ cat crash.c
    int main (void) { return *(int *) 0; }
    thomas@leibniz:/var/tmp $ gcc crash.c
    thomas@leibniz:/var/tmp $ ./a.out
    Segmentation fault (core dumped)
    thomas@leibniz:/var/tmp $ ls -l core
    -rw 1 thomas root 16912384 Jun 15 20:43 core
    thomas@leibniz:/var/tmp $ ls -l /servers/crash
    lrwxr-xr-x 1 root root 13 Jun 15 20:42 /servers/crash -crash-suspend
    thomas@leibniz:/var/tmp $ showtrans /servers/crash-suspend
    /hurd/crash
    #v-
    But I added:

    $ fsysopts /servers/crash-suspend

    It didn't change the behaviour -- it still dumped core. but,

    $ fsysopts /servers/crash-suspend

    did. It suspended the task.

    I then tried to attach to the crash server using gdb, but it said that the
    pid didn't have any children.

    Reply to this item at:

    <>

    Message sent via/by Savannah
    http://savannah.gnu.org/

    Bug-hurd mailing list
    Bug-hurd (AT) gnu (DOT) org
  • No.4 | | 579 bytes | |

    Follow-up Comment #4, bug #17319 (project hurd):

    I had some success with the patched crash-server and I thought I should share
    it here.

    After doing this:

    # ln -sf crash-suspend /servers/crash
    # fsysopts /servers/crash-suspend

    I could successfully attach to crashed suspended processes using gdb.

    I also tried , and , but no
    luck.

    Fun stuff!

    Reply to this item at:

    <>

    Message sent via/by Savannah
    http://savannah.gnu.org/

    Bug-hurd mailing list
    Bug-hurd (AT) gnu (DOT) org
  • No.5 | | 594 bytes | |

    Follow-up Comment #5, bug #17319 (project hurd):

    I installed file #10477
    (`') after a
    tiny tweak.

    #v+
    2006-11-27 Ben Asselstine <benasselstine (AT) canada (DOT) com>
    Thomas Schwinge <tschwinge (AT) gnu (DOT) org>

    * crash.c (trivfs_append_args): Handle CRASHRPHANS_HW.
    #v-

    This does -- of course -- not yet fix this bug report's main issue.

    Reply to this item at:

    <>

    Message sent via/by Savannah
    http://savannah.gnu.org/

    Bug-hurd mailing list
    Bug-hurd (AT) gnu (DOT) org

Re: /hurd/crash --suspend doesn't work


max 4000 letters.
Your nickname that display:
In order to stop the spam: 0 + 9 =
QUESTION ON "Unix"

EMSDN.COM