Bug 155407 - [tcp] Exhausted net.inet.tcp.reass.maxsegments block recovering tcp session
Summary: [tcp] Exhausted net.inet.tcp.reass.maxsegments block recovering tcp session
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: Lawrence Stewart
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-09 12:30 UTC by slw
Modified: 2012-08-21 01:11 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description slw 2011-03-09 12:30:11 UTC
Exhausted net.inet.tcp.reass.maxsegments block recovering tcp session
(for this socket and any other socket waiting for retransmited packets).

After exhausted net.inet.tcp.reass.maxsegments allocation new entry in
tcp_reass failed (for this socket and any other socket waiting for
retransmited packets).

        te = uma_zalloc(V_tcp_reass_zone, M_NOWAIT);
        if (te == NULL) {
                TCPSTAT_INC(tcps_rcvmemdrop);
                m_freem(m);
                *tlenp = 0;
                return (0);
        }

That is packet can be reduce reassemble queue dropped.

Fix: 

Workaround: set net.inet.tcp.reass.maxsegments in /boot/loader.conf to big value.
How-To-Repeat: Need high bandwidth-delay channel with high, but rare drop.

After lost incoming TCP segment and before got retranmited this
segment net.inet.tcp.reass.maxsegments exhausted.

Software emulation:

Tuning by http://fasterdata.es.net/fasterdata/host-tuning/freebsd/
sysctl net.inet.tcp.recvspace=1048576
sysctl net.inet.ip.dummynet.pipe_slot_limit=3000
ipfw pipe 1 config delay 300 queue 3000
ipfw add 100 pipe 1 ip from test_hot to me

fetch http://test_host/big_file

After reach 7MB/s: ipfw pipe 1 config delay 300 queue 3000 plr 0.1
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2011-03-09 20:47:14 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-net

Over to maintainer(s).
Comment 2 Lawrence Stewart freebsd_committer freebsd_triage 2011-03-12 06:48:44 UTC
Responsible Changed
From-To: freebsd-net->lstewart

Grab.
Comment 3 Lawrence Stewart freebsd_committer freebsd_triage 2012-01-25 11:31:21 UTC
State Changed
From-To: open->patched

Fix has been MFCed to 8.2-STABLE as svn r230534
Comment 4 Lawrence Stewart freebsd_committer freebsd_triage 2012-08-21 01:11:43 UTC
State Changed
From-To: patched->closed

Issue fixed by patch; no further reports of problem.