{"record":{"id":"525866d6637fdc39","repo":"firecracker-microvm/firecracker","slug":"missing-seccomp-filter-for-api-thread","errorCode":null,"errorMessage":"Missing seccomp filter for API thread.","messagePattern":"Missing seccomp filter for API thread\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/firecracker/src/api_server_adapter.rs","lineNumber":181,"sourceCode":"    metadata_json: Option<&str>,\n) -> Result<(), ApiServerError> {\n    // FD to notify of API events. This is a blocking eventfd by design.\n    // It is used in the config/pre-boot loop which is a simple blocking loop\n    // which only consumes API events.\n    let api_event_fd = EventFd::new(libc::EFD_SEMAPHORE).expect(\"Cannot create API Eventfd.\");\n    // FD used to signal API thread to stop/shutdown.\n    let api_kill_switch = EventFd::new(libc::EFD_NONBLOCK).expect(\"Cannot create API kill switch.\");\n\n    // Channels for both directions between Vmm and Api threads.\n    let (to_vmm, from_api) = channel();\n    let (to_api, from_vmm) = channel();\n\n    let to_vmm_event_fd = api_event_fd\n        .try_clone()\n        .expect(\"Failed to clone API event FD\");\n    let api_seccomp_filter = seccomp_filters\n        .remove(\"api\")\n        .expect(\"Missing seccomp filter for API thread.\");\n\n    let mut server = match HttpServer::new(&bind_path) {\n        Ok(s) => s,\n        Err(ServerError::IOError(inner)) if inner.kind() == std::io::ErrorKind::AddrInUse => {\n            let sock_path = bind_path.display().to_string();\n            return Err(ApiServerError::FailedToBindSocket(sock_path));\n        }\n        Err(err) => {\n            return Err(ApiServerError::FailedToBindAndRunHttpServer(err));\n        }\n    };\n    info_unrestricted!(\"Listening on API socket ({bind_path:?}).\");\n\n    let api_kill_switch_clone = api_kill_switch\n        .try_clone()\n        .expect(\"Failed to clone API kill switch\");\n\n    server","sourceCodeStart":163,"sourceCodeEnd":199,"githubUrl":"https://github.com/firecracker-microvm/firecracker/blob/0a745def42ddf4cc2a744d79a08a27ff50b5d27a/src/firecracker/src/api_server_adapter.rs#L163-L199","documentation":"Error \"Missing seccomp filter for API thread.\" thrown in firecracker-microvm/firecracker.","triggerScenarios":"Thrown at src/firecracker/src/api_server_adapter.rs:181 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the seccomp filter for the API thread is constructed and passed before the API thread is spawned.","Check the build/runtime configuration that assembles per-thread seccomp filters."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0a745def42ddf4cc2a744d79a08a27ff50b5d27a","analyzedAt":"2026-08-19T05:27:02.517Z","contentChangedAt":"2026-08-19T05:27:02.517Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}