-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
DHCP6 broken on armhf (and probably other 32 bit arches) #20564
Comments
|
So what's going on here? In this set up libc is built on a system with a fairly old kernel, so __ASSUME_TIME64_SYSCALLS is not set in its build process. That means that its recvmsg wrapper calls convert_scm_timestamps which translates the "old" format timestamps to "new" and tries to append this to msg_control. But networkd passes exactly as large a buffer as it needs in icmp6_receive so convert_scm_timestamps sets MSG_CTRUNC instead. This causes recvmsg_safe to error and then IPv6 configuration does not happen and the test fails. I'm not really sure how much of what glibc is doing makes sense really. But it's easy to work around this in systemd by passing a larger buffer in icmp6_receive. |
|
Maybe related to #20482. |
|
This is the very simple patch I'm uploading to Ubuntu fwiw: |
It could be, if the libc/kernel versions line up as in this report. The red flag for this issue I think is recvmsg_safe failing with -EXFULL but the strace output showing msg_flags==0. |
|
I think this is a glibc issue. Even if we pass large space, then the condition |
Why do you say that? systemd does not define _TIME_BITS to 64, which triggers both "sizeof(struct timeval)" and "SO_TIMESTAMP" to change in value (or at least I think that's what happens, it's all fairly confusing to me). |
Hmm, I was wrong. I read |
…dditional 64bit timeval or timespec Fixes systemd#20482 and systemd#20564.
|
Could you test #20567? |
|
In glibc, we can split the The core issue here is that we cannot tell from the descriptor passed to |
…dditional 64bit timeval or timespec Fixes systemd#20482 and systemd#20564.
|
@fweimer-rh did i get this right, on such archs/kernels recvmsg will have two auxiliary fields attached? the 32bit and the 64bit version of timespec? |
|
Yes, the kernel produces the 32-bit version (as requested via |
|
Can't glibc figure out automatically which timespec is required? i.e. pick a different recvmsg stub depending if some 64bit-timespec macro is seen/not seen in the glibc header files? I mean, appending both sounds like something that will necessarily break any program that tries to estimate how much auxiliary buffer space to provide to recvmsg(). I mean, how are programs supposed to size the auxiliary buffer otherwise? |
…dditional 64bit timeval or timespec Fixes systemd#20482 and systemd#20564.
see systemd/systemd#20564 while the issue is about dhcp, it's actually about any recvmsg_safe user in systemd such as timesyncd
…dditional 64bit timeval or timespec Fixes systemd#20482 and systemd#20564. (cherry picked from commit 9365e29)
systemd version the issue has been seen with
The code looks the same in main though.
Used distribution
Linux kernel version used (
uname -a)But it's also important that this all happens when glibc is built on a system with kernel before 5.1
CPU architecture issue was seen on
Expected behaviour you didn't see
Unexpected behaviour you saw
Steps to reproduce the problem
Additional program output to the terminal or log subsystem illustrating the issue
If you crank up networkd's log level you get this in the output:
The text was updated successfully, but these errors were encountered: