Re: KGDB fails to pass selft tests on x86-64 (v2.6.26) - Kernel

This is a discussion on Re: KGDB fails to pass selft tests on x86-64 (v2.6.26) - Kernel ; On Thu, Jul 24, 2008 at 3:24 PM, Francis Moreau wrote: > I wanted to give kgdb a try on a v2.6.26 kernel. My cpu is an > x86-64. > > So the first thing I did is to enable ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: Re: KGDB fails to pass selft tests on x86-64 (v2.6.26)

  1. Re: KGDB fails to pass selft tests on x86-64 (v2.6.26)

    On Thu, Jul 24, 2008 at 3:24 PM, Francis Moreau wrote:
    > I wanted to give kgdb a try on a v2.6.26 kernel. My cpu is an
    > x86-64.
    >
    > So the first thing I did is to enable kgdb support and also the
    > kgdb self tests:
    >
    > CONFIG_HAVE_ARCH_KGDB=y
    > CONFIG_KGDB=y
    > CONFIG_KGDB_SERIAL_CONSOLE=y
    > CONFIG_KGDB_TESTS=y
    > # CONFIG_KGDB_TESTS_ON_BOOT is not set
    >
    > Once compiled I booted this kernel through qemu and got the following:
    >


    and unfortunately it seems this issue is related to qemu: if I did boot the
    kernel without qemu and the self tests passed...


    --
    Francis
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  2. Re: KGDB fails to pass selft tests on x86-64 (v2.6.26)

    On Thu, Jul 24, 2008 at 4:30 PM, Jason Wessel
    wrote:
    > Francis Moreau wrote:
    >> On Thu, Jul 24, 2008 at 3:24 PM, Francis Moreau wrote:
    >>> So the first thing I did is to enable kgdb support and also the
    >>> kgdb self tests:
    >>>
    >>> CONFIG_HAVE_ARCH_KGDB=y
    >>> CONFIG_KGDB=y
    >>> CONFIG_KGDB_SERIAL_CONSOLE=y
    >>> CONFIG_KGDB_TESTS=y
    >>> # CONFIG_KGDB_TESTS_ON_BOOT is not set
    >>>
    >>> Once compiled I booted this kernel through qemu and got the following:
    >>>

    >> and unfortunately it seems this issue is related to qemu: if I did boot the
    >> kernel without qemu and the self tests passed...
    >>
    >>
    >>

    >
    > It is because the qemu you are using does not support hardware
    > breakpoints. The tests will warn, but the kernel will continue to boot
    > and tell you that hw breakpoint support doesn't work on your simulated
    > hardware.
    >
    > Also, if you plan to use software breakpoints, please make sure to turn
    > off CONFIG_DEBUG_RODATA, else they will not work. This is a regression
    > which will is on my list of things to take a look at, as time permits.


    I had a couple of kernels hang during single-stepping self-tests (I
    think), where it reached 500 and 900 tests respectively before it hung
    hard (NMI watchdog enabled, but not triggering). Is this related to
    the RODATA thing?

    This was with a recent (post-v2.6.26) kernel on a real P4.


    Vegard

    --
    "The animistic metaphor of the bug that maliciously sneaked in while
    the programmer was not looking is intellectually dishonest as it
    disguises that the error is the programmer's own creation."
    -- E. W. Dijkstra, EWD1036
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  3. Re: KGDB fails to pass selft tests on x86-64 (v2.6.26)

    Francis Moreau wrote:
    > On Thu, Jul 24, 2008 at 3:24 PM, Francis Moreau wrote:
    >
    >> I wanted to give kgdb a try on a v2.6.26 kernel. My cpu is an
    >> x86-64.
    >>
    >> So the first thing I did is to enable kgdb support and also the
    >> kgdb self tests:
    >>
    >> CONFIG_HAVE_ARCH_KGDB=y
    >> CONFIG_KGDB=y
    >> CONFIG_KGDB_SERIAL_CONSOLE=y
    >> CONFIG_KGDB_TESTS=y
    >> # CONFIG_KGDB_TESTS_ON_BOOT is not set
    >>
    >> Once compiled I booted this kernel through qemu and got the following:
    >>
    >>

    >
    > and unfortunately it seems this issue is related to qemu: if I did boot the
    > kernel without qemu and the self tests passed...
    >
    >
    >


    It is because the qemu you are using does not support hardware
    breakpoints. The tests will warn, but the kernel will continue to boot
    and tell you that hw breakpoint support doesn't work on your simulated
    hardware.

    Also, if you plan to use software breakpoints, please make sure to turn
    off CONFIG_DEBUG_RODATA, else they will not work. This is a regression
    which will is on my list of things to take a look at, as time permits.

    Cheers,
    Jason.
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  4. Re: KGDB fails to pass selft tests on x86-64 (v2.6.26)

    Vegard Nossum wrote:
    > On Thu, Jul 24, 2008 at 4:30 PM, Jason Wessel
    > wrote:
    >
    >> Also, if you plan to use software breakpoints, please make sure to turn
    >> off CONFIG_DEBUG_RODATA, else they will not work. This is a regression
    >> which will is on my list of things to take a look at, as time permits.
    >>

    >
    > I had a couple of kernels hang during single-stepping self-tests (I
    > think), where it reached 500 and 900 tests respectively before it hung
    > hard (NMI watchdog enabled, but not triggering). Is this related to
    > the RODATA thing?
    >
    > This was with a recent (post-v2.6.26) kernel on a real P4.
    >
    >
    >


    It is not likely that CONFIG_DEBUG_RODATA can have any impact because
    the boot test occurs before the text sections are marked read-only. A
    hang in this section indicates a conflict where something is spinning
    for a lock in the NMI handler, or the NMI handler re-entered and tried
    to acquire another lock.

    In the 2.6.26 time frame I found and fixed at least one defect around
    updating the clock while in the NMI which required that you not do it
    from the NMI context. It sounds as if there is yet another problem
    along these lines, and of course it is a timing race...

    Jason.
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  5. Re: KGDB fails to pass selft tests on x86-64 (v2.6.26)

    Hello,

    On Thu, Jul 24, 2008 at 4:30 PM, Jason Wessel
    wrote:
    >
    > It is because the qemu you are using does not support hardware
    > breakpoints. The tests will warn, but the kernel will continue to boot
    > and tell you that hw breakpoint support doesn't work on your simulated
    > hardware.


    ah ok, thanks.

    While I have your attention, I sometimes (well pretty often actually) got this
    inside my gdb session:

    (gdb) n
    warning: Invalid remote reply: 00

    or

    (gdb) n
    warning: Invalid remote reply: 00
    warning: Invalid remote reply:
    c0dcb40f0081ffff08e59f0f0081ffff00b1a40f0081ffff80 86400f0081ffff704e2c81ffffffff01000000008000000d00 00000000000000000000000000000000000100000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000002000000000 000000ffffffffffffffff0000000000000000

    Do you any idea what's wrong in this case ?

    >
    > Also, if you plan to use software breakpoints, please make sure to turn
    > off CONFIG_DEBUG_RODATA, else they will not work. This is a regression
    > which will is on my list of things to take a look at, as time permits.
    >


    Yes I did that since I did notice a previous post where you adviced the same
    thing.

    Thanks
    --
    Francis
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  6. Re: KGDB fails to pass selft tests on x86-64 (v2.6.26)

    On Thu, Jul 24, 2008 at 4:55 PM, Jason Wessel
    wrote:
    > It is not likely that CONFIG_DEBUG_RODATA can have any impact because
    > the boot test occurs before the text sections are marked read-only. A
    > hang in this section indicates a conflict where something is spinning
    > for a lock in the NMI handler, or the NMI handler re-entered and tried
    > to acquire another lock.
    >
    > In the 2.6.26 time frame I found and fixed at least one defect around
    > updating the clock while in the NMI which required that you not do it
    > from the NMI context. It sounds as if there is yet another problem
    > along these lines, and of course it is a timing race...


    I just got another one now, with HEAD at
    f0766440dda7ace8a43b030f75e2dcb82449fb85:

    calling init_kgdbts+0x0/0x20
    kgdb: Registered I/O driver kgdbts.
    kgdbts:RUN plant and detach test
    kgdbts:RUN sw breakpoint test
    kgdbts:RUN bad memory access test
    kgdbts:RUN singlestep test 1000 iterations
    kgdbts:RUN singlestep [0/1000]
    kgdbts:RUN singlestep [100/1000]
    kgdbts:RUN singlestep [200/1000]
    kgdbts:RUN singlestep [300/1000]
    kgdbts:RUN singlestep [400/1000]
    kgdbts:RUN singlestep [500/1000]
    kgdbts:RUN singlestep [600/1000]

    Full stop. But the commit has timestamp May 9, 2008, so maybe you
    fixed it after that.


    Vegard

    --
    "The animistic metaphor of the bug that maliciously sneaked in while
    the programmer was not looking is intellectually dishonest as it
    disguises that the error is the programmer's own creation."
    -- E. W. Dijkstra, EWD1036
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

+ Reply to Thread