Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-3686

Save the cpu regs at lbug error time.

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Won't Fix
    • Minor
    • None
    • None
    • None
    • 9518

    Description

      I have recently noticed what we don't seem to have error time cpu registers from lbugs panics. We get a nice stack trace but that is about where the debugging goodness ends. We don't get the error time regs saved anywhere all and most of the error time data context is lost. This is because we don't take an exception to sort out the error but rather we detect certain conditions and decide what to do within the process context itself. On x86 anyway most Linux errors are detected in exceptions and have the error time context saved on the stack just as part of the processes.

      Presently gcc and x86 like to keep the first 6 function args in registers so very little data is actually on the stack. Even with a cool stack unwinder crash extension I only have access to 1 of about 10 data points I would like to be able to investigate.

      So how to we do this?

      I think the best plan is at the initial lbug macro context to save the regs at onto the stack for x86. I don't know as much about how Linux PPC or other Non-Linux clients will work.

      In Linux arch/x86/include/asm/calling.h there is a asm macro called SAVE_ARGS. I think SAVE_ARGS will pack the register values onto the stack in a pt_regs standard sort of way.

      There is a little bit of development to enable it in a friendly way.

      I have opened this Lu to track this idea. I don't see myself having the time to work it all out for a while but I don't want to loose sight of it.

      Not having the error time Regs makes a crashdump not as useful as one would hope for when we it comes from an lbug error.

      Attachments

        Activity

          People

            keith Keith Mannthey (Inactive)
            keith Keith Mannthey (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: