# Why our DeepSeek night measured nothing

*A scheduled overnight run on our inference server ended green and measured nothing. Inside its sandbox the baseline model could not see the card and ran on the CPU at about a tenth of its speed, and the big model's server exited at start. This field note tells the diagnosis as it happened, the wrong turn included: the cause was a read-only `/proc` inside the sandbox, not the AppArmor profile we blamed first, and the fix is one bind mount plus a pre-flight probe that stops the next such night before a model loads.*

*Published 2026-11-26 (UTC) · A small (human) team and a fleet of AI agents.*

**the short version:** Our overnight benches run each model inside a sandbox (bubblewrap, bwrap) with no network and a read-only view of the whole filesystem. On 2026-10-29 the baseline model, gemma4:26b on Ollama 0.32.13, loaded with "0.0 % on card" and wrote at 19.5 tokens a second on the CPU while the card sat at 2 MiB used; the big model's server exited before it answered; and the scheduler recorded a clean run and restored the machine. Outside the sandbox CUDA worked, and the live services on the same card were fine. A first probe showed an AppArmor label on the sandboxed process, so we blamed AppArmor, installed an unconfined copy of bwrap, and watched CUDA fail exactly as before; it was removed the same day. Two more probes bisected the sandbox's own flags: a writable root works, a read-only root fails with cuInit 304, and a writable /proc alone, under the stock confined bwrap, fixes it. Two things had changed since the last good night, two days earlier, and we did not separate them: this sandbox was new (that night the same model ran on the card with no sandbox at all, which we found only while checking this page), and a reboot had brought kernel 7.0.0-38-generic and NVIDIA driver 595.99.02. Which exact thing under /proc CUDA needs, and whether this sandbox would also have failed on the older kernel and driver, we did not establish. A GPU job that cannot see its GPU often does not fail; it gets slow and quiet.

2,796 words · about 13 minutes (at 220 words/min) · 0 tables · data kit: no

https://research.strata2signal.com/why-our-deepseek-night-measured-nothing/

---

*If you're new here: [strata→signal](https://strata2signal.com) is a small workshop that runs its own machines and writes up what it finds. This page is a field note, not a bench: one night's failure, three read-only probes, every output quoted as it came back, and what we changed. It was written on the day, 2026-10-29 (UTC), and held until the comparison the night was meant to start was published: [DeepSeek V4.1 Flash on a 96 GB card, RAM and an SSD, beside Qwen3.8-Flash-Next](https://research.strata2signal.com/deepseek-flash-beside-flash-next/). What happened on the three nights after it has its own section near the end.*

## What happened {#what-happened}

The run was a scheduled window on our inference server, whose card is an NVIDIA RTX PRO 6000 Blackwell Workstation Edition (96 GB). The window takes the live services down, runs a row of model steps inside a sandbox, and restores the services when it finishes. Its first step is an anchor, gemma4:26b on Ollama 0.32.13, a model we have measured many times, run first so the night's numbers can be checked against a known figure.

On 2026-10-29 the anchor finished with exit code 0 in 167.7 seconds, and every scored run was void. Ollama's log for the step reads `inference compute id=cpu library=cpu … total="123.4 GiB"` and `vram-based default context total_vram="0 B"`: it had looked for a GPU, found none, and loaded the model into system memory. Our harness's placement label read "SPILL 0.0 % on card", none of the model on the card, and its writing speed was 19.5 tokens a second. The same step on the same card, with the same Ollama build, model file and settings, wrote 201.82 tokens a second on 2026-10-27: the night ran at about a tenth of that. The card's own log showed 2 MiB used for the whole step. The main model, DeepSeek V4.1 Flash, never answered: its server "exited rc 1 before it answered". Its own log stayed on the server unread, so that the same cause stopped it is our inference, not something we saw.

From the scheduler's point of view the night succeeded. Its early check read `"EARLY-OK"`, phase `DONE`, `"RESTORE RESTORED (final) at 2026-10-29T07:39:14Z"`. The services came back and the row's model files were removed by the window's own clean-up, as designed. Nothing had failed loudly; the night had simply measured nothing.

## The clue {#the-clue}

Everything outside the sandbox worked. Later the same day the server's live services, the same gemma4:26b and a mistral-small3.2:24b, were loaded wholly on the card. So the driver, the card and the host's CUDA were fine; the fault was in the row's environment, a system unit with memory and network limits and, inside it, the sandbox.

Two terms. CUDA is NVIDIA's software layer for running work on its cards, and `cuInit` is the call a program must make before any other: it initialises the driver and returns 0 on success or an error number. Bubblewrap (`bwrap`) is a small Linux tool that starts a program in its own view of the filesystem and network, built on user namespaces, a kernel feature that gives an unprivileged program full privileges inside a private view of the system, enough to give itself a private copy of the mount table. The row's fence, as the window ran it:

```
bwrap --unshare-net --die-with-parent --ro-bind / / --dev-bind /dev /dev --tmpfs /tmp --tmpfs /dev/shm --bind <out> --bind <private> --bind <a1> --setenv HOME … --chdir …
```

A bind mount makes an existing directory visible at a path inside the sandbox. `--ro-bind / /` shows the whole host tree read-only; `--dev-bind /dev /dev` makes the device files usable, the card's among them; `--tmpfs` puts a fresh empty filesystem at `/tmp` and `/dev/shm`; `--unshare-net` removes the network. This fence was new with the night's kit; what that did to our diagnosis is told under What changed.

## The wrong turn, told honestly {#the-wrong-turn}

The first probe ran a few lines of Python, `cuInit` and a device count and nothing more, in three places, and also listed the card's device files and counted the kernel log's AppArmor denials. On the host with no sandbox:

```
  cuInit=0 deviceCount=1 · apparmor label: unconfined
```

Inside the row's exact fence:

```
  cuInit=304 deviceCount=n/a · apparmor label: bwrap//&unpriv_bwrap (enforce)
```

The device files were open to everyone (`crw-rw-rw- root root /dev/nvidia0`, and the same for the rest). A system unit like the row's, with the fence inside it, gave the same 304 and the same label. The kernel log held no AppArmor denial for the night's window: `denials: 0`.

The label is what we fixed on. AppArmor is the mandatory access control Ubuntu runs: a profile confines what a program may do. Since Ubuntu restricted unprivileged user namespaces, it ships a profile that lets bwrap use them and runs everything bwrap starts under a second profile, `unpriv_bwrap`, which takes its capabilities away; hence the label `bwrap//&unpriv_bwrap`. The process inside the sandbox carried that label in enforce mode, the process outside carried none, and CUDA failed inside and worked outside. We read that as cause, and the error code did not argue: 304 is `CUDA_ERROR_OPERATING_SYSTEM`, whose whole description in NVIDIA's documentation is "This indicates that an OS call failed." It names no call.

So we changed the box. A dedicated, root-owned copy of bwrap was installed at its own path with its own AppArmor profile (`flags=(unconfined)`, user namespaces allowed), for the bench rows alone, the system bwrap left confined. The install ended with the same probe under each copy, in the row's fence:

```
== the system bwrap (must stay confined):
  cuInit=304 deviceCount=n/a · apparmor label: bwrap//&unpriv_bwrap (enforce)
== the bench bwrap (must see the card):
  cuInit=304 deviceCount=n/a · apparmor label: bench-bwrap (unconfined)
```

(The dedicated copy's profile was named after our server; it is written `bench-bwrap` in every quoted line on this page, and nothing else in any line is changed.) The profile worked and CUDA did not. AppArmor was not the cause, and we had put a second, unconfined sandbox binary on a production machine to learn it. It was removed the same day, profile unloaded, the box as it was: `REMOVED bench-bwrap`.

The lesson is older than CUDA: change one thing at a time, and change the box last. The fence had six flags before its folder binds, none of which we had varied; we varied the machine's security posture instead, because a label was the first thing we saw and because we believed, wrongly, that the same fence had worked before the reboot.

## The bisection {#the-bisection}

The second probe kept the unconfined copy a little longer, since it took AppArmor out of the picture, and varied the fence's flags one at a time. The rows that tell the story:

```
== kernel 7.0.0-38-generic · driver 595.99.02
  V1 host (control)                                          cuInit=0 deviceCount=1 · unconfined
  V3 bench bwrap: --dev-bind / / (user+mount ns)             cuInit=0 deviceCount=1 · bench-bwrap (unconfined)
  V4 V3 + --unshare-net                                      cuInit=0 deviceCount=1 · bench-bwrap (unconfined)
  V5 --ro-bind / / --dev-bind /dev /dev (no netns)           cuInit=304 deviceCount=n/a · bench-bwrap (unconfined)
  V6 the row's full fence                                    cuInit=304 deviceCount=n/a · bench-bwrap (unconfined)
```

A sandbox with a writable root works (V3); removing the network does not break it (V4); a read-only root breaks it with nothing else from the fence but the device bind (V5). The two `--tmpfs` flags changed nothing either way, and a network namespace alone, with no user namespace, worked. The whole fault was in `--ro-bind / /`.

The third probe asked which read-only path mattered, and whether the stock confined bwrap works once that path is writable. `/proc` is the kernel's virtual filesystem of process and driver state; the NVIDIA driver keeps its entries under `/proc/driver/nvidia`. `/sys` is the kernel's view of devices and modules. Under `--ro-bind / /` both come through read-only with the rest of the tree.

```
  P1 bench: RO root + --bind /proc /proc                             cuInit=0 deviceCount=1 · bench-bwrap (unconfined)
  P2 bench: RO root + --bind /sys /sys                               cuInit=304 deviceCount=n/a · bench-bwrap (unconfined)
  P4 SYSTEM bwrap: --dev-bind / / (rw root)                          cuInit=0 deviceCount=1 · bwrap//&unpriv_bwrap (enforce)
  P5 SYSTEM bwrap: RO root + --bind /proc /proc                      cuInit=0 deviceCount=1 · bwrap//&unpriv_bwrap (enforce)
  P7 SYSTEM bwrap: the row's fence + --bind /proc /proc              cuInit=0 deviceCount=1 · bwrap//&unpriv_bwrap (enforce)
```

A writable `/proc` alone fixes it (P1); a writable `/sys` alone does not (P2). And the stock, confined bwrap, the one that carries the `unpriv_bwrap` label, works with a writable root (P4), with a read-only root and a writable `/proc` (P5), and with the row's full fence plus that one bind (P7). The confinement never blocked CUDA. The empty AppArmor log fits a read-only mount, where the kernel refuses a write without logging it; that CUDA reports such a refusal as its operating-system error is our reading, not something we traced.

## What changed, and what we did not establish {#what-changed}

Two things changed between the last good night and this one, and we did not separate them.

The first is the sandbox. During the diagnosis we believed this fence had run two days earlier and worked, and that belief is what made the reboot below, and with it AppArmor, look like the suspect. It had not, and we found that only while checking this page. On 2026-10-27 the same anchor step ran on the card with no sandbox around it, inside only a system unit like this row's; this fence was new with this night's kit, and as far as our records show this was its first night with the card. The sandbox our earlier GPU rows used mounted a fresh `/proc` of its own (`--unshare-pid` with `--proc /proc`). This fence leaves out `--unshare-pid`, so that the card's process list names the host's own process ids, and has no `--proc`, so its `/proc` is the host's, made read-only by `--ro-bind / /`.

The second is the machine. Later on 2026-10-27 the server rebooted to install an operating-system update and came up on kernel 7.0.0-38-generic, NVIDIA driver 595.99.02 and systemd 259.9. The next window was this one.

Two things we did not establish, and will not guess at. First, what CUDA's initialisation needs under `/proc` that a read-only `/proc` refuses: a writable bind of all of `/proc` is sufficient and `/sys` is not, and nothing finer was tried. Second, whether this fence would also have failed on the older kernel and driver: it never ran there, and no older kernel or driver was run again. Both are open questions. If you run CUDA inside a read-only sandbox on this kernel and driver and it works, or on another pair and it does not, we would like to know.

## The fix and the guard {#the-fix-and-the-guard}

The fix is one flag on the stock bwrap, with no change to the box: `--bind /proc /proc` straight after `--ro-bind / /`, so the row's trusted engine layer, our harness and the model servers it starts, sees the host's `/proc` writable. Sandboxes that run untrusted work and never touch the card keep a read-only `/proc`.

The guard is a pre-flight probe. Before any model loads, the row now runs the diagnosis's check inside its own fence: a child process that loads the driver's library, calls `cuInit(0)` and counts the devices. The diagnosis ran it as these lines:

```python
import ctypes
lab = open("/proc/self/attr/current").read().strip()
c = ctypes.CDLL("libcuda.so.1"); r = c.cuInit(0); n = ctypes.c_int(-1)
if r == 0: c.cuDeviceGetCount(ctypes.byref(n))
print("cuInit=%d deviceCount=%s · %s" % (r, n.value if r == 0 else "n/a", lab))
```

They also read the process's AppArmor label from `/proc/self/attr/current`, which the row keeps for the record. The check makes no context and allocates no memory. If `cuInit` is not 0 or the count is not at least 1, the night stops there, with the line "CUDA sees no device inside the fence". Both changes went into the next night's kit, and what they did there is told under What happened next.

The general lesson we now have a receipt for: a GPU job that cannot see its GPU often does not fail. The server finds no device, says so once in a log nobody is reading at that hour, and falls back to the CPU; the job exits 0 and the scheduler is satisfied. The only signs are a speed a tenth of what it should be and a card that stayed cold, easy to miss in a run meant to run itself. Probe for the card first, inside the same walls the model will run in, and make the probe's failure loud.

## What happened next {#what-happened-next}

This note was written on 2026-10-29 (UTC), the day of the failure. Three later nights on the same card ran inside the fence with the one added flag and the pre-flight probe, between 2026-10-30 and 2026-11-11 (UTC), and each is a reading of whether the fix held. It held on all three; the first of them stopped anyway, on something the fix itself uncovered.

On 2026-10-30 (UTC) the probe passed inside the fence (`cuInit` 0, one device) and the anchor loaded wholly on the card. The row then stopped at another check of ours. On this driver, initialising CUDA is enough to make a cache folder, `.nv/ComputeCache`, in the process's home folder. Our rows give each model server a home folder that must hold its one configuration file and nothing else, and the start-up check that enforces that found a second entry and failed closed. Nothing was measured that night either. This time the stop was loud, it came before any question was asked, and it named the check that stopped it. We reproduced the folder on a second machine with the same driver, then moved the cache out of the home folder with the driver's own setting, `CUDA_CACHE_PATH`, and left the check as strict as it was.

On 2026-11-02 and 2026-11-11 (UTC) the rows ran to their ends. The anchor wrote 200.60 and 202.09 tokens a second inside the fence, against 201.82 on 2026-10-27 with no sandbox around it. The kernel and driver also changed between those nights, so this is not a clean test of the sandbox alone, but the fenced anchor with a writable `/proc` reads within one per cent of the unfenced one. The row of 2026-11-11 is the re-run of the night this note is about, and what it measured is on [DeepSeek V4.1 Flash on a 96 GB card, RAM and an SSD, beside Qwen3.8-Flash-Next](https://research.strata2signal.com/deepseek-flash-beside-flash-next/).

The two open questions above are still open: we tried nothing finer than all of `/proc`, and we ran no older kernel or driver again.

## What this cannot say {#what-this-cannot-say}

- **Anything about other sandboxes.** Containers that mount a fresh `/proc` of their own, or reach CUDA through a vendor toolkit, were not tested.
- **The DeepSeek results.** The night this note is about measured nothing. The re-run of 2026-11-11 (UTC) is reported on its own page, linked above.

## Who ran this, and thanks {#who-ran-this-and-thanks}

Thanks to the bubblewrap project, to Ubuntu and the AppArmor project, to the Linux kernel's maintainers, to NVIDIA for the CUDA driver, to the Ollama project, and to Google for the Gemma models. Software this page stood on: Ubuntu's stock `bwrap` and its `bwrap-userns-restrict` AppArmor profile, Linux 7.0.0-38-generic, NVIDIA driver 595.99.02, Ollama 0.32.13, Python 3's `ctypes` and systemd's `systemd-run`. A small human team ran the three probes on the server by hand and ruled on each step, the wrong one included; a fleet of AI agents wrote the probes, read the outputs, kept the records and drafted this page under that team's rulings.

## Sources {#sources}

Read 2026-10-29 (UTC); every link read again on 2026-11-26 (UTC).

- **Our records:** the window's own logs (the server's log, the card's log and the scheduler's receipts), the three probe scripts and their outputs as pasted, the install and removal receipts, the decision rows that record the day in order, and for the three later nights the rows' own records and the written amendment that moved the driver's cache. No data kit ships: the records name our machines; the fence, the probe and the outputs printed here are what a repeat needs.
- **bubblewrap** (LGPL-2.0-or-later), the sandbox tool: https://github.com/containers/bubblewrap · its binds are recursive and its read-only flag reaches every mount beneath them, in its own source: `bubblewrap.c` ("We always bind directories recursively") and `bind-mount.c`.
- **CUDA driver API**, in NVIDIA's documentation: `cuInit` https://docs.nvidia.com/cuda/cuda-driver-api/group__CUDA__INITIALIZE.html · the error codes, `CUDA_ERROR_OPERATING_SYSTEM` among them, https://docs.nvidia.com/cuda/cuda-driver-api/group__CUDA__TYPES.html
- **Ollama** (MIT License): https://github.com/ollama/ollama
- **Ubuntu's restriction on unprivileged user namespaces**: https://ubuntu.com/blog/ubuntu-23-10-restricted-unprivileged-user-namespaces · the bwrap profile's design, in AppArmor's own repository: https://gitlab.com/apparmor/apparmor/-/merge_requests/1205
- **Linux manual pages**: user namespaces https://man7.org/linux/man-pages/man7/user_namespaces.7.html · the proc filesystem https://man7.org/linux/man-pages/man5/proc.5.html

*One night, three probes, one wrong turn, one flag. Every output quoted as it came back.*

Corrections and later readings will be added below, each dated (UTC), saying in plain words what they show.

<!-- derived 2026-12-02 (UTC) by tools/derive_md.py from the pour source.
     source html sha256: e0c87bfad78cb750f0fce6c249b1325e3cd8ec298a5124102cf3a370006546dc
     derivation sha256:  ad2e799336d5b94c3f5ec091bb4b241e982bd1dd590f76223c08cd41cefbe0b6
     the {#id} on each heading is the anchor that heading carries on the page. -->
