Summary: | systemd-networkd assertion failure with Xen vif | ||
---|---|---|---|
Product: | systemd | Reporter: | Steven Noonan <steven> |
Component: | general | Assignee: | Tom Gundersen <teg> |
Status: | RESOLVED FIXED | QA Contact: | systemd-bugs |
Severity: | normal | ||
Priority: | medium | CC: | mike, steven |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
valgrind of systemd-networkd
patch to fix refcounting |
Description
Steven Noonan
2014-06-08 08:40:55 UTC
I am seeing this assertion as well in both systemd 213 and 214 on Google Compute Engine. This looks like a memory corruption to me. Any chance you can run it through valgrind? (valgrind /lib/systemd/systemd-networkd)? Interesting. I had trouble reproducing it again until I added this to my .network file: [DHCPv4] UseMTU=yes I'll valgrind the result in a moment... Created attachment 101368 [details]
valgrind of systemd-networkd
Attached valgrind log for systemd-networkd.
Well that explains why UseMTU was necessary. When setting the MTU it freed the data structure, which then caused the hostname setup to break it. ==5269== Invalid read of size 8 ==5269== at 0x161953: link_set_hostname (networkd-link.c:690) ==5269== by 0x16296D: dhcp_lease_acquired (networkd-link.c:942) ==5269== by 0x162D18: dhcp_handler (networkd-link.c:1007) ==5269== by 0x172E35: client_notify (sd-dhcp-client.c:200) ==5269== by 0x175BC3: client_handle_message (sd-dhcp-client.c:1146) ==5269== by 0x17614E: client_receive_message_raw (sd-dhcp-client.c:1270) ==5269== by 0x12902F: source_dispatch (sd-event.c:2001) ==5269== by 0x129F1B: sd_event_run (sd-event.c:2285) ==5269== by 0x12A031: sd_event_loop (sd-event.c:2304) ==5269== by 0x110727: main (networkd.c:100) ==5269== Address 0x5a86d30 is 0 bytes inside a block of size 144 free'd ==5269== at 0x4C2999C: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==5269== by 0x15F43A: link_free (networkd-link.c:132) ==5269== by 0x15F477: link_unref (networkd-link.c:137) ==5269== by 0x161F1A: link_set_mtu (networkd-link.c:768) ==5269== by 0x1628BF: dhcp_lease_acquired (networkd-link.c:930) ==5269== by 0x162D18: dhcp_handler (networkd-link.c:1007) ==5269== by 0x172E35: client_notify (sd-dhcp-client.c:200) ==5269== by 0x175BC3: client_handle_message (sd-dhcp-client.c:1146) ==5269== by 0x17614E: client_receive_message_raw (sd-dhcp-client.c:1270) ==5269== by 0x12902F: source_dispatch (sd-event.c:2001) ==5269== by 0x129F1B: sd_event_run (sd-event.c:2285) ==5269== by 0x12A031: sd_event_loop (sd-event.c:2304) I wonder if this is the issue? diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 6677b94..88c224d 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -761,7 +761,7 @@ static int link_set_mtu(Link *link, uint32_t mtu) { return r; } - link_unref(link); + link_ref(link); return 0; } Created attachment 101369 [details] [review] patch to fix refcounting Yeah, looks like there's just a refcounting error there. Please 'git am' the attached if it passes muster. Indeed. applied the patch now. thanks! does everything work now, can the bug be closed? I tested with this patch and the issue went away, so yes. Closing. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.