Skip to content

Abort client RPC in homa_data_pkt if homa_message_in_init fails - #16

Closed
Stuartwastaken wants to merge 1 commit into
mainfrom
fix/data-pkt-msgin-init-failure
Closed

Stuartwastaken wants to merge 1 commit into
mainfrom
fix/data-pkt-msgin-init-failure

Conversation

@Stuartwastaken

Copy link
Copy Markdown
Owner

If homa_message_in_init fails for the first response packet, homa_data_pkt has already set the client RPC to RPC_INCOMING. With no bpages, every later DATA packet is dropped, and homa_timer_check_rpc keeps resetting silent_ticks because it thinks the RPC is waiting for buffer space, so the RPC never times out and recvmsg waits forever. It happens when the response length is 0 or above HOMA_MAX_MESSAGE_LENGTH, or when the client socket has no receive buffer region.

This aborts the RPC with the error from homa_message_in_init. Just leaving the RPC in RPC_OUTGOING doesn't work for the no-region case: each retransmitted DATA packet resets silent_ticks, so the client's RESENDs and the server's retransmits go on forever.

homa_data_pkt__initialize_msgin_fails and the new check in homa_data_pkt__no_buffer_pool fail without the change.

The RPC was left in RPC_INCOMING with no buffers, so later DATA
packets were dropped and homa_timer_check_rpc treated it as waiting
for buffer space: it never timed out and recvmsg blocked forever.
This happens for a response with an invalid length or a socket with
no receive buffer region.
@Stuartwastaken
Stuartwastaken force-pushed the fix/data-pkt-msgin-init-failure branch from 85ed800 to a48f7cf Compare November 18, 2026 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant