Packetloss
數據包丟棄在 Linux 節點中
我跑
dropwatch
了,這是我得到的結果:dropwatch> start Enabling monitoring... Kernel monitoring activated. Issue Ctrl-C to stop monitoring 39 drops at tcp_rcv_state_process+1b6 (0xffffffff815eeda6) 36 drops at sk_stream_kill_queues+50 (0xffffffff81583970) 3 drops at skb_release_data+10e (0xffffffff8157bf3e) 2 drops at tcp_v4_do_rcv+80 (0xffffffff815f8f70) 2 drops at tcp_v4_rcv+87 (0xffffffff815fa087) 30 drops at tcp_rcv_state_process+1b6 (0xffffffff815eeda6) 31 drops at sk_stream_kill_queues+50 (0xffffffff81583970) 20 drops at unix_dgram_sendmsg+4f8 (0xffffffff81646a38) 5 drops at tcp_v4_rcv+87 (0xffffffff815fa087) 2 drops at tcp_v4_do_rcv+80 (0xffffffff815f8f70) 19 drops at tcp_rcv_state_process+1b6 (0xffffffff815eeda6) 23 drops at sk_stream_kill_queues+50 (0xffffffff81583970) 2 drops at tcp_v4_rcv+87 (0xffffffff815fa087) 2 drops at skb_release_data+10e (0xffffffff8157bf3e) 11 drops at unix_dgram_sendmsg+4f8 (0xffffffff81646a38) 57 drops at tcp_rcv_state_process+1b6 (0xffffffff815eeda6) 49 drops at sk_stream_kill_queues+50 (0xffffffff81583970) 5 drops at skb_release_data+10e (0xffffffff8157bf3e) 5 drops at tcp_v4_rcv+87 (0xffffffff815fa087) 1 drops at skb_queue_purge+18 (0xffffffff8157c0a8) 4 drops at tcp_rcv_state_process+1b6 (0xffffffff815eeda6) 4 drops at sk_stream_kill_queues+50 (0xffffffff81583970) 3 drops at tcp_v4_do_rcv+80 (0xffffffff815f8f70) 3 drops at tcp_v4_rcv+87 (0xffffffff815fa087) 10 drops at skb_release_data+10e (0xffffffff8157bf3e) 38 drops at unix_dgram_sendmsg+4f8 (0xffffffff81646a38) 29 drops at sk_stream_kill_queues+50 (0xffffffff81583970) 28 drops at tcp_rcv_state_process+1b6 (0xffffffff815eeda6) 1 drops at tcp_v6_rcv+87 (0xffffffff81677ff7) 2 drops at tcp_v4_rcv+87 (0xffffffff815fa087) 1 drops at tcp_v4_do_rcv+80 (0xffffffff815f8f70) 1 drops at skb_release_data+10e (0xffffffff8157bf3e) 17 drops at tcp_rcv_state_process+1b6 (0xffffffff815eeda6) 14 drops at sk_stream_kill_queues+50 (0xffffffff81583970) 1 drops at skb_release_data+10e (0xffffffff8157bf3e) 1 drops at tcp_v4_rcv+87 (0xffffffff815fa087) 5 drops at tcp_rcv_state_process+1b6 (0xffffffff815eeda6) 10 drops at skb_release_data+10e (0xffffffff8157bf3e) 2 drops at unix_dgram_sendmsg+4f8 (0xffffffff81646a38) 4 drops at sk_stream_kill_queues+50 (0xffffffff81583970) 20 drops at tcp_rcv_state_process+1b6 (0xffffffff815eeda6) 22 drops at sk_stream_kill_queues+50 (0xffffffff81583970) 2 drops at skb_release_data+10e (0xffffffff8157bf3e) 48 drops at tcp_rcv_state_process+1b6 (0xffffffff815eeda6) 53 drops at sk_stream_kill_queues+50 (0xffffffff81583970)
從現在開始,我被困住了。我已經檢查過它
tcp_rcv_state_process
並且sk_stream_kill_queues
是 Linux Kernel 中的函式,但我不知道它們是由什麼控制的。我跳過了這個問題,因為在我的節點中,一些應用程序以預期的方式超時。任何建議我怎麼能繼續?
為了取得進展,您需要安裝核心調試模組和“elfutils”包。在 Centos 7 上:
#debuginfo-install kernel #yum install elfutils
之後,您可以在核心中找到原始碼位置,該位置對應於 dropwatch 中的地址。例如,您在 tcp_rcv_state_process+1b6 (0xffffffff815eeda6) 有 57 滴
#eu-addr2line -f -k 0xffffffff815eeda6 tcp_rcv_state_process net/ipv4/tcp_input.c:5834
在這種情況下,如果它是一個 SYN 數據包,它將從 tcp 數據包中丟棄數據。