[gnutls-devel] GnuTLS | fastopen.sh test failure (#1095)
Read-only notification of GnuTLS library development activities
gnutls-devel at lists.gnutls.org
Thu Sep 24 22:54:57 CEST 2020
civodul commented:
What happens in the client is this:
```
socket(AF_INET, SOCK_STREAM, IPPROTO_TCP) = 5
getrandom("\x88\x33\x62\xd9\xd7\xd7\xe3\x1f\x36\xc1\x3e\x28\x01\xd8\x96\xbd\xca\xa2\xaf\x4c\xa3\xc1\x16\x4a\x16\x4a\x73\x9a\xc6\x60\xcb\x5f"..., 64, 0) = 64
setsockopt(5, SOL_TCP, TCP_FASTOPEN, [1], 4) = 0
sendmsg(5, {msg_name={sa_family=AF_INET, sin_port=htons(5257), sin_addr=inet_addr("127.0.0.1")}, msg_namelen=16, msg_iov=[{iov_base="\26\3\3\0\327\1\0\0\323\3\38 \27y\331\374\277\365\225\345*\224\306R1rn\3466\371\262"..., iov_len=220}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, MSG_FASTOPEN) = 220
poll([{fd=5, events=POLLIN}], 1, 39999) = 1 ([{fd=5, revents=POLLIN}])
recvfrom(5, "\26\3\3\0e", 5, 0, NULL, NULL) = 5
poll([{fd=5, events=POLLIN}], 1, 39999) = 1 ([{fd=5, revents=POLLIN}])
recvfrom(5, "\2\0\0a\3\3~\\?\275\2737'\341y\2606|s\207Q\340\226\326\305`\314\275\255tDO"..., 101, 0, NULL, NULL) = 101
poll([{fd=5, events=POLLIN}], 1, 39988) = 1 ([{fd=5, revents=POLLIN}])
recvfrom(5, "\26\3\3\3\302", 5, 0, NULL, NULL) = 5
poll([{fd=5, events=POLLIN}], 1, 39988) = 1 ([{fd=5, revents=POLLIN}])
recvfrom(5, "\v\0\3\276\0\3\273\0\3\2700\202\3\2640\202\2l\240\3\2\1\2\2\4M\340\264\3120\r\6"..., 962, 0, NULL, NULL) = 962
openat(AT_FDCWD, "/gnu/store/cb6fakglpk69j8mz0g13rggp99l8v3x8-glibc-2.32/share/zoneinfo/UTC", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
poll([{fd=5, events=POLLIN}], 1, 39986) = 1 ([{fd=5, revents=POLLIN}])
recvfrom(5, "\26\3\3\1}", 5, 0, NULL, NULL) = 5
poll([{fd=5, events=POLLIN}], 1, 39986) = 1 ([{fd=5, revents=POLLIN}])
recvfrom(5, "\f\0\1y\3\0\27A\4\365\275`\304\373\344\373\366\224\267\337\273\234\254<0\224/\302\201\ro\213"..., 381, 0, NULL, NULL) = 381
poll([{fd=5, events=POLLIN}], 1, 39986) = 1 ([{fd=5, revents=POLLIN}])
recvfrom(5, "\26\3\3\0,", 5, 0, NULL, NULL) = 5
poll([{fd=5, events=POLLIN}], 1, 39986) = 1 ([{fd=5, revents=POLLIN}])
recvfrom(5, "\r\0\0(\3\1\2@\0 \4\1\10\t\10\4\4\3\10\7\5\1\10\n\10\5\5\3\10\10\6\1"..., 44, 0, NULL, NULL) = 44
poll([{fd=5, events=POLLIN}], 1, 39985) = 1 ([{fd=5, revents=POLLIN}])
recvfrom(5, "\26\3\3\0\4", 5, 0, NULL, NULL) = 5
poll([{fd=5, events=POLLIN}], 1, 39985) = 1 ([{fd=5, revents=POLLIN}])
recvfrom(5, "\16\0\0\0", 4, 0, NULL, NULL) = 4
brk(0x508000) = 0x508000
setsockopt(5, SOL_TCP, TCP_FASTOPEN, [1], 4) = -1 EINVAL (Invalid argument)
sendmsg(5, {msg_name={sa_family=AF_INET, sin_port=htons(5257), sin_addr=inet_addr("127.0.0.1")}, msg_namelen=16, msg_iov=[{iov_base="\26\3\3\0\7\v\0\0\3\0\0\0", iov_len=12}, {iov_base="\26\3\3\0F\20\0\0BA\4H\274\337\210$a\206\36m\375\334\34M_\230\35\4\v\336\37\334"..., iov_len=75}, {iov_base="\24\3\3\0\1\1", iov_len=6}, {iov_base="\26\3\3\0(\0\0\0\0\0\0\0\0\330l\362y\320\260\227-\6\222W\tDe5\337\355F)"..., iov_len=45}], msg_iovlen=4, msg_controllen=0, msg_flags=0}, MSG_FASTOPEN) = -1 EISCONN (Transport endpoint is already connected)
write(2, "*** Fatal error: Error in the pu"..., 45*** Fatal error: Error in the push function.
) = 45
sendmsg(5, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\26\3\3\0\7\v\0\0\3\0\0\0", iov_len=12}, {iov_base="\26\3\3\0F\20\0\0BA\4H\274\337\210$a\206\36m\375\334\34M_\230\35\4\v\336\37\334"..., iov_len=75}, {iov_base="\24\3\3\0\1\1", iov_len=6}, {iov_base="\26\3\3\0(\0\0\0\0\0\0\0\0\330l\362y\320\260\227-\6\222W\tDe5\337\355F)"..., iov_len=45}], msg_iovlen=4, msg_controllen=0, msg_flags=0}, 0) = 138
brk(0x4f7000) = 0x4f7000
shutdown(5, SHUT_RDWR) = 0
write(2, "Could not connect to 127.0.0.1:5"..., 77Could not connect to 127.0.0.1:5257: Transport endpoint is already connected
) = 77
```
So the second `setsockopt` call fails with `EINVAL` (even though the first one succeeded, on the same file descriptor), and the `sendmsg` `MSG_FASTOPEN` call that immediately follows fails with `EISCONN`.
Thoughts?
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/issues/1095#note_418390681
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20200924/fe0e820d/attachment.html>
More information about the Gnutls-devel
mailing list