{"record":{"id":"a3925808897ea275","repo":"unslothai/unsloth","slug":"subprocess-error-error-msg","errorCode":null,"errorMessage":"Subprocess error: {error_msg}","messagePattern":"Subprocess error: (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"studio/backend/core/export/orchestrator.py","lineNumber":375,"sourceCode":"        deadline = time.monotonic() + timeout\n\n        while time.monotonic() < deadline:\n            remaining = max(0.1, deadline - time.monotonic())\n            resp = self._read_resp(timeout = min(remaining, 2.0))\n\n            if resp is None:\n                if not self._ensure_subprocess_alive():\n                    raise RuntimeError(\"Export subprocess crashed during wait\")\n                continue\n\n            rtype = resp.get(\"type\", \"\")\n\n            if rtype == expected_type:\n                return resp\n\n            if rtype == \"error\":\n                error_msg = resp.get(\"error\", \"Unknown error\")\n                raise RuntimeError(f\"Subprocess error: {error_msg}\")\n\n            if rtype == \"log\":\n                # Forwarded stdout/stderr line from the worker.\n                self._append_log(resp)\n                continue\n\n            if rtype == \"status\":\n                message = resp.get(\"message\", \"\")\n                # One structured export_progress line per phase (consolidated in the\n                # server log, like training/download progress); also shown live.\n                if message:\n                    logger.info(\"export_progress\", phase = message)\n                    self._append_log(\n                        {\n                            \"stream\": \"status\",\n                            \"line\": message,\n                            \"ts\": resp.get(\"ts\", time.time()),\n                        }","sourceCodeStart":357,"sourceCodeEnd":393,"githubUrl":"https://github.com/unslothai/unsloth/blob/203007d19051dcd2ae33876786d117c99f6b0368/studio/backend/core/export/orchestrator.py#L357-L393","documentation":"Raised by ExportOrchestrator._wait_response when the worker sends a structured {'type': 'error', ...} message. This is the export worker's own error report — an exception inside the subprocess (e.g. during merge, GGUF conversion, or safetensors writing) that it caught and forwarded instead of crashing. The chained message (error_msg) is the worker-side root cause.","triggerScenarios":"Unsafetensors weights during GGUF conversion; out-of-disk-space while writing merged safetensors; unsupported tensor dtypes/architecture in convert_hf_to_gguf.py; a quantization method the worker cannot run; invalid export params (bad dtype, missing shard files).","commonSituations":"Disk full in the models/export directory; partial or corrupted model download so a shard fails to load; new/quantized model architecture the bundled GGUF converter does not support; misconfigured export parameters from the UI.","solutions":["Read the error_msg suffix — it is the worker's traceback cause and names the failing step","Check free disk space at the export output location (GGUF conversions temporarily need the model size again in scratch)","Verify the model checkpoint fully downloaded (all shards present, no .incomplete files) and reload it","If the error names an unsupported layer/tensor in GGUF conversion, update the converter or choose a different export type","Retry with a smaller quantization_method list to isolate which quant fails"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    orch.run_export(export_type, params)\nexcept RuntimeError as e:\n    msg = str(e)\n    if msg.startswith(\"Subprocess error:\"):\n        cause = msg[len(\"Subprocess error:\"):].strip()  # worker-side root cause\n        surface_to_user(cause)","preventionTips":["Check disk space before exporting (need ~model size again for merge/GGUF scratch)","Verify checkpoint shards are complete before export","Prefer quants your toolchain is known to support"],"tags":["export","gguf","worker-error","disk-space"],"backgroundTag":null,"analyzedSha":"203007d19051dcd2ae33876786d117c99f6b0368","analyzedAt":"2026-08-15T02:48:39.846Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}