GNOME Bugzilla – Bug 743700
[PATCH] nm-dhcp-client.c:295nm_dhcp_client_set_state assertion failed
Last modified: 2015-05-27 08:45:19 UTC
Created attachment 295757 [details] network manager connection configuration file While trying to connect to a WPA2 protected wifi network, network manager crashes.
Attached are the network manager configuration file and the syslog output.
Created attachment 295758 [details] syslog output while crash happened
Created attachment 295764 [details] core dump of network manager that was generated after the assertion error
looks like this is another dhcpcd backend bug :-/ workaround: install dhclient
Indeed, with dhclient it worked as expected.
What version of dhcpcd do you have?
$ dhcpcd --version dhcpcd 6.6.7
It appears that dhcpcd is attempting to get an IPv6 lease, when NetworkManager is trying to launch it in IPv4-only mode (since you don't have IPv6 enabled for this connection). NM *should* be passing the "-4" option to dhcpcd, but it looks like that may not be happening in your case, possibly due to configure-time logic problems.
Created attachment 295776 [details] [review] 0001-dhcp-gracefully-recover-from-failed-DHCP-BOUND-state.patch
+ if (ip_config == NULL) { + g_warn_if_fail (ip_config != NULL); This looks a bit weird. I guess you're using g_warn_if_fail() and not g_assert_not_reached() so that the condition that led to the warning gets logged too? Maybe nm_log_warn() might make more sense? Overall LGTM
Converted that to a nm_log_warn() and pushed. 511a7395bff0253f8d1e0d7f35849151d9caa98f master 7daf63461de4195b1626ca15f835fc7cbc56e847 nm-1-0 416cd4ff709b7228ba28765991ea256c9484ac74 nm-0-9-10 (configure.ac bits only)
This patch broke NM 1.0.2: $ ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --libdir=/usr/lib64 --docdir=/usr/share/doc/networkmanager-1.0.2 --disable-maintainer-mode --disable-gtk-doc --disable-more-warnings --disable-static --localstatedir=/var --disable-lto --disable-config-plugin-ibft --disable-ifnet --without-netconfig --with-dbus-sys-dir=/etc/dbus-1/system.d --with-udev-dir=/lib/udev --with-config-plugins-default=keyfile --with-iptables=/sbin/iptables --with-libsoup=yes --enable-concheck --with-crypto=gnutls --with-session-tracking=consolekit --with-suspend-resume=upower --enable-bluez5-dun --enable-introspection --enable-ppp --disable-wimax --without-dhclient --with-dhcpcd --without-modem-manager-1 --with-nmtui --with-resolvconf --without-selinux --disable-teamdctl --disable-tests --enable-vala --without-valgrind --with-wext --with-pppd-plugin-dir=/usr/lib64/pppd/2.4.7 .... configure:23483: checking for dhcpcd configure:23502: found /sbin/dhcpcd configure:23514: result: /sbin/dhcpcd configure:23528: WARNING: Cannot use dhcpcd, version 4.x or higher is required configure:23540: WARNING: Could not find a suitable DHCP client, falling back to dhclient for some reason autoconf strips [ so [[ becomes [ in configure
Futhermore, runtime tests like dhcpcd --version breaks cross compile. You should have some easy way avoid the runtime tests. Also, dhcpcd can be complied with or without IPv6 so testin for dhcpcd version is not enough to claim IPv6 support.
(reopening based on comment 12)
The error in the configure script is fixed by http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=6baca260d11b4c2f92e8765ff0f66786e507022a As discussed in https://mail.gnome.org/archives/networkmanager-list/2015-May/msg00068.html , we might detect v6 support at runtime.
(In reply to joakim.tjernlund from comment #13) > Futhermore, runtime tests like dhcpcd --version breaks cross compile. > You should have some easy way avoid the runtime tests. > Also, dhcpcd can be complied with or without IPv6 so testin for > dhcpcd version is not enough to claim IPv6 support. See bug 749946