Giter Site home page Giter Site logo

packetdrill segfault about packetdrill_mptcp HOT 3 CLOSED

cpaasch avatar cpaasch commented on July 21, 2024
packetdrill segfault

from packetdrill_mptcp.

Comments (3)

redward avatar redward commented on July 21, 2024

I got the next message when I run it:

net.ipv4.tcp_keepalive_intvl = 1
net.ipv4.tcp_keepalive_probes = 5
net.ipv4.tcp_keepalive_time = 10
Object "tcp_metrics" is unknown, try "ip help".
examples/tests/bugs/reset_seg_fault.pkt:4: error executing `ip tcp_metrics flush` command: non-zero status 1

from packetdrill_mptcp.

cpaasch avatar cpaasch commented on July 21, 2024

Just remove the 'ip tcp_metrics flush' command from the script.

from packetdrill_mptcp.

redward avatar redward commented on July 21, 2024

This issue is now corrected. I didn't close it at right time, sorry.
The example I modified to expect the right socket is as following:

0       `sysctl -w net.ipv4.tcp_keepalive_intvl=1`
+0      `sysctl -w net.ipv4.tcp_keepalive_probes=5`
+0      `sysctl -w net.ipv4.tcp_keepalive_time=10`
+0      `ip tcp_metrics flush`

+0      socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
+0      setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
+0      bind(3, ..., ...) = 0
+0      listen(3, 1) = 0

+0      setsockopt(3, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0

+0      < S 0:0(0) win 32792 <mss 1460,mp_capable a> sock(3)
+0      > S. 0:0(0) ack 1 <mss 1460,mp_capable b> sock(3)
+0      < . 1:1(0) ack 1 win 29200 <mp_capable a b> sock(3)

+0      accept(3, ..., ...) = 4

/* Client send 1000 bytes */
+0      < . 1:1001(1000) ack 1 win 32792 <dss dack4 dsn4> sock(4)
+0      > . 1:1(0) ack 1001 <dss dack4> sock(4)

+0      read(4, ..., 1000) = 1000

/* establish an additional subflow */
+0      socket(..., SOCK_STREAM, IPPROTO_TCP) = 5
+0      setsockopt(5, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
+0      bind(5, {sa_family = AF_INET, sin_port = htons(13001), sin_addr = inet_addr("192.168.0.1")}, ...) = 0
+0      listen(5,1) = 0

+0      < S 0:0(0) win 32792 <mss 1460,mp_join_syn backup=0 address_id=0 token=sha1_32(b)> sock(5)
+0      > S. 0:0(0) ack 1 <mss 1460,mp_join_syn_ack backup=0 address_id=0 sender_hmac=trunc_l64_hmac(key_b key_a) > sock(5)
+0.1    < . 1:1(0) ack 1 win 32792 <mp_join_ack sender_hmac=full_160_hmac(key_a key_b)> sock(5)
+0      > . 1:1(0) ack 1 <...> sock(6)

+0      mp_join_accept(5) = 6

/* Keepalives are sent on all subflows */
+9.9      > . 0:0(0) ack 1001 <dss dack4> sock(4)
+0    > . 0:0(0) ack 1 <dss dack4> sock(6)

/* And repeat the probe every 3 seconds if there are no response. */

+1      > . 0:0(0) ack 1001 <dss dack4> sock(4)
+0      > . 0:0(0) ack 1 <dss dack4> sock(6)

+1      > . 0:0(0) ack 1001 <dss dack4> sock(4)
+0      > . 0:0(0) ack 1 <dss dack4> sock(6)

+1      > . 0:0(0) ack 1001 <dss dack4> sock(4)
+0      > . 0:0(0) ack 1 <dss dack4> sock(6)

+1      > . 0:0(0) ack 1001 <dss dack4> sock(4)
+0      > . 0:0(0) ack 1 <dss dack4> sock(6)

/* should fastclose */
+1      > . 1:1(0) ack 1001 <mp_fastclose> sock(4)
+0      > R. 1:1(0) ack 1 <dss dack4> sock(6)
+0      < R. 1001:1001(0) ack 1 win 32792 sock(4)

+0.1    `sysctl -w net.ipv4.tcp_keepalive_intvl=75`
+0      `sysctl -w net.ipv4.tcp_keepalive_probes=9`
+0      `sysctl -w net.ipv4.tcp_keepalive_time=7200`

I ran it with :
$ sudo ./packetdrill examples/corrections/data_fin.pkt --tolerance_usecs=100000 -v

and got

net.ipv4.tcp_keepalive_intvl = 1
net.ipv4.tcp_keepalive_probes = 5
net.ipv4.tcp_keepalive_time = 10
inbound injected packet:  0.025234 S 0:0(0) win 32792 <mss 1460,mp_capable sender_key: 153199658677876282, flags: 129>
outbound sniffed packet:  0.026556 S. 3300006548:3300006548(0) ack 1 win 28800 <mss 1460,mp_capable sender_key: 4858591269394488144, flags: 129>
inbound injected packet:  0.026604 . 1:1(0) ack 3300006549 win 29200 <mp_capable sender_key: 153199658677876282 receiver_key: 4858591269394488144, flags 129>
inbound injected packet:  0.026690 . 1:1001(1000) ack 3300006549 win 32792 <dss dack4 4102526830 dsn4 2070503321 ssn 1 dll 1000 checksum 57145 flags: MA>
outbound sniffed packet:  0.026718 . 3300006549:3300006549(0) ack 1001 win 59000 <dss dack4 2070504321 flags: A>
inbound injected packet:  0.027104 S 0:0(0) win 32792 <mss 1460,mp_join_syn flags: 0, address id: 0, receiver token: 143956527, sender random number: 590657082>
outbound sniffed packet:  0.027132 S. 1885174322:1885174322(0) ack 1 win 28800 <mss 1460,mp_join_syn_ack flags: 0, address id: 0, sender hmac: 8484337386671086230, sender random number: 845585034>
inbound injected packet:  0.127791 . 1:1(0) ack 1885174323 win 32792 <mp_join_ack sender hmac (160) bits, by 32bits bloc from [0] to [4]: 3127187271, 3807341752, 4065235748, 2785452501, 141418444>
outbound sniffed packet:  0.127937 . 1885174323:1885174323(0) ack 1 win 65535 <dss dack4 2070504321 flags: A>
outbound sniffed packet: 10.036222 . 3300006548:3300006548(0) ack 1001 win 65535 <dss dack4 2070504321 flags: A>
outbound sniffed packet: 10.132214 . 1885174322:1885174322(0) ack 1 win 65535 <dss dack4 2070504321 flags: A>
outbound sniffed packet: 11.036273 . 3300006548:3300006548(0) ack 1001 win 65535 <dss dack4 2070504321 flags: A>
outbound sniffed packet: 11.132249 . 1885174322:1885174322(0) ack 1 win 65535 <dss dack4 2070504321 flags: A>
outbound sniffed packet: 12.036301 . 3300006548:3300006548(0) ack 1001 win 65535 <dss dack4 2070504321 flags: A>
outbound sniffed packet: 12.132297 . 1885174322:1885174322(0) ack 1 win 65535 <dss dack4 2070504321 flags: A>
outbound sniffed packet: 13.036336 . 3300006548:3300006548(0) ack 1001 win 65535 <dss dack4 2070504321 flags: A>
outbound sniffed packet: 13.132342 . 1885174322:1885174322(0) ack 1 win 65535 <dss dack4 2070504321 flags: A>
outbound sniffed packet: 14.036394 . 3300006548:3300006548(0) ack 1001 win 65535 <dss dack4 2070504321 flags: A>
outbound sniffed packet: 14.132403 . 1885174322:1885174322(0) ack 1 win 65535 <dss dack4 2070504321 flags: A>
outbound sniffed packet: 15.036453 R. 3300006549:3300006549(0) ack 1001 win 65535 <dss dack4 2070504321 flags: A>

from packetdrill_mptcp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.