What does errno 104 (EBADMSG) mean?

 
Could be also:
ConstantTypeOS
ERROR_INVALID_AT_INTERRUPT_TIMEWin32 errorWindows
ECONNRESETerrnoLinux
ENOTRECOVERABLEerrnoMac
FILE_INITIALIZATION_FAILEDBugCheck CodeWindows
Previous Next
EALREADY ECANCELED

EBADMSG

EBADMSG is defined by the UCRT as a POSIX compatibility constant. It describes a message that reached a receiving interface but could not be accepted as a valid message for that interface. The value by itself does not identify a Win32 API, a Winsock call, or a particular wire protocol.

For a decoder, queue adapter, RPC layer, or portability library, the important boundary is usually between received bytes and accepted message. A frame can be present yet still fail a length check, a required-field check, a checksum or signature check, a type discriminator, or a version-specific rule.

Useful evidence to keep

  • The API or library that produced EBADMSG, its return value, and the error value captured immediately afterwards.
  • The protocol stage, expected message type or version, declared length, and validation rule that rejected the input.
  • A bounded, redacted representation of the header or message metadata when it is safe to retain it.

EBADMSG concerns one unacceptable message. It should not be treated as a synonym for a lost connection or for the broader protocol-state failure represented by EPROTO.

References


Looking for a different code? Search another status or error code.