When a decode exception happens in the proton transport while decoding incoming frames, proton closes the transport and emits a close frame (typically causing a response close to be sent) but the client itself is essentially unaware until later. An example of this was seen while identifying
If the response close (or other data) arrives, the client tries to process the proton transport with the data, which throws due to its input already being closed. This triggers the connection failure handling and provokes a stack trace in the logs, but neither gives much helpful info about the cause of the overall situation, simply referring to the resulting 'tail closed' situation.
PROTON-2142 fixes the proton-j handling to ensure the close frame emitted actually contains a decode error giving some indication of what actually lead to the closure. The client should also look to handle this situation better itself though, using notice of the transport decode error occurring to trigger its failure handling directly with the error detail noted as the failure cause, and skip further input processing.