-
-
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
networkd: Assertion 'link->ndisc' failed after bd08ce5 or 5f707e1 merged #12452
Comments
allow ndisc client to configure on later stage. The conf ``` [Match] Name=enp7s0f0 [Network] DHCP=true IPv6PrivacyExtensions=true IPv6AcceptRA=true <============================================ IPv6MTUBytes=1492 DNSDefaultRoute=false [DHCP] UseDNS=false UseHostname=false UseNTP=false UseDomains=route UseMTU=true [IPv6AcceptRA] UseDNS=no UseDomains=route ``` The log ``` enp7s0f0: Gained IPv6LL Assertion 'link->ndisc' failed at ../systemd-stable/src/network/networkd-link.c:1829, function link_acquire_ipv6_conf(). Abor ``` From the conf it's crear that RA accepting is enables. But hmm initially when networkd started the ipv6ll was not there. Later on it gailed that and tried to start ndisc client . Hence crashed. So allow ndisc client to configure on later stage. Closes systemd#12452
Very strange . From the conf it's clear that RA accepting is enabled. But hmm Please try with #12455 |
Well, it got a step further this time:
I could'n get the Arch Linux package to compile, so I used the GIT version instead. /etc/systemd/network/eno2.network (as it seems to stumble there now)
|
The conf ``` [Match] Name=enp7s0f0 [Network] DHCP=true IPv6PrivacyExtensions=true IPv6AcceptRA=true <============================================ IPv6MTUBytes=1492 DNSDefaultRoute=false [DHCP] UseDNS=false UseHostname=false UseNTP=false UseDomains=route UseMTU=true [IPv6AcceptRA] UseDNS=no UseDomains=route ``` The log ``` enp7s0f0: Gained IPv6LL Assertion 'link->ndisc' failed at ../systemd-stable/src/network/networkd-link.c:1829, function link_acquire_ipv6_conf(). Abor Assertion 'link->radv' failed at ../systemd/src/network/networkd-link.c:1842, function link_acquire_ipv6_conf(). Aborting. Aborted ``` From the conf it's clear that RA accepting is enables. But hmm initially when networkd started the ipv6ll was not there. Later on it gained that and tried to start ndisc client and radv . Hence crashed. So allow ndisc client to configure on later stage. Closes systemd#12452
yes it's the same situation here I forced pushed a new commit. |
Looks good so far, no more asserts for the moment. |
yes please continue testing thanks. |
Had it running in a screen session for testing, when Ctrl+C, I hit following assertion:
On a maybe unrelated note, I see quite a few |
I am able reproduce this bug
|
This seems some kind of race which valgrind should help cleaning up. This is not related. |
Because of this the fd is getting closed and we getting errors like ``` ^Ceno1: Could not send rtnetlink message: Bad file descriptor enp7s0f0: Could not send rtnetlink message: Bad file descriptor enp7s0f0: Cannot delete unreachable route for DHCPv6 delegated subnet 2a0a:...:fc::/62: Bad file descriptor Assertion '*_head == _item' failed at ../systemd/src/network/networkd-route.c:126, function route_free(). Aborting. Aborted ``` Closes one of systemd#12452
The second issue should be fixed by #12463 |
This fixes a bug introduced by bd08ce5. When link is in LINK_STATE_INITIALIZED, `Link::network` may not be set yet. Fixes systemd#12452.
I hope the original issue can be also fixed by #12466. If possible, please also test the PR. Thank you. |
Just gave it a quick test with current git, no asserts so far.
|
(The second issue is not fixed yet. Let's reopen this.) |
Because of this the fd is getting closed and we getting errors like ``` ^Ceno1: Could not send rtnetlink message: Bad file descriptor enp7s0f0: Could not send rtnetlink message: Bad file descriptor enp7s0f0: Cannot delete unreachable route for DHCPv6 delegated subnet 2a0a:...:fc::/62: Bad file descriptor Assertion '*_head == _item' failed at ../systemd/src/network/networkd-route.c:126, function route_free(). Aborting. Aborted ``` Closes one of systemd#12452
I hope the second issue is safely fixed by #12475. |
Because of this the fd is getting closed and we getting errors like ``` ^Ceno1: Could not send rtnetlink message: Bad file descriptor enp7s0f0: Could not send rtnetlink message: Bad file descriptor enp7s0f0: Cannot delete unreachable route for DHCPv6 delegated subnet 2a0a:...:fc::/62: Bad file descriptor Assertion '*_head == _item' failed at ../systemd/src/network/networkd-route.c:126, function route_free(). Aborting. Aborted ``` Closes one of systemd#12452
Just checked with the latest git, no more asserts after Ctrl+C
|
Yeah, the failure should not related, and is #9895.
BTW, I updated the PR again. Please test again. The valgrind log is so helpful. |
In chroot:
Glad to hear this works out in a chroot. |
Fixes one memleak found in systemd#12452.
Many thanks again! I found the root of the first leak in valgrind3.log and added the fix for it in the PR. But still not sure about the other leaks or unconditional jumps. If you can help more, then please disable LTO (maybe |
Am I getting the parameters/vars right or do I need to change anything else? Excerpt from the build: |
I completely nuked my build chroot and setup a fresh one - current build without
|
Fixes one memleak found in systemd#12452.
Well, I'm afraid it didn't have enough time to produce errors. Left it running for a while and just killed it for the new test. Will report back with the new fixes. |
First few minutes are looking good. I'll let it run for a while and see if anything pops up. |
Nothing interesting while running, but Ctrl+C came up with a longer list. I'll leave it running over night this time, this should include an IPv6 change on enp7s0f0. |
valgrind6-2.log |
Fixes one memleak found in systemd#12452.
I'll give it some time, as the errors only seem to show up after quite a while. |
About an hour later and no errors.
I'll go back to standard options and give it another long run. |
Looking good.
Anything else we should test? |
Many thanks for your help! I think the above two tests are enough. |
Because of this the fd is getting closed and we getting errors like ``` ^Ceno1: Could not send rtnetlink message: Bad file descriptor enp7s0f0: Could not send rtnetlink message: Bad file descriptor enp7s0f0: Cannot delete unreachable route for DHCPv6 delegated subnet 2a0a:...:fc::/62: Bad file descriptor Assertion '*_head == _item' failed at ../systemd/src/network/networkd-route.c:126, function route_free(). Aborting. Aborted ``` Closes one of systemd#12452
Fixes the third issue in systemd#12452.
Fixes one memleak found in systemd#12452.
Because of this the fd is getting closed and we getting errors like ``` ^Ceno1: Could not send rtnetlink message: Bad file descriptor enp7s0f0: Could not send rtnetlink message: Bad file descriptor enp7s0f0: Cannot delete unreachable route for DHCPv6 delegated subnet 2a0a:...:fc::/62: Bad file descriptor Assertion '*_head == _item' failed at ../systemd/src/network/networkd-route.c:126, function route_free(). Aborting. Aborted ``` Closes one of systemd#12452
Fixes the third issue in systemd#12452.
Fixes one memleak found in systemd#12452.
This fixes a bug introduced by bd08ce5. When link is in LINK_STATE_INITIALIZED, `Link::network` may not be set yet. Fixes systemd#12452.
Because of this the fd is getting closed and we getting errors like ``` ^Ceno1: Could not send rtnetlink message: Bad file descriptor enp7s0f0: Could not send rtnetlink message: Bad file descriptor enp7s0f0: Cannot delete unreachable route for DHCPv6 delegated subnet 2a0a:...:fc::/62: Bad file descriptor Assertion '*_head == _item' failed at ../systemd/src/network/networkd-route.c:126, function route_free(). Aborting. Aborted ``` Closes one of systemd#12452
Fixes the third issue in systemd#12452.
Fixes one memleak found in systemd#12452.
systemd version the issue has been seen with
Used distribution
Expected behaviour you didn't see
Unexpected behaviour you saw
Steps to reproduce the problem
After Arch applied commits bd08ce5 and 5f707e1 to 242.0 networkd only works after a reboot.
Restarting networkd fails instantly.
The problematic interface seems to be enp7s0f0 (after assert):
/etc/systemd/network/enp7s0f0.network
Staring with SYSTEMD_LOG_LEVEL=debug /usr/lib/systemd/systemd-networkd doesn't yield any more information (excerpt):
The text was updated successfully, but these errors were encountered: