[sheepdog] [PATCH] util: dump ucontext in crash handlers
MORITA Kazutaka
morita.kazutaka at gmail.com
Wed May 1 15:21:16 CEST 2013
At Wed, 1 May 2013 18:30:56 +0900,
Hitoshi Mitake wrote:
>
> Current crash handlers (of sheep, collie, and logger) don't dump
> register status when the signal rises. This patch let them dump the
> information. I believe especially RIP is useful for debugging.
I don't thinks so. If you are debugging Sheepdog on your environment,
you can get the register values from the core file. If you are
debugging with a reported sheep.log from other environment, how does
the register status help us?
I cannot image the use case of RIP, too. We can know where the
process crashed from the backtrace. Why do we need it?
>
> Example of output:
> May 01 18:23:07 [main] dump_mcontext(397) register status:
> May 01 18:23:07 [main] dump_mcontext(399) RIP: 0x4046ab
> May 01 18:23:07 [main] dump_mcontext(400) RSP: 0x7fff2ced9120
> May 01 18:23:07 [main] dump_mcontext(401) RBP: 0x1
> May 01 18:23:07 [main] dump_mcontext(402) RFLAGS: 0x10246
> May 01 18:23:07 [main] dump_mcontext(404) RAX: 0x5
> May 01 18:23:07 [main] dump_mcontext(405) RBX: 0x7fff2ceda348
> May 01 18:23:07 [main] dump_mcontext(406) RCX: 0x0
> May 01 18:23:07 [main] dump_mcontext(407) RDX: 0x0
> May 01 18:23:07 [main] dump_mcontext(408) R8: 0x7fff2ced8fd0
> May 01 18:23:07 [main] dump_mcontext(409) R9: 0x7f6fa31ef0e0
> May 01 18:23:07 [main] dump_mcontext(410) R10: 0x8
> May 01 18:23:07 [main] dump_mcontext(411) R11: 0x202
> May 01 18:23:07 [main] dump_mcontext(412) R12: 0x404050
> May 01 18:23:07 [main] dump_mcontext(413) R13: 0x7fff2ceda340
> May 01 18:23:07 [main] dump_mcontext(414) R14: 0x0
> May 01 18:23:07 [main] dump_mcontext(415) R15: 0x0
> May 01 18:23:07 [main] dump_mcontext(417) RDI: 0x42557d
> May 01 18:23:07 [main] dump_mcontext(418) RSI: 0x7fff2ced8f20
Does this work on i386 machines?
Thanks,
Kazutaka
More information about the sheepdog
mailing list