{"record":{"id":"8ff84f01abcba148","repo":"windmill-labs/windmill","slug":"problem-by-joining-handle","errorCode":null,"errorMessage":"Problem by joining handle","messagePattern":"Problem by joining handle","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/windmill-worker/src/python_executor.rs","lineNumber":3185,"sourceCode":"            let valid_path = venv_p.clone() + \"/.valid.windmill\";\n            // This is atomic operation, meaning, that it either completes and wheel is valid,\n            // or it does not and wheel is invalid and will be reinstalled next run\n            if let Err(e) = File::create(&valid_path).await{\n                tracing::error!(\n                workspace_id = %w_id,\n                job_id = %job_id,\n                    \"Failed to create {}!\\n{e}\\n\n                    This file needed for python jobs to function\", valid_path)\n            };\n            Ok(())\n        }));\n    }\n\n    let (mut failed, mut oom_killed) = (false, false);\n    for (handle, (_, venv_p)) in handles.into_iter().zip(req_with_penv.into_iter()) {\n        if let Err(e) = handle\n            .await\n            .unwrap_or(Err(Error::from(anyhow!(\"Problem by joining handle\"))))\n        {\n            failed = true;\n\n            // OOM code is 9 or 137\n            if matches!(e, Error::ExitStatus(_, 9 | 137)) {\n                oom_killed = true;\n            }\n\n            append_logs(\n                &job_id,\n                w_id,\n                format!(\"\\nEnv installation failed: {:?}\", e),\n                conn,\n            )\n            .await;\n            tracing::warn!(\n                workspace_id = %w_id,\n                \"Env installation failed: {:?}\",","sourceCodeStart":3167,"sourceCodeEnd":3203,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/backend/windmill-worker/src/python_executor.rs#L3167-L3203","documentation":"Raised by handle_python_reqs when joining the tokio task that finalizes the venv (writing the .valid.windmill marker after a successful install) fails — the future panicked or was cancelled. Without joining, the code cannot know whether the cache-validity marker was written, so the install is treated as failed rather than silently publishing an unverifiable cache entry.","triggerScenarios":"Thrown at backend/windmill-worker/src/python_executor.rs:3185 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the dependency installation — the venv will be rebuilt without a valid marker","Inspect worker logs for a panic inside the install-finalization task","Check worker resource limits (memory, task cancellation) if it recurs"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}