Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve nogc error when out of space #1175

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Jul 24, 2024

  1. Improve nogc error

    When using `NoGC` if the machine runs out of memory, the user will see
    an error that says garbage collection failed:
    
    ```
    ERROR: An MMTk GC thread panicked.  This is a bug.
    panicked at /Users/eileencodes/src/github.com/open_source/mmtk-core/src/plan/nogc/global.rs:74:9:
    internal error: entered unreachable code: GC triggered in nogc
    Backtrace is disabled.
    run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    running file: test/zlib/test_zlib.rb
    ```
    
    I added a check in `poll` to see if the plan being used supports GC and
    if not, raise an error. I could have updated the `schedule_collection`
    function to return this error, but I felt that since that function is
    regarding scheduling, it was better to raise if any plan does not
    support GC than change the purpose of `schedule_collection`. We still
    want to know if a GC ended up being triggered in `schedule_collection`.
    
    The new error looks like this:
    
    ```
    [2024-07-24T18:43:45Z INFO  mmtk::memory_manager] Initialized MMTk with NoGC (FixedHeapSize(1073741824))
    thread '<unnamed>' panicked at /Users/eileencodes/src/github.com/open_source/mmtk-core/src/util/heap/gc_trigger.rs:80:17:
    internal error: entered unreachable code: User ran out of space and the plan does not support collecting garbage.
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    fatal runtime error: failed to initiate panic, error 5
    running file: test/zlib/test_zlib.rb
    ```
    eileencodes committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    6c61853 View commit details
    Browse the repository at this point in the history

Commits on Jul 25, 2024

  1. Minor change

    wks committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    b800ae2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f5e1f55 View commit details
    Browse the repository at this point in the history