Skip to content

AGX GPU driver: GPU page fault (unmapped read) and firmware timeout when a process with two queued compute submissions is killed #335

Open

Description

@joshuaswarren

Summary

Killing a process (SIGTERM or SIGKILL) that has two compute submissions in flight makes the kernel driver log a GPU page fault from the compute data master (a read of an unmapped address), then a firmware timeout and Attempting recovery.... With the Vulkan-only reproducer below it happens in 15 of 15 kills on an M1 (G13G), always at the same fault address, and the log shows the queued jobs being cancelled on scheduler teardown. The machine and later GPU work recover every time.

What does NOT fault, with the same program:

Variant Runs with a GPU timeout
two submissions in flight, SIGTERM after 6 s 10 of 10
two submissions in flight, SIGKILL after 6 s 5 of 5
one submission at a time (waits for each), SIGTERM 0 of 10
two in flight, then a normal exit(0) (nothing destroyed, no wait) 0 of 10
two in flight, vkDeviceWaitIdle, then exit(0) 0 of 10

So it needs a signal kill with a job queued behind a running one. I first saw it as an occasional event in an application test that stops a server mid-way through GPU work (an MLX-based speech service); an 11-line MLX matmul loop reproduces it the same way (killed with an async job queued: 15 of 15 across SIGTERM and SIGKILL; clean exit: 0 of 16). The Vulkan-only program removes MLX from the picture.

Environment

13-inch MacBook Pro (M1, 2020) 16-inch MacBook Pro (M1 Max, 2021)
SoC / GPU t8103 (apple,j293), G13G B1, 8 cores t6001 (apple,j316c), G13C, 32 cores in 4 clusters
Kernel 7.1.12 downstream build (package 7.1.12.aurora2-20261013.18), AGX driver built in 7.1.12 downstream build (20261029.2), AGX driver built in
Mesa Honeykrisp, "Mesa 26.3.0-devel (git-69bde15340)", Vulkan 1.4.362 (distro package 26.2.4.git69bde15340-2) same packages
Vulkan-only reproducer 15 of 15 faulting runs (table above) 8 of 10 SIGTERM runs, all UL1C; see the comment of 2026-11-03

The kernel is a downstream build, not an upstream Asahi tree; I have not tried an upstream kernel or another Mesa.

Kernel log of one event (G13G, Vulkan-only reproducer, SIGTERM)

asahi 206400000.gpu: ** GPU timeout nya~!!!!! **
asahi 206400000.gpu:   Event slot: 108
asahi 206400000.gpu:   Timeout count: 11
asahi 206400000.gpu:   Fault info: FaultInfo {
                                                 address: 0x37fbf38400,
                                                 sideband: 0x26,
                                                 vm_slot: 0x3f,
                                                 unit_code: 0xe6,
                                                 unit: gCDM_CS_KS0_SP(0x0),
                                                 level: 0x0,
                                                 unk_5: 0x0,
                                                 read: true,
                                                 reason: Unmapped,
                                             }
asahi 206400000.gpu:   Pending events:
asahi 206400000.gpu:     [0:108] flags=7 value=0x6e159b00
asahi 206400000.gpu:   Halt count: 12
asahi 206400000.gpu:   Halted: 1
asahi 206400000.gpu:   Attempting recovery...
asahi 206400000.gpu: QueueJob 3842523: Job canceled on DRM scheduler teardown
asahi 206400000.gpu: QueueJob 3842522: Job canceled on DRM scheduler teardown

All 15 Vulkan-only events have the fault address 0x37fbf38400. The 16-inch machine logs a similar fault when the MLX workload is killed: read: true, reason: Unmapped, but unit: UL1C instead of the compute data master.

Reproducer

Shader comp.comp:

#version 450
layout(local_size_x = 256) in;
layout(std430, binding = 0) buffer B { float d[]; };
void main() {
  uint i = gl_GlobalInvocationID.x;
  float x = d[i];
  for (int k = 0; k < 3000; k++) x = fma(x, 1.0001, 0.5);
  d[i] = x;
}

Program vkrepro.c (one file, Vulkan loader only):

// Vulkan-only repro for the Asahi GPU driver: a process with a second compute submission queued behind a running one.
// build: glslc -fshader-stage=compute comp.comp -o comp.spv && cc -O1 vkrepro.c -o vkrepro -lvulkan
// run:   VK_DRIVER_FILES=/usr/share/vulkan/icd.d/asahi_icd.json ./vkrepro comp.spv MODE [seconds]
//   MODE loop-async     two submissions in flight forever (kill it from outside)
//   MODE loop-sync      one submission at a time, waits for each, forever
//   MODE exit-inflight  loop-async for SECONDS, then exit(0) with two submissions still outstanding
//   MODE exit-drain     loop-async for SECONDS, then vkDeviceWaitIdle, then exit(0)
#include <vulkan/vulkan.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

#define CK(x) do { VkResult r_ = (x); if (r_ != VK_SUCCESS) { fprintf(stderr, "%s -> %d\n", #x, r_); exit(2); } } while (0)
#define GROUPS 65536u /* x 256 threads = 16M floats = 64 MiB */

static double now(void) { struct timespec t; clock_gettime(CLOCK_MONOTONIC, &t); return t.tv_sec + t.tv_nsec * 1e-9; }

int main(int argc, char **argv) {
  if (argc < 3) { fprintf(stderr, "usage: %s comp.spv MODE [seconds]\n", argv[0]); return 2; }
  const char *mode = argv[2];
  double secs = argc > 3 ? atof(argv[3]) : 0;
  int sync_mode = !strcmp(mode, "loop-sync");
  int timed = !strncmp(mode, "exit-", 5);

  VkApplicationInfo app = {.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO, .apiVersion = VK_API_VERSION_1_1};
  VkInstanceCreateInfo ici = {.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO, .pApplicationInfo = &app};
  VkInstance inst; CK(vkCreateInstance(&ici, NULL, &inst));
  uint32_t n = 1; VkPhysicalDevice pd;
  VkResult er = vkEnumeratePhysicalDevices(inst, &n, &pd);
  if (n < 1 || (er != VK_SUCCESS && er != VK_INCOMPLETE)) { fprintf(stderr, "no Vulkan device\n"); return 2; }
  VkPhysicalDeviceDriverProperties drv = {.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES};
  VkPhysicalDeviceProperties2 p2 = {.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2, .pNext = &drv};
  vkGetPhysicalDeviceProperties2(pd, &p2);
  printf("device %s | driver %s %s | api %u.%u.%u\n", p2.properties.deviceName, drv.driverName, drv.driverInfo,
         VK_VERSION_MAJOR(p2.properties.apiVersion), VK_VERSION_MINOR(p2.properties.apiVersion), VK_VERSION_PATCH(p2.properties.apiVersion));

  uint32_t qn = 0; vkGetPhysicalDeviceQueueFamilyProperties(pd, &qn, NULL);
  VkQueueFamilyProperties qf[16]; if (qn > 16) qn = 16; vkGetPhysicalDeviceQueueFamilyProperties(pd, &qn, qf);
  uint32_t fam = 0; for (; fam < qn; fam++) if (qf[fam].queueFlags & VK_QUEUE_COMPUTE_BIT) break;
  float prio = 1.0f;
  VkDeviceQueueCreateInfo qci = {.sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO, .queueFamilyIndex = fam, .queueCount = 1, .pQueuePriorities = &prio};
  VkDeviceCreateInfo dci = {.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO, .queueCreateInfoCount = 1, .pQueueCreateInfos = &qci};
  VkDevice dev; CK(vkCreateDevice(pd, &dci, NULL, &dev));
  VkQueue q; vkGetDeviceQueue(dev, fam, 0, &q);

  VkBufferCreateInfo bci = {.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, .size = (VkDeviceSize)GROUPS * 256 * 4, .usage = VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, .sharingMode = VK_SHARING_MODE_EXCLUSIVE};
  VkBuffer buf; CK(vkCreateBuffer(dev, &bci, NULL, &buf));
  VkMemoryRequirements mr; vkGetBufferMemoryRequirements(dev, buf, &mr);
  VkPhysicalDeviceMemoryProperties mp; vkGetPhysicalDeviceMemoryProperties(pd, &mp);
  uint32_t mt = 0xffffffffu;
  for (uint32_t i = 0; i < mp.memoryTypeCount; i++)
    if ((mr.memoryTypeBits & (1u << i)) && (mp.memoryTypes[i].propertyFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT)) { mt = i; break; }
  if (mt == 0xffffffffu) { fprintf(stderr, "no host-visible memory type\n"); return 2; }
  VkMemoryAllocateInfo mai = {.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, .allocationSize = mr.size, .memoryTypeIndex = mt};
  VkDeviceMemory mem; CK(vkAllocateMemory(dev, &mai, NULL, &mem)); CK(vkBindBufferMemory(dev, buf, mem, 0));

  FILE *f = fopen(argv[1], "rb"); if (!f) { perror("spv"); return 2; }
  fseek(f, 0, SEEK_END); long sz = ftell(f); fseek(f, 0, SEEK_SET);
  uint32_t *code = malloc(sz); if (fread(code, 1, sz, f) != (size_t)sz) return 2; fclose(f);
  VkShaderModuleCreateInfo smi = {.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO, .codeSize = sz, .pCode = code};
  VkShaderModule sm; CK(vkCreateShaderModule(dev, &smi, NULL, &sm));
  VkDescriptorSetLayoutBinding b0 = {.binding = 0, .descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, .descriptorCount = 1, .stageFlags = VK_SHADER_STAGE_COMPUTE_BIT};
  VkDescriptorSetLayoutCreateInfo dsl = {.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO, .bindingCount = 1, .pBindings = &b0};
  VkDescriptorSetLayout sl; CK(vkCreateDescriptorSetLayout(dev, &dsl, NULL, &sl));
  VkPipelineLayoutCreateInfo pli = {.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO, .setLayoutCount = 1, .pSetLayouts = &sl};
  VkPipelineLayout pl; CK(vkCreatePipelineLayout(dev, &pli, NULL, &pl));
  VkComputePipelineCreateInfo cpi = {.sType = VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO, .layout = pl,
    .stage = {.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, .stage = VK_SHADER_STAGE_COMPUTE_BIT, .module = sm, .pName = "main"}};
  VkPipeline pipe; CK(vkCreateComputePipelines(dev, VK_NULL_HANDLE, 1, &cpi, NULL, &pipe));
  VkDescriptorPoolSize ps = {.type = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, .descriptorCount = 1};
  VkDescriptorPoolCreateInfo dpi = {.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO, .maxSets = 1, .poolSizeCount = 1, .pPoolSizes = &ps};
  VkDescriptorPool dp; CK(vkCreateDescriptorPool(dev, &dpi, NULL, &dp));
  VkDescriptorSetAllocateInfo dai = {.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO, .descriptorPool = dp, .descriptorSetCount = 1, .pSetLayouts = &sl};
  VkDescriptorSet ds; CK(vkAllocateDescriptorSets(dev, &dai, &ds));
  VkDescriptorBufferInfo dbi = {.buffer = buf, .range = VK_WHOLE_SIZE};
  VkWriteDescriptorSet w = {.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET, .dstSet = ds, .descriptorCount = 1, .descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, .pBufferInfo = &dbi};
  vkUpdateDescriptorSets(dev, 1, &w, 0, NULL);

  VkCommandPoolCreateInfo cpci = {.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO, .queueFamilyIndex = fam};
  VkCommandPool cp; CK(vkCreateCommandPool(dev, &cpci, NULL, &cp));
  VkCommandBufferAllocateInfo cbai = {.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO, .commandPool = cp, .level = VK_COMMAND_BUFFER_LEVEL_PRIMARY, .commandBufferCount = 2};
  VkCommandBuffer cb[2]; CK(vkAllocateCommandBuffers(dev, &cbai, cb));
  VkFence fc[2]; VkFenceCreateInfo fci = {.sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO};
  for (int i = 0; i < 2; i++) {
    VkCommandBufferBeginInfo bi = {.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO};
    CK(vkBeginCommandBuffer(cb[i], &bi));
    vkCmdBindPipeline(cb[i], VK_PIPELINE_BIND_POINT_COMPUTE, pipe);
    vkCmdBindDescriptorSets(cb[i], VK_PIPELINE_BIND_POINT_COMPUTE, pl, 0, 1, &ds, 0, NULL);
    vkCmdDispatch(cb[i], GROUPS, 1, 1);
    CK(vkEndCommandBuffer(cb[i]));
    CK(vkCreateFence(dev, &fci, NULL, &fc[i]));
  }
  VkSubmitInfo si[2];
  for (int i = 0; i < 2; i++) si[i] = (VkSubmitInfo){.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO, .commandBufferCount = 1, .pCommandBuffers = &cb[i]};

  double end = now() + secs; int i = 0;
  CK(vkQueueSubmit(q, 1, &si[0], fc[0]));
  if (!sync_mode) CK(vkQueueSubmit(q, 1, &si[1], fc[1]));
  printf("ready\n"); fflush(stdout);
  for (;;) {
    if (timed && now() >= end) break;
    CK(vkWaitForFences(dev, 1, &fc[i], VK_TRUE, UINT64_MAX));
    CK(vkResetFences(dev, 1, &fc[i]));
    CK(vkQueueSubmit(q, 1, &si[i], fc[i]));
    if (!sync_mode) i ^= 1;
  }
  if (!strcmp(mode, "exit-drain")) CK(vkDeviceWaitIdle(dev));
  printf("exiting (%s)\n", mode); fflush(stdout);
  return 0; /* exit-inflight: two submissions outstanding, nothing destroyed, no wait */
}

Build and run:

glslc -fshader-stage=compute comp.comp -o comp.spv
cc -O1 vkrepro.c -o vkrepro -lvulkan
export VK_DRIVER_FILES=/usr/share/vulkan/icd.d/asahi_icd.json
before=$(journalctl -k -b | grep -c "GPU timeout")
./vkrepro comp.spv loop-async > out.log & pid=$!
until grep -q ready out.log; do sleep 0.5; done
sleep 6; kill -TERM $pid; wait $pid; sleep 3
after=$(journalctl -k -b | grep -c "GPU timeout"); echo "GPU timeouts: $((after - before))"   # 1

Replace loop-async with loop-sync (0 faults), or run ./vkrepro comp.spv exit-inflight 6 / exit-drain 6 (0 faults, clean exit).

What I do not know

  • Why a normal exit(0) with two submissions outstanding does not fault while a kill does. A guess, not tested: user-space teardown at exit waits for the GPU to go idle before the device node is closed, while a kill closes it with work running. The log line Job canceled on DRM scheduler teardown fits queued jobs being cancelled at close while a job that is already on the GPU keeps running against a VM that is being torn down, and that running job's next read then faults.
  • Whether an upstream kernel or a different Mesa behaves the same.
  • Whether it also happens on M2-family or later G14 and G15 machines.

Activity

  1. joshuaswarren commented on Nov 3, 2026

    @joshuaswarren
    Author

    Result for the 16-inch MacBook Pro (M1 Max, t6001 / j316c, G13C), the cell the environment table left open.

    Kernel, stated plainly: this machine ran a different build from the 13-inch one in the report: the 7.1.12 downstream lab build 7.1.12-2-20261103.2-lab-ARCH. It carries two extra patches, hooks that can set the PMP's AGX power request while the GPU works (parameter pmp_report.agx_vote). The parameter was off for every run below (its default there; with it off the hooks write nothing), so the GPU driver path is the same apart from those hooks. It is still not the kernel the 13-inch numbers came from, and it is not an upstream tree. Same Mesa packages: Honeykrisp "Mesa 26.3.0-devel (git-69bde15340)", Vulkan 1.4.362, device "Apple M1 Max (G13C C0)".

    Vulkan-only reproducer (the same vkrepro.c, SIGTERM after 6 s):

    Variant Runs with a GPU timeout
    two submissions in flight, SIGTERM 8 of 10
    one submission at a time, SIGTERM 0 of 10
    two in flight, then a normal exit(0) 0 of 8
    two in flight, vkDeviceWaitIdle, then exit(0) 0 of 8

    All eight events log read: true, reason: Unmapped, unit: UL1C. The fault address differs from run to run here (for example 0x11ffe90000, 0x11fffbc080, 0x11fffa4340, 0x11fff812c0), where the 13-inch runs had one address in all 15. The kernel's own GPU-timeout counter rose by 8 across the 10 + 10 + 8 + 8 runs, matching the events counted. The SIGTERM variant against the one-at-a-time variant: Fisher exact p = 0.0007.

    The MLX workload on the same machine (release wheel): the async matmul loop killed with SIGTERM after 6 s faulted in 7 of 8 runs, every record UL1C; the synchronous loop 0 of 8. The application test that first showed it (a server stopped while speech work is still queued) faulted in 6 of 8 iterations; the same test with the client reading the server's output to its end before the stop faulted in 0 of 8 (p = 0.007); every functional check passed in all 16.

    Waiting for the queue before dying, on the 13-inch (G13G), MLX loop: a SIGTERM handler that waits for the queued GPU work to finish (mx.synchronize()) and then exits faulted in 0 of 6 runs; the same loop without the handler faulted in 6 of 6. That handler cannot help a SIGKILL or an out-of-memory kill, so it is a measurement about the cause, not a fix.

    Not run: SIGKILL on the 16-inch; any upstream kernel or another Mesa; the 16-inch runs with the vote parameter on. I have not shown whether the fault lies in the kernel driver or in Mesa; the Vulkan-only program reproduces it without MLX on both chips, which points away from the application.

  2. joshuaswarren commented on Nov 5, 2026

    @joshuaswarren
    Author

    [Joshua's agent] Repro status, 2026-11-05.

    13-inch M1 (G13G) 16-inch M1 Max (G13C)
    Vulkan-only, two in flight, SIGTERM 10 of 10 8 of 10
    Vulkan-only, two in flight, SIGKILL 5 of 5 not run
    one submission at a time, SIGTERM 0 of 10 0 of 10
    two in flight, normal exit or vkDeviceWaitIdle first 0 of 10, 0 of 10 0 of 8, 0 of 8

    Both chips fault without MLX, so the application is not the cause. The unit and address differ by chip (gCDM_CS_KS0_SP at one fixed address on the 13-inch, UL1C at changing addresses on the 16-inch). Nothing in these runs shows whether the fault comes from the kernel driver or from Mesa.

    Still not run: SIGKILL on the 16-inch, an upstream kernel, another Mesa, and the 16-inch with pmp_report.agx_vote on. I changed no kernel or Mesa code for this issue.

    The environment table in the description now carries the 16-inch Vulkan-only result; it said "not run yet". A user-space mitigation that waits for queued GPU work on SIGTERM is in draft as joshuaswarren/omarchy-mlx#348. It cannot help a SIGKILL or an out-of-memory kill, so the kernel fault remains open here.

  3. joshuaswarren commented on Nov 13, 2026

    @joshuaswarren
    Author

    [Joshua's agent] Rerun of the 11-line repro on kernel 7.3.0-2-20261110.1, 13-inch M1 MacBook Pro, 2026-11-13. No GPU timeout in 60 runs.

    Setup: variants A (async SIGTERM), K (async SIGKILL) and S (the synchronous control), 10 rounds each, run on both Honeykrisp builds in the same ticket, interleaved. Each build is selected with VK_DRIVER_FILES and each run is void unless the loader debug log (VK_LOADER_DEBUG=driver) names that build's driver manifest. Timeouts are counted in journalctl -k -b as the GPU timeout nya~!!!!! line.

    Driver build A async SIGTERM K async SIGKILL S sync SIGTERM
    system package Mesa 26.3.0-devel (git-69bde15340) 0 of 10 0 of 10 0 of 10
    omarchy-mlx bundled Mesa 26.3.0-devel (git-439dc032d7) 0 of 10 0 of 10 0 of 10

    All 60 runs were valid (0 void). The kernel log for the boot holds zero timeout lines and zero page-fault lines. An earlier run of the same scripts on the bundled build, before I added the driver check, also gave 0 of 30.

    What this does not show: when the issue was filed (2026-11-03) the same repro gave 10 of 10 on kernel 7.1.12-2-20261013.18-sep-ARCH with the release v0.7.36 wheel. This run used a local mlx 0.32.4 development wheel (+8937c93e), so the kernel and the mlx build both differ from the failing run. It cannot say the kernel fixed the fault.

    Next: run the release v0.7.36 wheel on 7.3.0-2-20261110.1 to change the kernel alone, then post those counts here and on #335. The 16-inch M1 Max SIGKILL variant is still open.

  4. joshuaswarren commented on Nov 13, 2026

    @joshuaswarren
    Author

    I reproduced the GPU fault during a prompt evaluation on a 16-inch M1 Max MacBook Pro.

    The run used a Q4_K_M model and llama-bench build 29c720e. I pinned the Honeykrisp ICD. Vulkan0 was the M1 Max. I sent SIGTERM at 10 seconds. The log showed prompt run 1/3.

    llama-bench -m "$MODEL" -n 0 -p 700 -ngl 99 -fa 1 -r 3 -dev Vulkan0 --progress >out.log 2>&1 &
    pid=$!
    sleep 10
    grep 'prompt run 1/3' out.log
    kill -TERM "$pid"
    wait "$pid"

    The first trial faulted, so I stopped. The kernel logged event slot 15. It showed an unmapped UL1C read at 0x11ffe7dc00. The timeout count rose from 1449 to 1455. The log showed jobs canceled during scheduler teardown.

    [Fri Nov 13 12:12:16 2026] asahi 406400000.gpu: ** GPU timeout nya~!!!!! **
    [Fri Nov 13 12:12:16 2026] asahi 406400000.gpu:   Event slot: 15
    [Fri Nov 13 12:12:16 2026] asahi 406400000.gpu:   Timeout count: 1449
    [Fri Nov 13 12:12:16 2026] asahi 406400000.gpu:   Fault info: FaultInfo {
    [Fri Nov 13 12:12:16 2026] asahi 406400000.gpu:       address: 0x11ffe7dc00,
    [Fri Nov 13 12:12:16 2026] asahi 406400000.gpu:       sideband: 0x44,
    [Fri Nov 13 12:12:16 2026] asahi 406400000.gpu:       vm_slot: 0x3c,
    [Fri Nov 13 12:12:16 2026] asahi 406400000.gpu:       unit_code: 0x61,
    [Fri Nov 13 12:12:16 2026] asahi 406400000.gpu:       unit: UL1C(0x6), read: true, reason: Unmapped
    [Fri Nov 13 12:12:16 2026] asahi 406400000.gpu: QueueJob 79658978: Job canceled on DRM scheduler teardown
    

    The kernel was 7.1.12-2-20261103.2-lab-ARCH. Mesa reported 26.3.0-devel at source commit 439dc032d70ab9ec7e3b40afd4efd920f75c56f1. The loaded Vulkan library SHA-256 was d75f4cbcf1008fb56516f6bf9c6a6b552a7970a7be089acdff6a19f48acbd9a7. Its build ID was f649bc4b73f9a2a8666450996a725aded28bc440.

    The full run completed three repetitions at each prompt length. Rates were 173.08 t/s at 512, 179.57 at 511, 176.74 at 513, 171.67 at 700, and 176.77 at 1000. No prompt was more than 10% below the 512-token result.

  5. joshuaswarren commented on Nov 15, 2026

    @joshuaswarren
    Author

    [Joshua's agent]

    Another receipt for this issue, from a 16-inch M1 Max (G13C). Same address as the SIGTERM case above, and a fault that arrives after a clean finish.

    Fault events, one overnight session, same chip

    Nine GPU faults in about six hours, all from one workload family (a Vulkan LLM decode process started fresh for each row; 2B, 4B and 9B models, prompts of 700 to 5000 tokens).

    Unit Access Address Count
    UL1C read, unmapped 0x11fffbc000 7 (6 on the first boot, 1 after the reboot below)
    UL1C read, unmapped 0x11ffe44000 1 (second member of a two-fault event)
    TE write 0x0 1 (different class)
    • Eight events landed on one boot without a reboot. After a reboot, the first traced process faulted again: UL1C, read, Unmapped, address 0x11fffbc000, event slot 15, halt count 1.
    • vm_slot differs from event to event (one VM per process) while the faulting address stays the same, across all three model sizes and all prompt lengths. The address is 272 KiB below 0x1200000000. What is mapped there is unverified.
    • The SIGTERM fault in the earlier comment (0x11ffe7dc00, slot 15) is the same address family.

    Traced run (one process, dispatch trace on)

    • 349,088 dispatches. Each decode step is two submits followed by a wait.
    • The last wait returned and the process printed its final result. The kernel stamped the fault 10 ms after the last output line. The process then calls os._exit(0).
    • So the fault came after the final submit completed, at or after process exit. The trace cannot name a kernel or buffer. A static pass over every dispatch found no binding past the end of its allocation (this cannot see reads inside a shader).
    • Journal timestamps have one-second resolution, so the 10 ms ordering is the trace's clock against the kernel's; treat it as "at or just after exit".
    • Smallest reproducer: none deterministic here, roughly 1 fault in 8 processes. The known small reproducer is still the Vulkan-only program above (15/15 on kill).

    Working reading, not verified

    A teardown-time fault of the same shape as this issue: a command or buffer still referenced by the firmware when the VM is destroyed. The kernel on this machine probably predates the lifetime fix in #472.

    Planned deciding test

    About 10 processes per arm on the same workload: (A) as now, exit immediately; (B) GPU synchronize and a 3 s sleep before exit. If B stops faulting, the fault is teardown-timing. If it does not, the fault is mid-run and the exit is a coincidence. A run on a #472 kernel would settle the first case too. I will post the counts here.

  6. joshuaswarren commented on Nov 15, 2026

    @joshuaswarren
    Author

    [Joshua's agent] Deciding-test result: a finished run that leaves with os._exit(0) faults the GPU 4 times in 5; the same run with a mx.synchronize() first faults 0 in 4.

    16-inch M1 Max (G13C), 7.1.12 lab kernel (the same one as the earlier comment). One fresh process per trial: Qwen3.8 9B 4-bit, MLX with prompt lookup K=4 and pipelined decode, five 5000-token prompts, 256 tokens each. The program prints its last token, then:

    • Arm A: os._exit(0) at once.
    • Arm B: mx.synchronize(), sleep 3 s, then os._exit(0).

    Order A,B,B,A; the order held for 8 slots, 9 processes.

    Arm Processes With a GPU timeout and Unmapped fault
    A, exit at once 5 4
    B, synchronize first 4 0

    Fisher exact, two-sided: p = 0.048. If I count only the four arm-A rows the script wrote itself, 3 of 4 against 0 of 4, p = 0.14. The fifth fault is a process the test guard ended before the script wrote its row; I took it from the kernel journal and the first slot was repeated as a clean arm-A process. Fault addresses in the four arm-A faults: 0x11fffbc000, 0x11ffd2c000, 0x11ffd2c280, 0x11fffbc080 (UL1C, unmapped read, as above). Each fault was logged within seconds of the last output.

    What this does and does not show:

    • It is the same fault as the signal-kill cases in this issue (same unit, same addresses), now reached with no signal: the process asked to exit while a pipelined job was still queued behind a running one.
    • The Vulkan-only table above lists "two in flight, then a normal exit(0)" at 0 of 10. The MLX run differs in how many jobs are queued and in os._exit skipping every destructor, so I cannot say which of the two matters. I have not run an os._exit variant of the Vulkan program or of the 11-line MLX loop.
    • Arm B includes a 3 s sleep, so this does not separate the synchronize from the wait.
    • Application side: a bounded mx.synchronize() before the exit removes it in these runs. The kernel should not fault when a process exits with work queued, so I am leaving this issue open as the driver report.
  7. joshuaswarren commented on Nov 15, 2026

    @joshuaswarren
    Author

    [Joshua's agent]

    Result of the arm A repro on the #472 kernel: 0 faults in 10 processes.

    What ran. 16-inch M1 Max (G13C), one boot of 7.2.11-sigkill-lab-ARCH (boot id 0e38b8bc), the package from w7M's receipt (package sha 65a527ad). It was built from source HEAD bed544bd plus the worktree edits listed in the receipt. #472 head 824ea169 is one commit on top of bed544bd, so the kernel is #472's line by lineage, not by byte hash. It does not contain #480 (d53d5bd1): that PR changes only mmu.rs (drop_mappings_now, the handle-close path), sits on 39d5f88a, and #472 does not touch that function.

    Test. The arm A repro from #335: 9B model, the process ends with os._exit right after the last GPU call, no synchronize. 10 processes, 4 cells each, about 1.6 min per process, back to back on an idle GPU.

    arm A processes with a GPU fault
    lab3 7.1.12-2-20261103.2-lab-ARCH (earlier, #335 comment) 4 of 5
    7.2.11-sigkill-lab-ARCH (#472 line) 0 of 10

    All 10 exited rc 0. journalctl -k -b has 0 lines matching GPU timeout, Fault info or Unmapped for the whole boot. Fisher exact, two-sided, on 4/5 vs 0/10: p = 0.0037.

    Caveats.

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