Reporting possible bug in DCCP Feature negotiation
Subsystems (2)
Hi Gerrit, during some experiments using iperf to transmit one TCP flow against 3 DCCP flows, one DCCP thread stopped and it was shown the following message:
"[ 6286.864021] BUG: Failed negotiation in state 2 at net/dccp/feat.c:1370/dccp_feat_activate_values()"
Here it is the complete debug msgs including the dumped stack at the time the error occurred:
{...}
[ 3128.785764] dccp_hdlr_ack_ratio: Not changing RX Ack Ratio from 1 to 2 [ 3128.785771] dccp_hdlr_ack_ratio: Not changing TX Ack Ratio from 1 to 0 [ 3128.923926] dccp_hdlr_ack_ratio: Not changing RX Ack Ratio from 1 to 2 [ 3128.923926] dccp_hdlr_ack_ratio: Not changing TX Ack Ratio from 1 to 0 [ 3289.686450] dccp_hdlr_ack_ratio: Not changing RX Ack Ratio from 1 to 2 [ 3289.686456] dccp_hdlr_ack_ratio: Not changing TX Ack Ratio from 1 to 0 [ 3289.687339] dccp_hdlr_ack_ratio: Not changing RX Ack Ratio from 1 to 2 [ 3289.687339] dccp_hdlr_ack_ratio: Not changing TX Ack Ratio from 1 to 0 [ 3290.431806] dccp_hdlr_ack_ratio: Not changing RX Ack Ratio from 1 to 2 [ 3290.431806] dccp_hdlr_ack_ratio: Not changing TX Ack Ratio from 1 to 0 [ 3360.243731] dccp_hdlr_ack_ratio: Not changing RX Ack Ratio from 1 to 2 [ 3360.243731] dccp_hdlr_ack_ratio: Not changing TX Ack Ratio from 1 to 0 [ 3360.409402] dccp_hdlr_ack_ratio: Not changing RX Ack Ratio from 1 to 2 [ 3360.409408] dccp_hdlr_ack_ratio: Not changing TX Ack Ratio from 1 to 0 [ 3360.532210] dccp_hdlr_ack_ratio: Not changing RX Ack Ratio from 1 to 2 [ 3360.532215] dccp_hdlr_ack_ratio: Not changing TX Ack Ratio from 1 to 0 [ 4086.271326] dccp_hdlr_ack_ratio: Not changing RX Ack Ratio from 1 to 2 [ 4086.271326] dccp_hdlr_ack_ratio: Not changing TX Ack Ratio from 1 to 0 [ 4086.286582] dccp_hdlr_ack_ratio: Not changing RX Ack Ratio from 1 to 2 [ 4086.286587] dccp_hdlr_ack_ratio: Not changing TX Ack Ratio from 1 to 0 [ 4086.663086] dccp_hdlr_ack_ratio: Not changing RX Ack Ratio from 1 to 2 [ 4086.663091] dccp_hdlr_ack_ratio: Not changing TX Ack Ratio from 1 to 0 [ 4496.981354] dccp_hdlr_ack_ratio: Not changing RX Ack Ratio from 1 to 2 [ 4496.981354] dccp_hdlr_ack_ratio: Not changing TX Ack Ratio from 1 to 0 [ 4497.049848] dccp_hdlr_ack_ratio: Not changing RX Ack Ratio from 1 to 2 [ 4497.049853] dccp_hdlr_ack_ratio: Not changing TX Ack Ratio from 1 to 0 [ 4497.259798] dccp_hdlr_ack_ratio: Not changing RX Ack Ratio from 1 to 2 [ 4497.259798] dccp_hdlr_ack_ratio: Not changing TX Ack Ratio from 1 to 0 [ 4510.339903] dccp_v4_rcv: dropped packet with invalid checksum [ 4510.345670] tfrc_calc_x_reverse_lookup: fvalue 6478 smaller than resolution [ 4833.172100] dccp_hdlr_ack_ratio: Not changing RX Ack Ratio from 1 to 2 [ 4833.172100] dccp_hdlr_ack_ratio: Not changing TX Ack Ratio from 1 to 2 [ 4833.240064] dccp_hdlr_ack_ratio: Not changing RX Ack Ratio from 1 to 2 [ 4833.240069] dccp_hdlr_ack_ratio: Not changing TX Ack Ratio from 1 to 2 [ 4833.382804] dccp_hdlr_ack_ratio: Not changing RX Ack Ratio from 1 to 2 [ 4833.382804] dccp_hdlr_ack_ratio: Not changing TX Ack Ratio from 1 to 2 [ 4852.431819] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 [ 4853.013621] dccp_ackvec_add_new: Warning: large burst loss (583) [ 4853.015678] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 [ 4855.087753] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 [ 4855.124335] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 [ 4863.988418] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 [ 4869.698085] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 [ 4882.272518] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 [ 4906.408436] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 [ 5467.093407] e1000: eth0: e1000_watchdog: NIC Link is Down [ 5470.228254] e1000: eth0: e1000_watchdog: NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX [ 5678.233254] dccp_hdlr_ack_ratio: Not changing RX Ack Ratio from 1 to 2 [ 5678.233254] dccp_hdlr_ack_ratio: Not changing TX Ack Ratio from 1 to 2 [ 5678.253538] dccp_hdlr_ack_ratio: Not changing RX Ack Ratio from 1 to 2 [ 5678.253538] dccp_hdlr_ack_ratio: Not changing TX Ack Ratio from 1 to 2 [ 5678.269784] dccp_hdlr_ack_ratio: Not changing RX Ack Ratio from 1 to 2 [ 5678.269789] dccp_hdlr_ack_ratio: Not changing TX Ack Ratio from 1 to 2 [ 5690.125731] dccp_ackvec_add_new: Warning: large burst loss (943) [ 5694.298819] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 [ 5703.277199] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 [ 5712.424335] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 [ 5712.454539] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 [ 5713.401402] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 [ 5713.413144] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 [ 5725.191982] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 [ 5735.038682] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 [ 5739.712935] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 [ 5745.579295] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 [ 5747.246785] dccp_ackvec_add_new: Warning: large burst loss (76) [ 5747.398720] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 [ 5753.560438] printk: 2 messages suppressed. [ 5753.560438] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 [ 5759.789116] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 [ 6270.335006] dccp_hdlr_ack_ratio: Not changing RX Ack Ratio from 1 to 2 [ 6270.335006] dccp_hdlr_ack_ratio: Not changing TX Ack Ratio from 1 to 2 [ 6270.506015] dccp_hdlr_ack_ratio: Not changing RX Ack Ratio from 1 to 2 [ 6270.506015] dccp_hdlr_ack_ratio: Not changing TX Ack Ratio from 1 to 2 [ 6286.655846] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 [ 6286.864021] BUG: Failed negotiation in state 2 at net/dccp/feat.c:1370/dccp_feat_activate_values() [ 6286.864034] Pid: 0, comm: swapper Not tainted 2.6.25-rc3 #4 [ 6286.864034] [<c045c6bb>] dccp_feat_activate_values+0x7b/0x200 [ 6286.864034] [<c045f919>] dccp_create_openreq_child+0xb9/0x100 [ 6286.864034] [<c0465226>] dccp_v4_request_recv_sock+0x46/0x1b0 [ 6286.864034] [<c045f72e>] dccp_check_req+0x24e/0x380 [ 6286.864034] [<c04526b0>] ipt_hook+0x0/0x20 [ 6286.864034] [<c046543a>] dccp_v4_do_rcv+0xaa/0x160 [ 6286.864034] [<c03fb560>] sk_receive_skb+0xc0/0x110 [ 6286.864034] [<c04216c6>] ip_local_deliver_finish+0x66/0x120 [ 6286.864034] [<c0421660>] ip_local_deliver_finish+0x0/0x120 [ 6286.864034] [<c042144b>] ip_rcv_finish+0xfb/0x310 [ 6286.864034] [<c045b9b6>] packet_rcv_spkt+0x36/0x160 [ 6286.864034] [<c0421880>] ip_rcv+0x0/0x290 [ 6286.864034] [<c04028ed>] netif_receive_skb+0x19d/0x230 [ 6286.864034] [<c0405133>] process_backlog+0x63/0xd0 [ 6286.864034] [<c0404a99>] net_rx_action+0x89/0x180 [ 6286.864034] [<c01263e2>] __do_softirq+0x72/0xf0 [ 6286.864034] [<c0126497>] do_softirq+0x37/0x40 [ 6286.864034] [<c01065b0>] do_IRQ+0x40/0x70 [ 6286.864034] [<c0104b1f>] common_interrupt+0x23/0x28 [ 6286.864034] [<c01300d8>] sys_setdomainname+0x58/0xb0 [ 6286.864034] [<c0102d92>] default_idle+0x52/0x80 [ 6286.864034] [<c0102d40>] default_idle+0x0/0x80 [ 6286.864034] [<c0102bdd>] cpu_idle+0x4d/0xd0 [ 6286.864034] ===========[ 6288.714624] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 [ 6291.940610] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 [ 6296.571520] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 [ 6299.151136] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 [ 6299.538280] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 [ 6299.832571] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 [ 6301.420651] dccp_ackvec_add_new: Warning: large burst loss (77) [ 6301.615940] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 [ 6301.656874] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 [ 6305.733963] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 [ 6313.671300] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 [ 6321.234212] printk: 1 messages suppressed. [ 6321.234218] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 [ 6330.753268] printk: 5 messages suppressed. [ 6330.753268] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 [ 6349.155197] printk: 2 messages suppressed. [ 6349.155203] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 [ 6351.738799] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 [ 6352.184486] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2
| Hi Gerrit, during some experiments using iperf to transmit one TCP | flow against 3 DCCP flows, one DCCP thread stopped and it was shown | the following message: | | "[ 6286.864021] BUG: Failed negotiation in state 2 at | net/dccp/feat.c:1370/dccp_feat_activate_values()" |
Did it really stop? The trigger is only possible during the initial handshake, this is the only place where this activation-code is executed. So almost certainly it failed at the begin of the connection.
I am assuming that both end hosts have identical kernels, if they are using different versions of DCCP, this would be a likely cause.
The log is very interesting, but I can't say whether the error message is really a bug or if the action was correct under the given circumstances; below is explanation of the messages and further things to check.
Firstly, regarding the `BUG' message: it is part of the initial feature negotiation (during 3-way handshake). The "state 2" means FEAT_CHANGING, a Change option was sent but not confirmed.
The good thing of having a stack trace is that we know that this happened on the server, in dccp_create_openreq_child. It would be next to ideal to have a tcpdump of the scenario, but on paper this looks like:
* client is in PARTOPEN (has sent Ack, awaits packet from server);
* server is in RESPOND and about to move to OPEN;
* client has sent the Ack confirming the options requested by the server;
* the server complains that one of the options it has asked for was not confirmed.
Can you confirm that both end hosts really had identical DCCP versions?
In the log I see that there were several large burst losses plus one occurrence of `invalid' checksum. Is this a very lossy link - if the DCCP-Request/Response/Ack got retransmitted, the feature-negotiation options would in theory also be retransmitted, so that would not matter.
Individual information to the messages is below.
| [ 3128.785764] dccp_hdlr_ack_ratio: Not changing RX Ack Ratio from 1 to 2 <snip>
The "Not changing Ack Ratio" message are harmless, they are just a reminder that, due to still unresolved problems in CCID-2, dynamic switch of Ack Ratio is currently disabled: Ack Ratio is currently always 1, no matter the messages (net/dccp/minisocks.c).
| [ 4510.339903] dccp_v4_rcv: dropped packet with invalid checksum Checksum failure is extremely rare -- are you using a wireless link?
| [ 4852.431819] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 This message can also be ignored due to the earlier comment; when using dynamic Ack Ratios this would avoid persistent spurious RTO timeouts.
| [ 5467.093407] e1000: eth0: e1000_watchdog: NIC Link is Down | [ 5470.228254] e1000: eth0: e1000_watchdog: NIC Link is Up 100 Mbps | Full Duplex, Flow Control: RX/TX
Was traffic sent over eth0? If yes, then it may have relevance for the bug, for if the cable is disconnected in the middle of a connection, the situation changes.
| [ 4853.013621] dccp_ackvec_add_new: Warning: large burst loss (583) | [ 5690.125731] dccp_ackvec_add_new: Warning: large burst loss (943) | [ 5747.246785] dccp_ackvec_add_new: Warning: large burst loss (76) | [ 6301.420651] dccp_ackvec_add_new: Warning: large burst loss (77)
I have collated these messages - there is quite a lot of loss going on and I am wondering whether the Ack Vectors are properly dimensioned. This is independent of the bug report: in any case, the warning message says that multiple losses will now be compressed into cells of 63 lost packets each, instead of occupying one cell each (which would otherwise almost certainly lead to overflow).
Back to the bug report:
| [ 6286.655846] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 | [ 6286.864021] BUG: Failed negotiation in state 2 at | net/dccp/feat.c:1370/dccp_feat_activate_values() | [ 6286.864034] Pid: 0, comm: swapper Not tainted 2.6.25-rc3 #4 | [ 6286.864034] [<c045c6bb>] dccp_feat_activate_values+0x7b/0x200 | [ 6286.864034] [<c045f919>] dccp_create_openreq_child+0xb9/0x100
<snip>
| [ 6288.714624] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 The "Limiting Ack Ratio (4) to 2" must be from a different flow, since it was before the BUG message and continued afterwards.
Now I see what you meant by `stopped': if feature negotiation fails, the thread indeed stops, since otherwise it would mean to operate with an undefined (unconfirmed) option value, which will otherwise cause havoc. The server ends the connection with a reset (can you remember what the client reported after that?).
It is a pity that you don't have the tcpdump, this would allow to find out which feature option could not be negotiated.
What I will do for the moment is to turn the dccp_pr_debug() under the `activation_failed' into a DCCP_CRIT, so that it outputs the type of the feature that has failed.
Please check the above questions.
Gerrit
Quoted 10 lines · Gerrit Renker
| Hi Gerrit, during some experiments using iperf to transmit one TCP
| flow against 3 DCCP flows, one DCCP thread stopped and it was shown | the following message: | | "[ 6286.864021] BUG: Failed negotiation in state 2 at | net/dccp/feat.c:1370/dccp_feat_activate_values()" |Did it really stop? The trigger is only possible during the initial handshake, this is the only place where this activation-code is executed. So almost certainly it failed at the begin of the connection.
I started 3 DCCP connection, just 2 transmitted. Then the third is the one that had the problem.
Quoted 3 lines
I am assuming that both end hosts have identical kernels, if they are using different versions of DCCP, this would be a likely cause.
2.6.25-rc3 in both sides
Quoted 5 lines
The log is very interesting, but I can't say whether the error message is really a bug or if the action was correct under the given circumstances; below is explanation of the messages and further things to check.
Ok
Quoted 6 lines
Firstly, regarding the `BUG' message: it is part of the initial feature negotiation (during 3-way handshake). The "state 2" means
FEAT_CHANGING, a Change option was sent but not confirmed.
The good thing of having a stack trace is that we know that this happened on the server,
Yes, in fact.
Quoted 10 lines
in
dccp_create_openreq_child. It would be next
to ideal to have a tcpdump of the scenario, but on paper this looks like:
* client is in PARTOPEN (has sent Ack, awaits packet from server);
* server is in RESPOND and about to move to OPEN;
* client has sent the Ack confirming the options requested by the server;
* the server complains that one of the options it has asked for was not confirmed.
Can you confirm that both end hosts really had identical DCCP versions?
Yes, the same version of DCCP. I repeated the same scenario and this situation didn't happened anymore
Quoted 5 lines
In the log I see that there were several large burst losses plus one occurrence of `invalid' checksum. Is this a very lossy link - if the DCCP-Request/Response/Ack got retransmitted, the feature-negotiation options would in theory also be retransmitted, so that would not matter.
I'm using one end connected to a wifi 802.11g access point and the other connected via ethernet in this same access point. The ethernet point is the server, the wifi point, the client.
Quoted 11 lines
Individual information to the messages is below.
| [ 3128.785764]
dccp_hdlr_ack_ratio: Not changing RX Ack Ratio from 1 to 2 <snip>
The "Not changing Ack Ratio" message are harmless, they are just a reminder that, due to still unresolved problems in CCID-2, dynamic switch of Ack Ratio is currently disabled: Ack Ratio is currently always 1, no matter the messages (net/dccp/minisocks.c).
Quoted 3 lines
| [ 4510.339903]
dccp_v4_rcv: dropped packet with invalid checksum Checksum failure is extremely rare -- are you using a wireless link?
Yes, wireless link.
Quoted 9 lines
| [ 4852.431819]
ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 This message can also be ignored due to the earlier comment; when using dynamic Ack Ratios this would avoid persistent spurious RTO timeouts.
Quoted 7 lines
| [ 5467.093407] e1000: eth0: e1000_watchdog: NIC Link is Down | [ 5470.228254] e1000: eth0: e1000_watchdog: NIC Link is Up 100 Mbps | Full Duplex, Flow Control: RX/TXWas traffic sent over eth0? If yes, then it may have relevance for the bug, for if the cable is disconnected in the middle of a connection, the situation changes.
I don't know what happened in this moment, since nobody unplug the cable, AFAIK.
Quoted 11 lines
| [ 4853.013621]
dccp_ackvec_add_new: Warning: large burst loss (583)| [ 5690.125731]
dccp_ackvec_add_new: Warning: large burst loss (943)| [ 5747.246785]
dccp_ackvec_add_new: Warning: large burst loss (76)| [ 6301.420651]
dccp_ackvec_add_new: Warning: large burst loss (77)
I have collated these messages - there is quite a lot of loss going on and I am wondering whether the Ack Vectors are properly dimensioned.
Hum... this is one thing to check. For my situation (wifi and ethernet link), what do you suggest to use. To properly dimension Ack vectors, do I need just to set the parameters like that?:
sudo sysctl -w net.dccp.default.seq_window000
sudo sysctl -w net.dccp.default.send_ackvec=1
Quoted 14 lines
This is independent of the bug report: in any case, the warning message says that multiple losses will now be compressed into cells of 63 lost packets each, instead of occupying one cell each (which would otherwise almost certainly lead to overflow).
Back to the bug report:
| [ 6286.655846] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 | [ 6286.864021] BUG: Failed negotiation in state 2 at | net/dccp/feat.c:1370/dccp_feat_activate_values() | [ 6286.864034] Pid: 0, comm: swapper Not tainted 2.6.25-rc3 #4 | [ 6286.864034] [<c045c6bb>] dccp_feat_activate_values+0x7b/0x200 | [ 6286.864034] [<c045f919>] dccp_create_openreq_child+0xb9/0x100
Quoted 5 lines
<snip>
| [ 6288.714624]
ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2
The "Limiting Ack Ratio (4) to 2" must be from a different flow, since it was before the BUG message and continued afterwards.
Probably, I setup iperf with -P 3 for DCCP
Quoted 6 lines
Now I see what you meant by `stopped': if feature negotiation fails, the thread indeed stops, since otherwise it would mean to operate with an undefined (unconfirmed) option value, which will otherwise cause havoc. The server ends the connection with a reset (can you remember what the client reported after that?).
I didn't check the client side log! :(
Quoted 3 lines
It is a pity that you don't have the tcpdump, this would allow to find out which feature option could not be negotiated.
I'm sorry about that! :(
Quoted 4 lines
What I will do for the moment is to turn the
dccp_pr_debug()under the `activation_failed' into aDCCP_CRIT, so that it outputs the type of the feature that has failed.
That's a good idea!
Quoted 5 lines
Please check the above questions.
Gerrit
Leandro.
Quoted 176 lines · Leandro Sales
Quoted 10 lines · Gerrit Renker
| Hi Gerrit, during some experiments using iperf to transmit one TCP
| flow against 3 DCCP flows, one DCCP thread stopped and it was shown | the following message: | | "[ 6286.864021] BUG: Failed negotiation in state 2 at | net/dccp/feat.c:1370/dccp_feat_activate_values()" |Did it really stop? The trigger is only possible during the initial handshake, this is the only place where this activation-code is executed. So almost certainly it failed at the begin of the connection.
I started 3 DCCP connection, just 2 transmitted. Then the third is the one that had the problem.
Quoted 3 lines
I am assuming that both end hosts have identical kernels, if they are using different versions of DCCP, this would be a likely cause.
2.6.25-rc3 in both sides
Quoted 5 lines
The log is very interesting, but I can't say whether the error message is really a bug or if the action was correct under the given circumstances; below is explanation of the messages and further things to check.
Ok
Quoted 6 lines
Firstly, regarding the `BUG' message: it is part of the initial feature negotiation (during 3-way handshake). The "state 2" means
FEAT_CHANGING, a Change option was sent but not confirmed.
The good thing of having a stack trace is that we know that this happened on the server,Yes, in fact.
Quoted 10 lines
in
dccp_create_openreq_child. It would be next
to ideal to have a tcpdump of the scenario, but on paper this looks like:
* client is in PARTOPEN (has sent Ack, awaits packet from server);
* server is in RESPOND and about to move to OPEN;
* client has sent the Ack confirming the options requested by the server;
* the server complains that one of the options it has asked for was not confirmed.
Can you confirm that both end hosts really had identical DCCP versions?Yes, the same version of DCCP. I repeated the same scenario and this situation didn't happened anymore
Quoted 5 lines
In the log I see that there were several large burst losses plus one occurrence of `invalid' checksum. Is this a very lossy link - if the DCCP-Request/Response/Ack got retransmitted, the feature-negotiation options would in theory also be retransmitted, so that would not matter.
I'm using one end connected to a wifi 802.11g access point and the other connected via ethernet in this same access point. The ethernet point is the server, the wifi point, the client.
Quoted 11 lines
Individual information to the messages is below.
| [ 3128.785764]
dccp_hdlr_ack_ratio: Not changing RX Ack Ratio from 1 to 2 <snip>
The "Not changing Ack Ratio" message are harmless, they are just a reminder that, due to still unresolved problems in CCID-2, dynamic switch of Ack Ratio is currently disabled: Ack Ratio is currently always 1, no matter the messages (net/dccp/minisocks.c).Quoted 3 lines
| [ 4510.339903]
dccp_v4_rcv: dropped packet with invalid checksum Checksum failure is extremely rare -- are you using a wireless link?Yes, wireless link.
Quoted 9 lines
| [ 4852.431819]
ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 This message can also be ignored due to the earlier comment; when using dynamic Ack Ratios this would avoid persistent spurious RTO timeouts.Quoted 7 lines
| [ 5467.093407] e1000: eth0: e1000_watchdog: NIC Link is Down | [ 5470.228254] e1000: eth0: e1000_watchdog: NIC Link is Up 100 Mbps | Full Duplex, Flow Control: RX/TXWas traffic sent over eth0? If yes, then it may have relevance for the bug, for if the cable is disconnected in the middle of a connection, the situation changes.
I don't know what happened in this moment, since nobody unplug the cable, AFAIK.
Quoted 11 lines
| [ 4853.013621]
dccp_ackvec_add_new: Warning: large burst loss (583)| [ 5690.125731]
dccp_ackvec_add_new: Warning: large burst loss (943)| [ 5747.246785]
dccp_ackvec_add_new: Warning: large burst loss (76)| [ 6301.420651]
dccp_ackvec_add_new: Warning: large burst loss (77)
I have collated these messages - there is quite a lot of loss going on and I am wondering whether the Ack Vectors are properly dimensioned.Hum... this is one thing to check. For my situation (wifi and ethernet link), what do you suggest to use. To properly dimension Ack vectors, do I need just to set the parameters like that?:
sudo sysctl -w net.dccp.default.seq_window000
sudo sysctl -w net.dccp.default.send_ackvec=1Quoted 14 lines
This is independent of the bug report: in any case, the warning message says that multiple losses will now be compressed into cells of 63 lost packets each, instead of occupying one cell each (which would otherwise almost certainly lead to overflow).
Back to the bug report:
| [ 6286.655846] ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2 | [ 6286.864021] BUG: Failed negotiation in state 2 at | net/dccp/feat.c:1370/dccp_feat_activate_values() | [ 6286.864034] Pid: 0, comm: swapper Not tainted 2.6.25-rc3 #4 | [ 6286.864034] [<c045c6bb>] dccp_feat_activate_values+0x7b/0x200 | [ 6286.864034] [<c045f919>] dccp_create_openreq_child+0xb9/0x100Quoted 5 lines
<snip>
| [ 6288.714624]
ccid2_change_l_ack_ratio: Limiting Ack Ratio (4) to 2
The "Limiting Ack Ratio (4) to 2" must be from a different flow, since it was before the BUG message and continued afterwards.Probably, I setup iperf with -P 3 for DCCP
Quoted 6 lines
Now I see what you meant by `stopped': if feature negotiation fails, the thread indeed stops, since otherwise it would mean to operate with an undefined (unconfirmed) option value, which will otherwise cause havoc. The server ends the connection with a reset (can you remember what the client reported after that?).
I didn't check the client side log! :(
Quoted 3 lines
It is a pity that you don't have the tcpdump, this would allow to find out which feature option could not be negotiated.
I'm sorry about that! :(
Quoted 4 lines
What I will do for the moment is to turn the
dccp_pr_debug()under the `activation_failed' into aDCCP_CRIT, so that it outputs the type of the feature that has failed.That's a good idea!
Quoted 1 line
Quoted 7 lines
Quoted 4 lines
Please check the above questions.
Gerrit
Leandro.
Just to inform:
sysctl -w net.dccp.default.send_ackvec=1
error: "net.dccp.default.send_ackvec" is an unknown key
I remember that you removed this option in the kernel. In this case I will update the DCCP wiki, ok?
Leandro.
| Just to inform: | | sysctl -w net.dccp.default.send_ackvec=1 | error: "net.dccp.default.send_ackvec" is an unknown key | | I remember that you removed this option in the kernel. In this case I | will update the DCCP wiki, ok? |
This option switches sending Ack Vectors on/off. It was removed since CCID-2 will not work without Ack Vectors, and in CCID-3 Ack Vectors are just ignored.
In the mainline kernel this option is still needed since there is no other way of enabling Ack Vectors; the test tree enables/disabled according to the CCID.
In the mainline kernel Ack Vectors are by default on (due to #define DCCPF_INITIAL_SEND_ACK_VECTOR 1), so this will not hurt CCID-2.
Thanks for updating
http://www.linux-foundation.org/en/Net:DCCP#Choosing_and_initialising_your_CCID
| > | Hi Gerrit, during some experiments using iperf to transmit one TCP | > | flow against 3 DCCP flows, one DCCP thread stopped and it was shown | > | the following message: | > | | > | "[ 6286.864021] BUG: Failed negotiation in state 2 at | > | net/dccp/feat.c:1370/dccp_feat_activate_values()" | > | | > Did it really stop? The trigger is only possible during the initial | > handshake, this is the only place where this activation-code is | > executed. So almost certainly it failed at the begin of the connection. | | I started 3 DCCP connection, just 2 transmitted. Then the third is the | one that had the problem. | <snip> | | Yes, the same version of DCCP. I repeated the same scenario and this | situation didn't happened anymore |
Thank you for checking again. It seems that this may be some kind of timing problem: 2 parallel connections succeeded, the third could not negotiate its features. I will try to reproduce this, so far parallel connections of up to 4 streams worked without glitches.
In the test kernel I have changed the statement from dccp_pr_debug in feat.c to DCCP_CRIT:
activation_failed:
DCCP_CRIT("Activation of %s failed", idx < 0 ? "unknown feature" :
dccp_feat_fname(dccp_feat_table[idx].feat_num));
So that, should the problem re-appear, the feature name will be printed.
| > | [ 4853.013621] dccp_ackvec_add_new: Warning: large burst loss (583) | > | [ 5690.125731] dccp_ackvec_add_new: Warning: large burst loss (943) | > | [ 5747.246785] dccp_ackvec_add_new: Warning: large burst loss (76) | > | [ 6301.420651] dccp_ackvec_add_new: Warning: large burst loss (77) | > I have collated these messages - there is quite a lot of loss going on | > and I am wondering whether the Ack Vectors are properly dimensioned. | | Hum... this is one thing to check. For my situation (wifi and ethernet | link), what do you suggest to use. To properly dimension Ack vectors, | do I need just to set the parameters like that?: | | sudo sysctl -w net.dccp.default.seq_window000 | sudo sysctl -w net.dccp.default.send_ackvec=1
The short answer is - tuning is not necessary, the Ack Vectors should take care of this themselves.
Long answer: The above warning messages indicate that the Ack Vectors switch from "linear mode" (where one cell is allocated for each missing packet) to "compressed mode" (where the burst loss is compressed in the minimum number of cells).
The disadvantage/trade-off is that in compressed mode no changes are possible, i.e. if the burst was in part due to reordering, subsequent acknowledgments will not change this. On the other hand, linear mode is impracticable for all but the most trivial scenarios, since it has huge demands on memory - in the order of O(burst_length). This can lead to "fun" when using a high-speed link in combination with high Ack Ratio.
| negotiate its features. I will try to reproduce this, so far parallel | connections of up to 4 streams worked without glitches. |
Tested up to 56 connections in parallel. At values > 50 this results frequently in a Reset with Reset Code "Too Busy", which is translated into the (appropriate) error message "Too many users".
Could not trigger specified bug.
Leandro,
I can now confirm that this is indeed a bug. It is caused by the client not retransmitting Confirm options while in state PARTOPEN.
A detailed analysis with capture files has been uploaded to
http://www.erg.abdn.ac.uk/users/gerrit/dccp/notes/feature_negotiation/why_retransmit_confirms/
The fix is to retransmit Confirm options until entering OPEN state. A patch is attached and has been put into the test tree.
There is another bug fix involved, this is documented on the website, will send second patch subsequently.
Many thanks for testing and reporting.
Gerrit
| Hi Gerrit, during some experiments using iperf to transmit one TCP
| flow against 3 DCCP flows, one DCCP thread stopped and it was shown
| the following message:
|
| "[ 6286.864021] BUG: Failed negotiation in state 2 at
| net/dccp/feat.c:1370/dccp_feat_activate_values()"
|
| Here it is the complete debug msgs including the dumped stack at the
| time the error occurred:
|
| {...}
| [ 6286.864021] BUG: Failed negotiation in state 2 at
| net/dccp/feat.c:1370/dccp_feat_activate_values()
| [ 6286.864034] Pid: 0, comm: swapper Not tainted 2.6.25-rc3 #4
| [ 6286.864034] [<c045c6bb>] dccp_feat_activate_values+0x7b/0x200
| [ 6286.864034] [<c045f919>] dccp_create_openreq_child+0xb9/0x100
| [ 6286.864034] [<c0465226>] dccp_v4_request_recv_sock+0x46/0x1b0
| [ 6286.864034] [<c045f72e>] dccp_check_req+0x24e/0x380
| [ 6286.864034] [<c04526b0>] ipt_hook+0x0/0x20
| [ 6286.864034] [<c046543a>] dccp_v4_do_rcv+0xaa/0x160
| [ 6286.864034] [<c03fb560>] sk_receive_skb+0xc0/0x110
| [ 6286.864034] [<c04216c6>] ip_local_deliver_finish+0x66/0x120
| [ 6286.864034] [<c0421660>] ip_local_deliver_finish+0x0/0x120
| [ 6286.864034] [<c042144b>] ip_rcv_finish+0xfb/0x310
| [ 6286.864034] [<c045b9b6>] packet_rcv_spkt+0x36/0x160
| [ 6286.864034] [<c0421880>] ip_rcv+0x0/0x290
| [ 6286.864034] [<c04028ed>] netif_receive_skb+0x19d/0x230
| [ 6286.864034] [<c0405133>] process_backlog+0x63/0xd0
| [ 6286.864034] [<c0404a99>] net_rx_action+0x89/0x180
| [ 6286.864034] [<c01263e2>] __do_softirq+0x72/0xf0
| [ 6286.864034] [<c0126497>] do_softirq+0x37/0x40
| [ 6286.864034] [<c01065b0>] do_IRQ+0x40/0x70
| [ 6286.864034] [<c0104b1f>] common_interrupt+0x23/0x28
| [ 6286.864034] [<c01300d8>] sys_setdomainname+0x58/0xb0
| [ 6286.864034] [<c0102d92>] default_idle+0x52/0x80
| [ 6286.864034] [<c0102d40>] default_idle+0x0/0x80
| [ 6286.864034] [<c0102bdd>] cpu_idle+0x4d/0xd0
| [ 6286.864034] =======================[DCCP]: Bug-fix for feature-negotiation
This fixes an issue in client feature-negotiation: as long as the client is in PARTOPEN, it needs to retransmit the Confirm options for the Change options received on the DCCP-Response from the server.
Otherwise, if the packet containing the Confirm options gets dropped in the network, the connection aborts due to undefined feature negotiation state.
This patch fixes the problem by flushing the client queue only when entering the OPEN state. Since confirmed Change options are removed as soon as they are confirmed (in the DCCP-Response), this ensures that Confirm options are retransmitted.
The remainder of the patch serves to make problem reporting more informative when feature negotiation has failed.
--- net/dccp/feat.c | 25 +++++++++++++------------ net/dccp/proto.c | 3 +++ 2 files changed, 16 insertions(+), 12 deletions(-)
net/dccp/proto.c +3 -0
@@ -67,6 +67,9 @@ void dccp_set_state(struct sock *sk, concase DCCP_OPEN :if (oldstate !=DCCP_OPEN )DCCP_INC_STATS (DCCP_MIB_CURRESTAB ); +/* Client retransmits all Confirm options until entering OPEN */ +if (oldstate ==DCCP_PARTOPEN ) +dccp_feat_list_purge (&dccp_sk (sk)->dccps_featneg);break ;case DCCP_CLOSED :
net/dccp/feat.c +13 -12
@@ -639,16 +639,10 @@ int dccp_feat_insert_opts(struct dccp_soif (pos->needs_mandatory &&dccp_insert_option_mandatory (skb))return -1 ;/* -* Keeping State: Enter CHANGING state after transmitting the -* Change option (6.6.2). Furthermore, Confirm options are not -* retransmitted (6.2) - with the exception of request sockets, -* where removal of the confirmed entry is deferred until the -* child socket has been created. +* Enter CHANGING after transmitting the Change option (6.6.2). */ if (pos->state ==FEAT_INITIALISING ) pos->state =FEAT_CHANGING ; -else if (pos->needs_confirm && dreq ==NULL ) -dccp_feat_list_pop (pos); }return 0 ; }
@@ -1456,8 +1450,15 @@ int dccp_feat_activate_values(struct soclist_for_each_entry (cur, fn_list, node) { idx =dccp_feat_index (cur->feat_num); -if (cur->state !=FEAT_STABLE || idx <0 ) { -DCCP_BUG ("Failed negotiation in state %u" , cur->state); +if (idx <0 ) { +DCCP_BUG ("Unknown feature %u" , cur->feat_num); + goto activation_failed; + } +if (cur->state !=FEAT_STABLE ) { +DCCP_CRIT ("Negotiation of %s %s failed in state %s" , + cur->is_local ?"local" :"remote" , +dccp_feat_fname (cur->feat_num), + dccp_feat_sname[cur->state]); goto activation_failed; } fvals[idx][cur->is_local] = &cur->val;
@@ -1471,8 +1472,10 @@ int dccp_feat_activate_values(struct soc*/ for (idx =DCCP_FEAT_SUPPORTED_MAX ; --idx >=0 ;)if (__dccp_feat_activate (sk, idx,0 , fvals[idx][0 ]) || -__dccp_feat_activate (sk, idx,1 , fvals[idx][1 ])) +__dccp_feat_activate (sk, idx,1 , fvals[idx][1 ])) { +DCCP_CRIT ("Could not activate %d" , idx); goto activation_failed; + }/* Clean up Change options which have been confirmed already */ list_for_each_entry_safe (cur, next, fn_list, node)
@@ -1483,8 +1486,6 @@ int dccp_feat_activate_values(struct socreturn 0 ; activation_failed: -DCCP_CRIT ("Activation of %s failed" , idx <0 ?"unknown feature" : -dccp_feat_fname (dccp_feat_table[idx].feat_num));/* * We clean up everything that may have been allocated, since * it is difficult to track at which stage negotiation failed.
PATCH 1/1 : Special case for client-PARTOPEN with DataAcks
(This is an update for the test-tree, not meant for mainline now)
--------------------------> Patch <------------------------------------- [DCCP]: Special case for client-PARTOPEN with DataAcks
There are two conflicting goals: providing a large room for options and allowing the client to send DataAcks in the "half-open" PARTOPEN state.
To increase robustness, it is necessary to resend Confirm feature-negotiation options, even though the RFC does not mandate it. But feature negotiation options can take (much) more room than the options on common DataAck packets.
Instead of reducing the MPS always for a case which only applies to the three messages send during initial handshake, this patch devises a special case:
if the payload length of the DataAck in PARTOPEN is too large, an Ack is sent to carry the options, and the feature-negotiation list is then flushed.
This means that the server gets two Acks for one Response. If both Acks get lost, it is probably better to restart the connection anyway and devising yet another special-case does not seem worth the extra complexity.
--- net/dccp/feat.h | 3 +++ net/dccp/output.c | 16 +++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-)
net/dccp/feat.h +3 -0
@@ -23,6 +23,9 @@#define DCCPF_SEQ_WMIN 32#define DCCPF_SEQ_WMAX 0x3FFFFFFFFFFFull +/* Feature-negotiation overhead in multiples of 4-byte words */ +#define DCCP_FEATNEG_OVERHEAD_FACTOR 32 +enum dccp_feat_type {FEAT_AT_RX =1 ,/* located at RX side of half-connection */ FEAT_AT_TX =2 ,/* located at TX side of half-connection */
net/dccp/output.c +15 -1
@@ -245,7 +245,21 @@ static void dccp_xmit_packet(struct sock len = skb->len;if (sk->sk_state =DCCP_PARTOPEN ) { -/* See 8.1.5. Handshake Completion */ +const u32 overhead =DCCP_FEATNEG_OVERHEAD_FACTOR <<2 ; +/* +* See 8.1.5 - Handshake Completion. +* For robustness we resend Confirm options until the client has +* entered OPEN. Unfortunately, the "copious space for options" +* (RFC 4340, 4.6) means that there is less space for payload. +* For overly large payloads, send second Ack to carry options. +*/ +if (!list_empty (&dp->dccps_featneg) && + len + overhead >= dp->dccps_mss_cache) { +DCCP_WARN ("Payload too large (%d) for featneg.\n" , len); +dccp_send_ack (sk); +dccp_feat_list_purge (&dp->dccps_featneg); + } +inet_csk_schedule_ack (sk); inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK, inet_csk(sk)->icsk_rto,
Hello Gerrit,
it is nice to know that you confirmed my bug report. Good job, I
just read the attached patch. Is the patch already in the test tree?
Thank you,
Leandro.
Quoted 48 lines · Gerrit Renker
Leandro,
I can now confirm that this is indeed a bug. It is caused by the client not retransmitting Confirm options while in state PARTOPEN.
A detailed analysis with capture files has been uploaded to
http://www.erg.abdn.ac.uk/users/gerrit/dccp/notes/feature_negotiation/why_retransmit_confirms/The fix is to retransmit Confirm options until entering OPEN state. A patch is attached and has been put into the test tree.
There is another bug fix involved, this is documented on the website, will send second patch subsequently.
Many thanks for testing and reporting.
Gerrit| Hi Gerrit, during some experiments using iperf to transmit one TCP | flow against 3 DCCP flows, one DCCP thread stopped and it was shown | the following message: | | "[ 6286.864021] BUG: Failed negotiation in state 2 at | net/dccp/feat.c:1370/dccp_feat_activate_values()" | | Here it is the complete debug msgs including the dumped stack at the | time the error occurred: | | {...} | [ 6286.864021] BUG: Failed negotiation in state 2 at | net/dccp/feat.c:1370/dccp_feat_activate_values() | [ 6286.864034] Pid: 0, comm: swapper Not tainted 2.6.25-rc3 #4 | [ 6286.864034] [<c045c6bb>] dccp_feat_activate_values+0x7b/0x200 | [ 6286.864034] [<c045f919>] dccp_create_openreq_child+0xb9/0x100 | [ 6286.864034] [<c0465226>] dccp_v4_request_recv_sock+0x46/0x1b0 | [ 6286.864034] [<c045f72e>] dccp_check_req+0x24e/0x380 | [ 6286.864034] [<c04526b0>] ipt_hook+0x0/0x20 | [ 6286.864034] [<c046543a>] dccp_v4_do_rcv+0xaa/0x160 | [ 6286.864034] [<c03fb560>] sk_receive_skb+0xc0/0x110 | [ 6286.864034] [<c04216c6>] ip_local_deliver_finish+0x66/0x120 | [ 6286.864034] [<c0421660>] ip_local_deliver_finish+0x0/0x120 | [ 6286.864034] [<c042144b>] ip_rcv_finish+0xfb/0x310 | [ 6286.864034] [<c045b9b6>] packet_rcv_spkt+0x36/0x160 | [ 6286.864034] [<c0421880>] ip_rcv+0x0/0x290 | [ 6286.864034] [<c04028ed>] netif_receive_skb+0x19d/0x230 | [ 6286.864034] [<c0405133>] process_backlog+0x63/0xd0 | [ 6286.864034] [<c0404a99>] net_rx_action+0x89/0x180 | [ 6286.864034] [<c01263e2>] __do_softirq+0x72/0xf0
Quoted 8 lines
| [ 6286.864034] [<c0126497>] do_softirq+0x37/0x40 | [ 6286.864034] [<c01065b0>] do_IRQ+0x40/0x70 | [ 6286.864034] [<c0104b1f>] common_interrupt+0x23/0x28 | [ 6286.864034] [<c01300d8>] sys_setdomainname+0x58/0xb0 | [ 6286.864034] [<c0102d92>] default_idle+0x52/0x80 | [ 6286.864034] [<c0102d40>] default_idle+0x0/0x80 | [ 6286.864034] [<c0102bdd>] cpu_idle+0x4d/0xd0 | [ 6286.864034] ===========
--
Leandro Melo de Sales.
Pervasive and Embedded Computing Laboratory BRisa and E-Phone Projects Manager
Network Admin @ http://embedded.ufcg.edu.br/indexen.html
+55 83 3310-1404 (extension 208)
| Is the patch already in the test tree?
|
Yes, plus the one that followed:
http://eden-feed.erg.abdn.ac.uk/cgi-bin/cgit?r�cp_exp
--
To unsubscribe from this list: send the line "unsubscribe dccp" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Good! :)
and about our Internet test, when are you available again? I was
very busy since that week that you traveled. I'm about to release a new version of dccp gstreamer plugin which will support multthread
transmission: this means that the plugin will be able to send multimedia flows to a set of connected clients. Additionally, I talked to one of the GStreamer developers and they want to integrate it to be distributed as part of the available plugins for gstreamer. For this first moment, it will be enter in gst-plugin-bad and then, after we complete some submission requirements, the plugin will be distributed in gst-plugin-goods.
About CCID-4, I currently have many issues related to related
stuffs of my master dissertation and I will have time to dedicate again to CCID-4 implementation only in two or three week, when I finish my master dissertation and I will be available for CCID-4. For this time and later, no problem if others want to submit patches.
Leandro.
Quoted 5 lines · Gerrit Renker
| Is the patch already in the test tree?
|
Yes, plus the one that followed:
http://eden-feed.erg.abdn.ac.uk/cgi-bin/cgit?rÜcp_exp
Signature · 7 lines
Leandro Melo de Sales. Pervasive and Embedded Computing Laboratory BRisa and E-Phone Projects Manager Network Admin @ http://embedded.ufcg.edu.br/indexen.html +55 83 3310-1404 (extension 208) http://www.leandrosales.com/