Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/core/sock/sockinfo_tcp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,9 @@ sockinfo_tcp::~sockinfo_tcp()
destructor_helper_tcp();

if (m_tcp_seg_in_use) {
si_tcp_logwarn("still %d tcp segs in use!", m_tcp_seg_in_use);
si_tcp_logwarn(
"still %d tcp segs in use! state=%d, pcb.unsent=%p, pcb.unacked=%p, pcb.seg_alloc=%p",
m_tcp_seg_in_use, get_tcp_state(&m_pcb), m_pcb.unsent, m_pcb.unacked, m_pcb.seg_alloc);
}
if (m_tcp_seg_list) {
g_tcp_seg_pool->put_objs(m_tcp_seg_list);
Expand Down Expand Up @@ -1956,6 +1958,11 @@ void sockinfo_tcp::handle_incoming_handshake_failure(sockinfo_tcp *child_conn)

child_conn->lock_tcp_con();

/* Abort the connection first to avoid sending RST/FIN during close().
* tcp_abort() -> tcp_abandon() does NOT send RST for SYN_RCVD state (per Linux behavior).
* This prevents segment allocation during close() path. */
child_conn->abort_connection();

if (safe_mce_sys().tcp_ctl_thread != option_tcp_ctl_thread::CTL_THREAD_DELEGATE_TCP_TIMERS) {
// Object destruction is expected to happen in internal thread. Unless XLIO is in late
// terminating stage, in which case we don't expect to handle packets.
Expand Down