Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Fix: Retransmit FIN on close #1449

Merged
merged 1 commit into from
Nov 1, 2024
Merged

Conversation

iyzhang
Copy link
Contributor

@iyzhang iyzhang commented Oct 30, 2024

Our previous implementation did not retransmit the FIN on close if it was not acked. This was due in part to our coroutines exiting before the close protocol had finished and not continuing to run for things like retransmission. But we should have also just checked that we actually received an ack to our FIN before exiting.

@iyzhang iyzhang requested a review from anandbonde October 30, 2024 17:42
@iyzhang iyzhang self-assigned this Oct 30, 2024
@iyzhang iyzhang force-pushed the bugfix-inetstack-close-coroutines branch from 565cccc to 6df4e89 Compare October 30, 2024 22:40
Copy link

libos = catnap
commit id = 6df4e89

collapsed_stack num_calls cycles_per_call nanoseconds_per_call percent_time
bgc::catnap::transport::epoll 13346584.31 1905.59 846.77 32.45
demikernel::sgafree 11550.24 73.11 31.38 0.05
demikernel::sgaalloc 11321.45 123.17 54.03 0.10
ioc::network::libos::push;catnap::linux::transport::push 9066.10 730.16 321.20 4.56
ioc::network::libos::push 8800.48 16839.26 7428.98 6.32
demikernel::push 8800.48 610.70 267.48 0.16
ioc::network::libos::pop;catnap::linux::transport::pop 8025.58 531.25 229.59 2.32
ioc::network::libos::pop 7817.06 13262465.76 5434821.20 25.79
demikernel::pop 7817.06 552.83 238.76 0.11
ioc::network::libos::pushto 1160.00 8769.71 3696.63 24.68
ioc::network::libos::pushto;catnap::linux::transport::push 1160.00 566.64 240.56 6.65
demikernel::pushto 1160.00 496.61 210.44 1.37
demikernel::async_close 32.50 829.90 331.34 0.01
ioc::network::libos::connect 24.95 6387947.97 2795440.82 28.41
ioc::network::libos::connect;catnap::linux::transport::connect 24.95 59224.65 25659.05 1.77
demikernel::connect 24.95 2418.44 1040.66 0.01
ioc::network::libos::close 18.35 34797.71 14667.06 0.10
ioc::network::libos::close;catnap::linux::transport::close 18.35 33840.78 14253.82 96.20
demikernel::accept 15.42 1337.16 580.91 0.00
ioc::network::libos::accept 15.41 892932932.62 390151041.24 44.10
ioc::network::libos::accept;catnap::linux::transport::accept 15.39 2686.79 1171.09 0.00
demikernel::socket 9.50 122813.82 52822.59 0.17
demikernel::socket;catnap::linux::transport::socket 9.50 121375.06 52199.15 97.59
demikernel::new 1.00 264959.61 114546.13 0.12
demikernel::bind 1.00 27700.20 11924.32 0.00
demikernel::bind;catnap::linux::transport::bind 1.00 23090.78 9938.36 83.42
demikernel::listen 1.00 14805.05 6368.96 0.00
demikernel::listen;catnap::linux::transport::listen 1.00 13767.37 5921.97 92.92
demikernel::close 0.00 nan nan 0.00

@iyzhang iyzhang force-pushed the bugfix-inetstack-close-coroutines branch from 6df4e89 to f7be6ef Compare October 31, 2024 23:26
Copy link

libos = catnap
commit id = f7be6ef

collapsed_stack num_calls cycles_per_call nanoseconds_per_call percent_time
bgc::catnap::transport::epoll 13583567.87 1990.14 872.41 32.33
demikernel::sgafree 11557.04 72.39 30.81 0.04
demikernel::sgaalloc 11320.00 119.17 51.65 0.10
ioc::network::libos::push;catnap::linux::transport::push 9066.10 743.20 323.30 4.62
ioc::network::libos::push 8800.48 16759.58 7308.20 6.07
demikernel::push 8800.48 532.20 230.59 0.14
ioc::network::libos::pop;catnap::linux::transport::pop 8033.41 508.83 218.45 1.59
ioc::network::libos::pop 7824.69 5959882.37 2483149.80 25.42
demikernel::pop 7824.69 524.32 224.36 0.10
ioc::network::libos::pushto 1425.00 7600.57 3194.97 25.03
ioc::network::libos::pushto;catnap::linux::transport::push 1425.00 545.48 229.27 7.28
demikernel::pushto 1425.00 428.93 180.83 1.52
demikernel::async_close 32.50 908.13 374.92 0.01
ioc::network::libos::connect 24.95 8462506.53 3677947.60 29.44
ioc::network::libos::connect;catnap::linux::transport::connect 24.95 54214.54 23210.25 1.48
demikernel::connect 24.95 2215.02 945.77 0.01
ioc::network::libos::close 18.35 22803.19 9757.52 0.05
ioc::network::libos::close;catnap::linux::transport::close 18.35 21917.43 9379.19 96.31
demikernel::accept 15.42 1366.19 589.42 0.00
ioc::network::libos::accept 15.39 924051834.15 399614723.43 44.67
ioc::network::libos::accept;catnap::linux::transport::accept 15.39 2641.63 1134.07 0.00
demikernel::socket 9.50 123203.23 52177.81 0.18
demikernel::socket;catnap::linux::transport::socket 9.50 121836.69 51590.33 97.71
demikernel::new 1.00 266418.44 114434.71 0.11
demikernel::bind 1.00 29364.92 12635.45 0.00
demikernel::bind;catnap::linux::transport::bind 1.00 24761.58 10658.54 83.84
demikernel::listen 1.00 15219.87 6521.77 0.00
demikernel::listen;catnap::linux::transport::listen 1.00 14214.18 6091.63 93.30
demikernel::close 0.00 nan nan 0.00

Copy link

libos = catpowder
commit id = f7be6ef

collapsed_stack num_calls cycles_per_call nanoseconds_per_call percent_time
bgc::inetstack::poll_recv;inetstack::layer4_endpoint::poll_once 19002250.67 683.01 301.72 86.20
bgc::inetstack::poll_recv 9501125.33 1585.88 700.29 52.51
bgc::inetstack::tcp::established::background 22711.52 4066.43 1798.21 0.91
bgc::inetstack::tcp::established::background;tcp::established::background::acknowledger 22711.52 435.83 192.77 9.10
bgc::inetstack::tcp::established::background;tcp::established::background::receiver 22702.70 914.85 392.43 22.85
bgc::inetstack::tcp::established::background;tcp::established::background::retransmitter 22673.39 1064.91 474.87 21.75
bgc::inetstack::tcp::established::background;tcp::established::background::sender 22631.48 1913.87 837.41 36.78
ioc::network::libos::pop 9242.20 1049.32 466.60 0.09
demikernel::sgafree 8851.58 104.89 46.32 0.01
ioc::network::libos::push;inetstack::push 8762.80 676.71 308.99 0.19
ioc::network::libos::push 8073.74 33650227.89 14867086.01 42.50
demikernel::push 8073.74 667.20 298.54 0.04
demikernel::sgaalloc 6661.38 156.66 70.35 0.02
demikernel::pop 6068.35 662.19 290.68 0.04
bgc::inetstack::poll_recv;inetstack::poll_bg_work::for::for 5625.02 628.86 277.08 0.71
ioc::network::libos::pushto 2499.33 4395.25 1962.59 5.44
ioc::network::libos::pushto;inetstack::push 2499.33 3872.47 1729.58 88.12
demikernel::pushto 2499.33 467.57 208.48 0.56
bgc::inetstack::poll_recv;inetstack::poll_bg_work::for::for;udp::receive 774.67 230.54 98.63 63.23
ioc::network::libos::close 47.93 6619.46 2943.37 0.09
bgc::passive_listening::poll 43.79 5748.80 2549.60 0.00
ioc::network::libos::connect 41.86 23056.18 10459.40 0.16
bgc::inetstack::tcp::passiveopen::background 41.86 16607.91 7393.36 0.01
ioc::network::libos::accept 38.29 2908.12 1279.70 0.00
demikernel::async_close 32.50 675.08 278.63 0.01
demikernel::accept 21.86 1478.17 647.45 0.00
demikernel::connect 20.93 4048.95 1798.33 0.02
demikernel::socket 10.30 1197.94 527.31 0.00
bgc::inetstack::arp::background 6.37 1788.88 789.70 0.00
bgc::inetstack::poll_recv;inetstack::poll;inetstack::layer4_endpoint::poll_once 2.00 6968.78 3073.30 85.14
bgc::inetstack::icmp::background 1.03 3573.53 1570.56 0.00
demikernel::new 1.00 95673300.78 42238689.55 19.08
demikernel::bind 1.00 29511.88 12751.58 0.00
bgc::inetstack::poll_recv;inetstack::poll 1.00 16283.13 7174.84 0.04
demikernel::listen 1.00 5466.36 2392.52 0.00
demikernel::close 0.00 nan nan 0.00

Copy link

libos = catnip
commit id = f7be6ef

collapsed_stack num_calls cycles_per_call nanoseconds_per_call percent_time
bgc::inetstack::poll_recv;inetstack::layer4_endpoint::poll_once 29030109.27 331.65 140.08 76.45
bgc::inetstack::poll_recv;inetstack::layer4_endpoint::poll_once;catnip::runtime::receive 29030109.27 194.74 82.22 58.76
bgc::inetstack::poll_recv 14515054.63 868.17 366.74 33.21
bgc::inetstack::tcp::established::background 22051.41 2738.33 1159.76 0.45
bgc::inetstack::tcp::established::background;tcp::established::background::acknowledger 22051.41 337.50 143.53 11.60
bgc::inetstack::tcp::established::background;tcp::established::background::receiver 22041.07 606.10 253.46 23.08
bgc::inetstack::tcp::established::background;tcp::established::background::retransmitter 22009.64 1004.12 425.36 29.61
bgc::inetstack::tcp::established::background;tcp::established::background::sender 21967.62 745.38 313.43 22.05
ioc::network::libos::pop 9045.61 891.46 377.12 0.06
demikernel::sgafree 8779.13 98.95 42.16 0.00
ioc::network::libos::push;inetstack::push 8762.80 688.34 297.14 0.17
ioc::network::libos::push 8073.74 33634027.73 13817022.40 32.62
demikernel::push 8073.74 740.49 316.16 0.02
demikernel::sgaalloc 6534.29 137.01 58.58 0.00
demikernel::pop 6051.86 612.40 258.15 0.01
bgc::inetstack::tcp::established::background;tcp::established::background::sender;catnip::runtime::transmit 5497.68 377.22 158.12 14.89
bgc::inetstack::poll_recv;inetstack::poll_bg_work::for::for 3626.71 757.75 320.46 0.70
ioc::network::libos::pushto 1219.33 1459.15 590.33 0.06
ioc::network::libos::pushto;inetstack::push 1219.33 750.98 305.18 51.56
demikernel::pushto 1219.33 474.58 192.70 0.02
ioc::network::libos::pushto;inetstack::push;catnip::runtime::transmit 1219.33 259.03 104.39 34.57
bgc::inetstack::poll_recv;inetstack::poll_bg_work::for::for;udp::receive 526.67 248.94 101.22 71.36
ioc::network::libos::close 49.42 6074.60 2585.11 0.01
ioc::network::libos::connect 41.86 14848.17 6463.39 0.01
bgc::inetstack::tcp::passiveopen::background 41.86 14021.37 6021.24 0.00
ioc::network::libos::connect;catnip::runtime::transmit 41.86 5562.71 2447.70 26.43
bgc::passive_listening::poll 40.46 6398.83 2731.12 0.00
ioc::network::libos::accept 38.64 2671.68 1135.76 0.00
demikernel::async_close 32.50 649.65 263.01 0.00
demikernel::accept 21.86 1069.15 455.70 0.00
bgc::inetstack::tcp::established::background;tcp::established::background::receiver;catnip::runtime::transmit 21.09 695.14 296.41 3.31
bgc::inetstack::tcp::passiveopen::background;catnip::runtime::transmit 20.93 15990.34 6916.28 36.77
demikernel::connect 20.93 2618.20 1140.13 0.00
demikernel::socket 10.30 1702.52 732.77 0.00
bgc::inetstack::tcp::established::background;tcp::established::background::acknowledger;catnip::runtime::transmit 9.00 2960.44 1305.90 34.48
bgc::inetstack::arp::background 6.57 2303.83 968.89 0.00
bgc::inetstack::poll_recv;inetstack::poll;inetstack::layer4_endpoint::poll_once 2.00 21276.83 8986.92 95.70
bgc::inetstack::poll_recv;inetstack::poll;inetstack::layer4_endpoint::poll_once;catnip::runtime::receive 2.00 19157.72 8091.00 89.80
bgc::inetstack::icmp::background 1.05 3318.18 1400.34 0.00
demikernel::new 1.00 1768195383.48 746718295.63 45.61
bgc::inetstack::poll_recv;inetstack::poll 1.00 44439.83 18769.25 0.16
demikernel::bind 1.00 10655.81 4465.08 0.00
demikernel::listen 1.00 5071.71 2132.04 0.00
demikernel::close 0.00 nan nan 0.00

Copy link
Contributor

@anandbonde anandbonde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@iyzhang iyzhang merged commit ffeda7a into dev Nov 1, 2024
14 checks passed
@iyzhang iyzhang deleted the bugfix-inetstack-close-coroutines branch November 1, 2024 18:03
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.

2 participants