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
Native stack: cannot find sent record in _tcbs. #750
Comments
This can happen if the NIC uses a hash function different from what we think it is. What NIC are you using? Please test with --smp 1, just to validate. |
The NIC I use is Mellanox ConnectX-4 Lx. |
Try changing /cc @vladzcloudius |
Changing
|
This looks like a ceph failure, not seastar. Of course it can be caused by a seastar bug, but it's not possible for me to diagnose ceph assertion failures. Maybe you can try reproducing the problem with seastar's httpd (and then trying the dpdk.cc change). |
Actually, the ceph assertion failures is caused by failure of TCP connection in line 374, and it is same error as from previous test when SYN+ACK packet is hashed to wrong shard:
In short, changing only |
client connect()s have extra hashing logic: template <typename InetTraits>
auto tcp<InetTraits>::connect(socket_address sa) -> connection {
uint16_t src_port;
connid id;
auto src_ip = _inet._inet.host_address();
auto dst_ip = ipv4_address(sa);
auto dst_port = net::ntoh(sa.u.in.sin_port);
do {
src_port = _port_dist(_e);
id = connid{src_ip, dst_ip, src_port, dst_port};
} while (_inet._inet.netif()->hw_queues_count() > 1 &&
(_inet._inet.netif()->hash2cpu(id.hash(_inet._inet.netif()->rss_key())) != this_shard_id()
|| _tcbs.find(id) != _tcbs.end())); So we may be using the wrong hash function here. Please try with apps/seawreck, with smp=1 and smp>2, to validate that this is the problem. |
@WJTian In order to see why the code above doesn't work I'll need to see the whole thing. A link to a github repo + branch would do nicely. As @avikivity have already mentioned you can see how TCP client and servers may be implemented by looking at I tested them not long ago with DPDK (+native stack) and I definitely used a multi-queue/multi-shard configuration (I played with both ena and experimental user-virtio backends). So, there is a good chance that our TCP code is healthy. Although I don't deny for a second that there is always a chance for a bug... ;) There were issues with a reactor backend however: I had to use |
I just remembered that the device I used is a tap instead of a dpdk(the physical NIC is Mellanox ConnectX-4 Lx), so modification of |
When I benchmark ceph crimson messenger using perf_crimson_msgr, the client use native network stack and 1 job(i.e. shard 1 send TCP SYN packet). The received SYN+ACK packet may be hashed to another shard which does not have corresponding record in _tcbs struct. This issue will cause TCP handshake failure.
The tcpdump output is:
15:21:47.400523 IP 192.168.122.111.53010 > 192.168.122.122.distinct: Flags [S], seq 2210197188, win 29200, options [mss 1460,wscale 7,eol], length 0
15:21:47.400735 IP 192.168.122.122.distinct > 192.168.122.111.53010: Flags [S.], seq 2180376672, ack 2210197189, win 29200, options [mss 1460,wscale 7,eol], length 0
15:21:47.401020 IP 192.168.122.111.53010 > 192.168.122.122.distinct: Flags [R.], seq 1, ack 1, win 0, length 0
The text was updated successfully, but these errors were encountered: