Skip to content

__rust_probestack test in rust_example.rs is causing a stack overflow #111

Open

Description

@wedsonaf

The stack size is 8KB, having a local variable of 8KB+32 bytes takes it over the edge.

I have seen failures on debug builds for this, for example, https://github.com/Rust-for-Linux/linux/runs/2107043283?check_suite_focus=true -- it has the following error:

[   13.127113] Large array has length: 1028
[   13.131438] BUG: stack guard page was hit at (____ptrval____) (stack is (____ptrval____)..(____ptrval____))
[   13.131438] kernel stack overflow (double-fault): 0000 [#1] SMP DEBUG_PAGEALLOC KASAN PTI

For now I'm reducing the variable size in #104 to work around this. Please fix if you need it to be bigger to ensure probestack is properly tested.

Activity

  1. alex commented on Mar 15, 2021

    @alex
    Member

    Maybe we should put it in a different test file so that it doesn't disrupt code that's expected to work :-)

  2. ojeda commented on Mar 15, 2021

    @ojeda
    Member

    Indeed. Reorganizing all the test code is something I will work on, but first I need to finish setting up the "independent CI".

    Nevertheless, it is good we are seeing the error in the debug builds, it means debug CI is being useful ;-)

  3. adamrk commented on Mar 16, 2021

    @adamrk

    So this was triggered by an upstream merge from #112. Does anyone know why (just trying to understand myself)?

  4. ojeda commented on Mar 16, 2021

    @ojeda
    Member

    The CI link mentioned by Wedson happened before #112 -- it is not a particular change: the frame size has been growing with the added test cases, which means we are crossing the tipping point now.

    Eventually we will move these into proper tests, but for the moment my plan is moving them into individual kernel modules since anyhow I need to clean up all the GitHub-only bits (which include rust_example.rs) to be able to get into linux-next properly.

  5. adamrk commented on Mar 16, 2021

    @adamrk

    Got it, thanks!

  6. changed the title [-]__rust_probestack test in rust_example.rs is causing a stack overflow[/-] [+]`__rust_probestack` test in `rust_example.rs` is causing a stack overflow[/+] on Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    • libRelated to the `rust/` library.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions