{"record":{"id":"07949e47d635ef6b","repo":"wasmerio/wasmer","slug":"internal-error-missing-symbol-resolution-record-f","errorCode":null,"errorMessage":"Internal error: missing symbol resolution record for '{0}'.{1}","messagePattern":"Internal error: missing symbol resolution record for '(.+?)'\\.(.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"lib/wasix/src/state/linker/instance_group/imports.rs","lineNumber":264,"sourceCode":"                imports,\n                well_known_imports,\n                MemoryImportMode::DefineOnly,\n            )? {\n                continue;\n            }\n\n            let key = SymbolResolutionKey::Needed(NeededSymbolResolutionKey {\n                module_handle,\n                import_module: import.module().to_owned(),\n                import_name: import.name().to_owned(),\n            });\n\n            // Finally, go through the resolution results\n            let resolution = linker_state\n                .symbol_resolution_records\n                .get(&key)\n                .unwrap_or_else(|| {\n                    panic!(\n                        \"Internal error: missing symbol resolution record for '{0}'.{1}\",\n                        import.module(),\n                        import.name()\n                    )\n                });\n\n            trace!(?module_handle, ?import, ?resolution, \"Resolution\");\n\n            match resolution {\n                SymbolResolutionResult::Function { ty, resolved_from } => {\n                    let func = match self.try_instance(*resolved_from) {\n                        Some(instance) => {\n                            trace!(\n                                ?module_handle,\n                                ?import,\n                                ?resolved_from,\n                                \"Already have instance to resolve from\"\n                            );","sourceCodeStart":246,"sourceCodeEnd":282,"githubUrl":"https://github.com/wasmerio/wasmer/blob/8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5/lib/wasix/src/state/linker/instance_group/imports.rs#L246-L282","documentation":"populate_imports_from_linker looks up each side-module import in linker_state.symbol_resolution_records, which the prepare/create_instance_group flow must have populated for every import. A missing record means the pre-resolution pass skipped an import — an internal invariant breach, so it panics naming the missing module.name key.","triggerScenarios":"create_instance_group/prepare_side_module_from_linker flow where linker_state.symbol_resolution_records lacks an entry for an import of the side module — e.g. records built from a different module than the one being instantiated, records cleared between passes, or an import list computed with different module/name normalization than the resolver used.","commonSituations":"Custom dynamic-linking entry points in wasix; forks bypassing the prepare pass before populate_imports_from_linker; name/module normalization mismatches (e.g. environment-prefixed imports added after resolution records were built).","solutions":["Ensure prepare_side_module_from_linker ran to completion and recorded resolutions for every import before populate_imports_from_linker is invoked.","Make sure the same module instance list is used in both the resolution-record pass and the population pass.","Verify import key construction (module(), name()) matches exactly between record creation and lookup.","If adding custom imports/environ, register their resolution records before instantiation."],"exampleFix":"// before: populating imports without preparing records for all imports\nlet group = InstanceGroup::create_instance_group(&linker, &main_module, &side_module, ...)?; // panics\n// after: prepare must cover every import of the side module first\nlet linker_state = prepare_side_module_from_linker(&mut linker, &side_module)?;\ndebug_assert!(side_module.imports().all(|i| linker_state.symbol_resolution_records.contains_key(&key_for(i))));\nlet group = InstanceGroup::create_instance_group(&linker, &main_module, &side_module, ...)?;","handlingStrategy":"validation","validationCode":"// Before populate_imports_from_linker, assert records cover every import\nfor import in side_module.imports() {\n    let key = (import.module().to_owned(), import.name().to_owned()).into();\n    assert!(linker_state.symbol_resolution_records.contains_key(&key),\n        \"no resolution record for {}::{}\", import.module(), import.name());\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always run the full prepare_side_module_from_linker pass before create_instance_group.","Use identical import-key construction (module(), name()) in record creation and lookup.","Do not add env/custom imports after resolution records are built without recording them too.","Assert record coverage of all imports in debug builds during dynamic-link tests."],"tags":["panic","dynamic-linking","linker","wasix","internal-error"],"backgroundTag":"missing-symbol-resolution","analyzedSha":"8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5","analyzedAt":"2026-09-01T23:06:31.009Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}