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

having trouble setting socket timeout options #622

Open
dotysan opened this issue Jun 20, 2024 · 0 comments
Open

having trouble setting socket timeout options #622

dotysan opened this issue Jun 20, 2024 · 0 comments

Comments

@dotysan
Copy link

dotysan commented Jun 20, 2024

If I do strace rsync --sockopts=SO_RCVBUF=1000000 ... 2>&1 |grep -E 'sock' it seems to work!

socket(AF_INET, SOCK_STREAM, IPPROTO_TCP) = 3
setsockopt(3, SOL_SOCKET, SO_RCVBUF, [1000000], 4) = 0
socketpair(AF_UNIX, SOCK_STREAM, 0, [4, 5]) = 0

However, when I try to adjust the timeouts with --sockopts=SO_RCVTIMEO=15, I get an "Invalid argument" error message. Additionally strace refers to a different syscall SO_RCVTIMEO_OLD.

socket(AF_INET, SOCK_STREAM, IPPROTO_TCP) = 3
setsockopt(3, SOL_SOCKET, SO_RCVTIMEO_OLD, [15], 4) = -1 EINVAL (Invalid argument)
write(2, "rsync: [Receiver] failed to set "..., 81rsync: [Receiver] failed to set socket option SO_RCVTIMEO: Invalid argument (22)
socketpair(AF_UNIX, SOCK_STREAM, 0, [4, 5]) = 0

What am I doing wrong?!?

Reproduced on a few different 5.15 linux kernels.

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

No branches or pull requests

1 participant