Skip to content

it crashed on background when eval #274

Open

Description

@taocheng-njfu

when I run it on background,it crashed,how can I catch the exception?
libc++abi: terminating due to uncaught exception of type std::runtime_error: [METAL] Command buffer execution failed: Insufficient Permission (to submit GPU work from background) (00000006:kIOGPUCommandBufferCallbackErrorBackgroundExecutionNotPermitted)

Activity

  1. davidkoski commented on Sep 25, 2025

    @davidkoski
    Member

    If it is an exception that can be caught by the caller, you can use either of these:

    If that doesn't work then the exception may be in the C++ threads that manage the work queue -- that would likely require work in mlx::core (the mlx repo).

  2. angeloskath commented on Sep 25, 2025

    @angeloskath
    Member

    It seems to be in an iOS device, does the information at https://developer.apple.com/documentation/BackgroundTasks/performing-long-running-tasks-on-ios-and-ipados?language=objc help?

    Basically see if requesting permission to submit GPU work from the background works.

  3. taocheng-njfu commented on Sep 29, 2025

    @taocheng-njfu
    Author

    If it is an exception that can be caught by the caller, you can use either of these:

    If that doesn't work then the exception may be in the C++ threads that manage the work queue -- that would likely require work in mlx::core (the mlx repo).

    I tried 2 plans, but none of them took effect, and it still crashed.

  4. taocheng-njfu commented on Sep 29, 2025

    @taocheng-njfu
    Author

    It seems to be in an iOS device, does the information at https://developer.apple.com/documentation/BackgroundTasks/performing-long-running-tasks-on-ios-and-ipados?language=objc help?

    Basically see if requesting permission to submit GPU work from the background works.

    iOS 26 is ok,system version below iOS 26 is not work

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions