Docs: on NVIDIA, a device kept to the exit can fault in the driver's own exit handler
What: FAST-PATHS's known gap of NVIDIA exits now names the cause and the measured rates, and HOWTO (section 8), the runtime README (at the process's exit) and API.md's accepted differences tell consumers to drop the runtime's devices before the process exits on that driver. exit_guard.rs and tests/exit_guard.rs, comments only, say that the 5080's fault in libnvidia-glvkspirv.so also comes with no making in progress. Why: reims-vgpu's test an_adopted_device_starts_its_in_place_check (device kept in a static, check waited for to its end, then the test process exits) died with SIGSEGV after "ok" on the RTX 3090. Reproduced with the runtime alone (a scratch example: device made on a named thread with an empty shader cache of its own, in-place check started and waited for, device kept, main returns). Every core shows the same thing: a worker thread of NVIDIA's driver, started from the thread that made the device and so carrying its name, faulting at libnvidia-glvkspirv.so+0x363a8 (`mov 0x18,%rax; ud2`, a null dereference trap) while the main thread runs libEGL_nvidia.so's exit handler inside exit(). No runtime thread was in a section or in the driver. reims's two cores on that node (pids 106291, 170154) faulted on a thread named after the test thread, which libtest joins before printing "ok", so a thread the driver started. How verified (RTX 3090, NVIDIA 620.70.06, 8 processes at once, 80 exits each): - exit right after the check ended, device kept: 6/80 SIGSEGV (potluck m3-max-16257) - exit 3 s after the check ended: 0/80 (m3-max-16279) - device dropped before the exit: 0/80 (m3-max-16280) - no check, exit right after creation / 6 s after: 0/80 each (m3-max-16278, m3-max-16277) - lavapipe (Mesa 26.2.6), exit right after the check: 0/20 (m3-max-16283) Vulkan has no call that waits for the driver's worker, and a dropped device leaves none, so the remedy is the consumer's drop, documented; no runtime behaviour changes.
This commit is contained in:
1 parent
2743373d34
commit
daf963ab80
6 files changed
+48
-5
No files matched your search
@@ -233,6 +233,14 @@ program's, returns once that is done: it stops the runtime's own background work
|
||||
check of textures over host pages, its warm pass) and waits for it, at most a round of the check or
|
||||
the record the pass is making.
|
||||
|
||||
**At the process's exit.** On NVIDIA's proprietary driver, drop the runtime's devices before the
|
||||
process exits. A device kept to the exit can end it with `SIGSEGV` inside the driver's own exit
|
||||
handler, which tears the driver's SPIR-V compiler down while a worker thread of the driver's still
|
||||
runs in it, where the device's check of textures over host pages ended a few seconds or less before
|
||||
the exit: on an RTX 3090 (620.70.06), 6 of 80 exits right after the check, 0 of 80 three seconds
|
||||
after it, and 0 of 80 with the device dropped first
|
||||
([HOWTO](../../docs/HOWTO.md#8-check-the-integration)).
|
||||
|
||||
**The Vulkan objects underneath** (no Metal counterpart; each call is `unsafe`):
|
||||
|
||||
- `Device::raw()` gives the entry, instance, physical device, `ash::Device`, queue families, and
|
||||
|
||||
@@ -114,7 +114,12 @@
|
||||
//! process ended
|
||||
//! with `SIGSEGV` at `0x18` inside `libnvidia-glvkspirv.so`, the driver's SPIR-V compiler, on a
|
||||
//! thread the test's had started, during its exit after its test passed: one test of a whole
|
||||
//! run under load, which passed alone. A load is where the first call counts
|
||||
//! run under load, which passed alone. The same fault ends an exit with no making in progress
|
||||
//! too, which no hook orders: on an RTX 3090 (620.70.06), the exit handler of `libEGL_nvidia.so`
|
||||
//! tore the compiler down while a worker thread of the driver's (started from the thread that
|
||||
//! made the device, whose name it carries) still ran in it, in 6 of 80 exits right after the
|
||||
//! device's in-place check ended, and none with the device dropped first (docs/FAST-PATHS.md,
|
||||
//! known gaps). A load is where the first call counts
|
||||
//! from: the Vulkan loader unloads the layers with the last instance and loads them again with
|
||||
//! the next, which make their statics again at each entry point's first call after the device
|
||||
//! that registered at the load; so that device forgets the entry points called before
|
||||
|
||||
@@ -849,8 +849,9 @@ fn a_pipeline_making_that_returned_registers_the_hook_again() {
|
||||
/// first and waits for the making, and the destructor runs once it ended. The destructor ends the
|
||||
/// child with 42 when the making had ended, 43 when it ran beside it. That is an exit mid-compile:
|
||||
/// on an RTX 5080 a consumer's test process ended with `SIGSEGV` at `0x18` inside
|
||||
/// `libnvidia-glvkspirv.so`, the driver's SPIR-V compiler, on a thread of the runtime's during its
|
||||
/// exit after its test passed (one test of a whole run under load; it passed alone).
|
||||
/// `libnvidia-glvkspirv.so`, the driver's SPIR-V compiler, on a thread the test's had started,
|
||||
/// during its exit after its test passed (one test of a whole run under load; it passed alone). The
|
||||
/// same fault also comes with no making in progress (`exit_guard.rs`).
|
||||
#[cfg(unix)]
|
||||
#[test]
|
||||
fn an_exit_mid_making_waits_for_it_before_an_earlier_making_s_destructor() {
|
||||
|
||||
@@ -5169,6 +5169,12 @@ each item named states the rule in full.
|
||||
thread left running, ended a consumer's process with `SIGSEGV` inside NVIDIA's SPIR-V compiler
|
||||
(`libnvidia-glvkspirv.so`, RTX 5080). A program that ends its making threads before it exits
|
||||
leaves only the 2 ms window.
|
||||
- **On NVIDIA's proprietary driver, an exit with a device live can fault in the driver's own exit
|
||||
handler** with no making in progress, where Metal's exit is clean: the handler tears the driver's
|
||||
SPIR-V compiler down while a worker thread of the driver's still runs in it (a null dereference
|
||||
at `0x18` in `libnvidia-glvkspirv.so`, the fault above), on an RTX 3090 (620.70.06) in 6 of 80
|
||||
exits right after the device's check of textures over host pages ended, and none three seconds
|
||||
after it. A device dropped before the exit leaves none ([FAST-PATHS](FAST-PATHS.md), known gaps).
|
||||
|
||||
**Two-plane YCbCr textures**
|
||||
|
||||
|
||||
+12
-2
@@ -1425,8 +1425,18 @@ driver's. Each is open work.
|
||||
**unaudited** past the shapes measured there.
|
||||
|
||||
- **On NVIDIA's proprietary driver, a process that exits with a device live can fault in the
|
||||
driver's own worker thread during its exit handler**: about 1 in 100 test processes beside other
|
||||
GPU work. The cause is not found.
|
||||
driver's own worker thread during its exit handler**: the exit handler of `libEGL_nvidia.so`
|
||||
tears the driver's SPIR-V compiler down while a worker thread of the driver's still runs in it, a
|
||||
null dereference at `0x18` in `libnvidia-glvkspirv.so` (`SIGSEGV`, `SEGV_MAPERR`) on a thread the
|
||||
driver started from the thread that made the device, so it carries that thread's name. No thread
|
||||
or call of the runtime's is in the driver then, and Vulkan has no call that waits for the
|
||||
driver's worker. Measured on an RTX 3090 (620.70.06), 8 processes at once, each making a device
|
||||
with no record of its in-place check (`Device::settle_in_place_checks`) and keeping it to the
|
||||
exit: 6 of 80 exits right after the check ended faulted, 0 of 80 three seconds after it, 0 of 80
|
||||
where the device was dropped before the exit, and 0 of 160 with no check (exits right after the
|
||||
device's creation and 6 s after it). What other work leaves the worker running is unaudited.
|
||||
Drop the runtime's devices before the process exits on that driver
|
||||
([HOWTO](HOWTO.md#8-check-the-integration)).
|
||||
|
||||
- **Reflection after a compute descriptor reset on RADV**: `max_total_threads_per_threadgroup`
|
||||
answers 0 where Metal answers 96, `required_threads_per_threadgroup` `0x0x0` where Metal answers
|
||||
|
||||
@@ -968,3 +968,16 @@ A host note: on a laptop whose NVIDIA GPU powers down when idle (the driver's ru
|
||||
1 second while the GPU wakes (970 to 980 ms on an RTX 5080 Laptop GPU, driver 615.71.09). A host
|
||||
that wants no wake can keep the GPU powered (`on` in its PCI device's `power/control`); the runtime
|
||||
never needs it.
|
||||
|
||||
A host note: on NVIDIA's proprietary driver, drop the runtime's devices before the process exits.
|
||||
A device kept to the exit (in a static, as Metal's device lives for the process) can end the exit
|
||||
with `SIGSEGV` inside the driver's own exit handler, which tears the driver's SPIR-V compiler down
|
||||
while a worker thread of the driver's still runs in it: a null dereference at `0x18` in
|
||||
`libnvidia-glvkspirv.so`, on a thread the driver started from the thread that made the device (so
|
||||
it carries that thread's name, a test's under a test harness). No call of the runtime's is in the
|
||||
driver then, and Vulkan has no call that waits for that worker. On an RTX 3090 (620.70.06), 8
|
||||
processes at once, each making a device whose in-place check had no record yet
|
||||
(`Device::settle_in_place_checks`, run once per driver) and keeping it: 6 of 80 exits right after
|
||||
the check ended faulted, 0 of 80 three seconds after it, and 0 of 80 with the device dropped first;
|
||||
with no check, 0 of 160. Which other work leaves the worker running is unaudited
|
||||
([FAST-PATHS](FAST-PATHS.md), known gaps).
|
||||
Reference in new issue
Block a user