| Previous | Next |
| MACH_MSG_SUCCESS | KERN_INVALID_ADDRESS |
kOSReturnError
kOSReturnError is Libkern's generic failure value when no more specific OSReturn code is supplied. Preserve the first provider-specific error or state transition that preceded it; that evidence is usually more informative than the generic wrapper result.
Read the status in context
IOKit return values, internal tokens, and service messages share an integer representation but not the same control-flow meaning. Determine whether the API returns the value or delivers it as a message before treating it as failure.
Diagnostic facts
| Capture | Diagnostic value |
|---|---|
| Returning class/method, object registry path, provider, operation arguments, and preceding IOKit log. | Identifies the concrete object and operation associated with generic Libkern operation failure. |
| Numeric IOReturn/message value decoded with the matching SDK header. | Separates argument or lifecycle state from the provider beneath kOSReturnError. |
| Registry generation and first provider/client event before the result. | Correlates the generic return with the registry generation and provider event that immediately preceded it. |
| Known-good device or service state on the same macOS/driver build. | Shows whether kOSReturnError is the first result or a translated summary. |
Verification path
- Invoke the smallest supported method on a known-good provider object.
- Change one topology or lifecycle condition while keeping the request payload fixed.
- Verify cleanup and object lifetime after the controlled operation.
Closing the incident
Targeted correction. Fix the first provider-specific failure and preserve the generic wrapper as secondary evidence.
Acceptance criterion. The operation returns a specific success/failure and the generic code no longer masks the underlying event.
Technical references
- Apple XNU: IOReturn definitions — defines the status namespace used.
- Apple: IOKit documentation — documents the API or lifecycle boundary behind it.
- Apple OSS: XNU source — provides ABI, implementation, or protocol context.
- Apple XNU: FireWire family common definitions — supports the portability and verification limits.
Looking for a different code? Search another status or error code.