Locate failed Mac Vulkan probes without exposing private logs

This commit is contained in:
Ludovic Marie
2026-10-04 11:59:57 +02:00
parent 8282a731ec
commit a77476b54e
4 changed files with 194 additions and 4 deletions
@@ -0,0 +1,155 @@
{
"schema": 1,
"measurement": "Failed hosted macOS Vulkan graphics probes, not performance measurements",
"source_commit": "8282a731ecc08691f798a3ec596c7cc1d4f1dad1",
"run_url": "https://github.com/ludovic111/minecraft-optimization-lab/actions/runs/37193558884",
"original_mod_sha256": "e651ef49bc97486e8dacfd4b640465c442525cd645e2dba71ddea9fb64347dd8",
"cases": [
{
"case": [
"--profile",
"baseline",
"--backend",
"vulkan"
],
"exit_code": 1,
"failure": [
{
"exit_code": 1,
"result_count": 0,
"java_exception_types": [
"java.lang.AssertionError",
"java.lang.RuntimeException"
],
"expected_demo_authentication_errors_observed": true,
"backend_attempts": [
{
"backend": "Vulkan",
"operation": "load_library",
"result": "success"
},
{
"backend": "Vulkan",
"operation": "create_device",
"result": "success"
}
],
"created_devices": [
{
"gpu": "Apple Paravirtual device",
"graphics_backend": "Vulkan",
"graphics_driver": "1.2.350 MoltenVK 1.4.2"
}
],
"client_initializer_reached": true,
"readback_requested": true,
"vulkan_error_codes": [
"VK_ERROR_FEATURE_NOT_PRESENT"
],
"fatal_jvm_error": false,
"profile": "baseline",
"preferred_backend": "vulkan"
}
]
},
{
"case": [
"--profile",
"core-performance",
"--backend",
"vulkan"
],
"exit_code": 1,
"failure": [
{
"exit_code": 1,
"result_count": 0,
"java_exception_types": [
"java.lang.AssertionError",
"java.lang.RuntimeException"
],
"expected_demo_authentication_errors_observed": true,
"backend_attempts": [
{
"backend": "Vulkan",
"operation": "load_library",
"result": "success"
},
{
"backend": "Vulkan",
"operation": "create_device",
"result": "success"
}
],
"created_devices": [
{
"gpu": "Apple Paravirtual device",
"graphics_backend": "Vulkan",
"graphics_driver": "1.2.350 MoltenVK 1.4.2"
}
],
"client_initializer_reached": true,
"readback_requested": true,
"vulkan_error_codes": [
"VK_ERROR_FEATURE_NOT_PRESENT"
],
"fatal_jvm_error": false,
"profile": "core-performance",
"preferred_backend": "vulkan"
}
]
},
{
"case": [
"--profile",
"vulkan"
],
"exit_code": 1,
"failure": [
{
"exit_code": 1,
"result_count": 0,
"java_exception_types": [
"java.lang.AssertionError",
"java.lang.RuntimeException"
],
"expected_demo_authentication_errors_observed": true,
"backend_attempts": [
{
"backend": "Vulkan",
"operation": "load_library",
"result": "success"
},
{
"backend": "Vulkan",
"operation": "create_device",
"result": "success"
}
],
"created_devices": [
{
"gpu": "Apple Paravirtual device",
"graphics_backend": "Vulkan",
"graphics_driver": "1.2.350 MoltenVK 1.4.2"
}
],
"client_initializer_reached": true,
"readback_requested": true,
"vulkan_error_codes": [
"VK_ERROR_FEATURE_NOT_PRESENT"
],
"fatal_jvm_error": false,
"profile": "vulkan",
"preferred_backend": "vulkan"
}
]
}
],
"limits": [
"Apple Paravirtual device and MoltenVK on a hosted ARM Mac; not physical M2 Pro GPU testing.",
"Library/device creation and readback request were observed, but no completed nonuniform readback report was produced.",
"All failures retained; neither successful rendering nor a screenshot-specific root cause is established.",
"Baseline includes the same original measurement mod and private test fixture; no core optimization mods or distant terrain.",
"Full logs, screenshots, game binaries and assets remain private."
]
}
+12 -3
View File
@@ -16,7 +16,10 @@ world mode also checks for saved world data after a clean process exit.
The startup wrapper observes backend library/device creation and preserves the
original calls and thrown exceptions. Selected diagnostics contain initialization
stages, bounded exception type names, Vulkan error-code identifiers and device
labels. Expected demo authentication errors are reported separately. Full log
labels. Failed probes also select up to eight graphics stack method names, without
module prefixes, filenames, line numbers or messages. Those observed locations
do not by themselves identify a root cause. Expected demo authentication errors
are reported separately. Full log
messages, raw screenshots, assets and world files stay under gitignored `.local/`.
Nonuniform pixels are not proof of correct visuals, full LOD completion or
exhaustive gameplay equivalence.
@@ -63,8 +66,14 @@ title checks for core and balanced also passed with **Apple Software Renderer**.
The macOS runner's **Apple Paravirtual device**, using MoltenVK 1.4.2, created
Vulkan devices but all three Vulkan cases failed with `VK_ERROR_FEATURE_NOT_PRESENT`.
The failure also occurs with vanilla; these observations do not isolate an
optimization-mod fault or prove behavior on a physical M2 GPU. Later diagnostics
identify whether readback was requested before failure.
optimization-mod fault or prove behavior on a physical M2 GPU.
The separate [readback-stage observations](../benchmarks/mac-vulkan-2026-10-04/live-observations.json)
from manual run 37193558884 show that all three cases reached the client test
initializer and requested readback before failing. They produced no completed
readback report. This narrows the observed sequence; it does not establish whether
the screenshot operation itself or subsequent rendering failed. Graphics stack
locations are collected in later probes to distinguish those possibilities.
For an isolated private preference override:
+18
View File
@@ -39,6 +39,24 @@ class FixtureDiagnosticTests(unittest.TestCase):
'java_exception_types': ['java.lang.NoClassDefFoundError', 'java.lang.ClassNotFoundException']})
self.assertNotIn('private', json.dumps(report))
def test_graphics_stack_locations_are_selected_and_bounded(self):
frames = [' at knot//com.mojang.renderpearl.backend.vulkan.Buffer.method%d(PrivateFile.java:42)' % index
for index in range(12)]
output = '\n'.join([
'message: at com.mojang.blaze3d.Bad.message(Private.java:1)',
' at com.mojang.authlib.Auth.privateToken(PrivateFile.java:2)',
' at net.minecraft.client.Screenshot.takeScreenshot(/private/file.java:3)',
*frames, *frames,
])
result = graphics_failure_summary(subprocess.CompletedProcess([], 1, output), 0)
methods = result['observed_graphics_stack_methods']
self.assertEqual(len(methods), 8)
self.assertEqual(methods[0], 'net.minecraft.client.Screenshot.takeScreenshot')
self.assertEqual(methods[1], 'com.mojang.renderpearl.backend.vulkan.Buffer.method0')
self.assertNotIn('private', json.dumps(result))
self.assertNotIn('Private', json.dumps(result))
self.assertNotIn('Bad', json.dumps(result))
def test_type_list_and_names_are_bounded(self):
output = '\n'.join('Caused by: sample.Failure%d: private-message' % index for index in range(20))
output = 'Caused by: sample.' + 'A' * 201 + ': private-message\n' + output
+9 -1
View File
@@ -23,7 +23,7 @@ except ImportError:
def graphics_failure_summary(run, report_count):
"""Selected stages/types/codes only; messages, paths and raw logs stay private."""
"""Selected stages/types/codes/methods only; messages and paths stay private."""
result = failure_summary(run, report_count)
pattern = r'(?<![\w.$])((?:java|org\.lwjgl|com\.mojang|net\.minecraft|net\.fabricmc|org\.spongepowered|dev\.horizonlab)\.[A-Za-z_$][\w.$]{0,160}(?:Exception|Error))(?=[:\s]|$)'
observed = set(result['java_exception_types']) | set(re.findall(pattern, run.stdout, re.ASCII))
@@ -37,6 +37,14 @@ def graphics_failure_summary(run, report_count):
result['readback_requested'] = 'HORIZON_CLIENT_GRAPHICS_READBACK_REQUESTED' in run.stdout
result['vulkan_error_codes'] = sorted(set(re.findall(r'\bVK_ERROR_[A-Z_0-9]{1,100}\b', run.stdout)))[:16]
result['fatal_jvm_error'] = 'A fatal error has been detected by the Java Runtime Environment' in run.stdout
# Only Java stack-frame lines from graphics namespaces. Strip module prefixes,
# filenames, line numbers and messages; these identify locations, not causes.
stack_pattern = (r'^\s*at (?:[A-Za-z0-9_.@$-]{1,80}/{1,2})?'
r'((?:com\.mojang\.(?:renderpearl|blaze3d)\.|'
r'net\.minecraft\.client\.(?:renderer\.|Screenshot\.))'
r'[A-Za-z0-9_.$<>]{1,180})\(')
methods = re.findall(stack_pattern, run.stdout, re.MULTILINE | re.ASCII)
result['observed_graphics_stack_methods'] = list(dict.fromkeys(methods))[:8]
return result