Skip to content

modem-broadband: avoid a crash if we fail to guess an APN

Lubomir Rintel requested to merge lr/modem-crash into master

Don't proceed if the context was torn down on an error in try_create_connect_properties().

[1574092292.0225] manager: NetworkManager state is now CONNECTING [1574092292.0228] modem-broadband[ttyV0]: failed to connect 'ttyV0': unable to determine the network id [1574092292.0230] device (ttyV0): state change: prepare -> failed (reason 'modem-init-failed', sys-iface-state: 'managed') [1574092292.0236] manager: NetworkManager state is now DISCONNECTED [1574092292.0250] device (ttyV0): Activation: failed for connection 'ttyV0'

(NetworkManager:69212): libnm-CRITICAL **: 16:51:32.025: ((libnm-core/nm-connection.c:193)): assertion '' failed

Thread 1 "NetworkManager" received signal SIGTRAP, Trace/breakpoint trap. 0x00007ffff78da6e5 in _g_log_abort () from /lib64/libglib-2.0.so.0 Missing separate debuginfos, use: dnf debuginfo-install ModemManager-glib-1.10.6-2.fc31.x86_64 audit-libs-3.0-0.12.20190507gitf58ec40.fc31.x86_64 bluez-libs-5.51-1.fc31.x86_64 brotli-1.0.7-6.fc31.x86_64 cyrus-sasl-lib-2.1.27-2.fc31.x86_64 glib2-2.62.2-1.fc31.x86_64 glibc-2.30-5.fc31.x86_64 gmp-6.1.2-10.fc31.x86_64 gnutls-3.6.10-1.fc31.x86_64 gvfs-client-1.42.1-1.fc31.x86_64 jansson-2.12-4.fc31.x86_64 keyutils-libs-1.6-3.fc31.x86_64 krb5-libs-1.17-45.fc31.x86_64 libcap-ng-0.7.10-1.fc31.x86_64 libcom_err-1.45.3-1.fc31.x86_64 libcurl-7.66.0-1.fc31.x86_64 libffi-3.1-23.fc31.x86_64 libgcc-9.2.1-1.fc31.x86_64 libgcrypt-1.8.5-1.fc31.x86_64 libgpg-error-1.36-2.fc31.x86_64 libidn2-2.2.0-2.fc31.x86_64 libmount-2.34-3.fc31.x86_64 libndp-1.7-4.fc31.x86_64 libnghttp2-1.39.2-1.fc31.x86_64 libselinux-2.9-5.fc31.x86_64 libssh-0.9.0-6.fc31.x86_64 libtasn1-4.14-2.fc31.x86_64 libunistring-0.9.10-6.fc31.x86_64 libuuid-2.34-3.fc31.x86_64 libxcrypt-4.4.10-1.fc31.x86_64 lz4-libs-1.9.1-1.fc31.x86_64 nss-mdns-0.14.1-4.fc31.x86_64 openldap-2.4.47-3.fc31.x86_64 openssl-libs-1.1.1d-2.fc31.x86_64 p11-kit-0.23.16.1-2.fc31.x86_64 pcre-8.43-2.fc31.1.x86_64 pcre2-10.33-15.fc31.x86_64 systemd-libs-243-4.gitef67743.fc31.x86_64 xz-libs-5.2.4-6.fc31.x86_64 zlib-1.2.11-20.fc31.x86_64 (gdb) bt #0 0x00007ffff78da6e5 in _g_log_abort () at /lib64/libglib-2.0.so.0 #1 (closed) 0x00007ffff78db9b6 in g_logv () at /lib64/libglib-2.0.so.0 #2 (closed) 0x00007ffff78dbb83 in g_log () at /lib64/libglib-2.0.so.0 #3 (closed) 0x000055555563fcd2 in _nm_g_return_if_fail_warning (line=line@entry=193, file=0x5555557ae221 "libnm-core/nm-connection.c", log_domain=0x5555557ae23c "libnm") at ./shared/nm-default.h:219 #4 (closed) 0x000055555563feba in _connection_get_setting_checkPython Exception <class 'gdb.error'> No type named TypeNode.: (connection=0x0, setting_type=) at libnm-core/nm-connection.c:193 #5 (closed) _connection_get_setting_checkPython Exception <class 'gdb.error'> No type named TypeNode.: (connection=0x0, setting_type=) at libnm-core/nm-connection.c:191 #6 (closed) 0x00007fffe871f8b4 in nm_modem_get_connection_ip_type (self=self@entry=0x7fffd801c730, connection=0x0, error=error@entry=0x7fffffffc8e8) at src/devices/wwan/nm-modem.c:374 #7 (closed) 0x00007fffe871bfed in connect_context_step (self=0x7fffd801c730) at src/devices/wwan/nm-modem-broadband.c:591 #8 (closed) 0x00007fffe871c74b in modem_act_stage1_prepare (_self=0x7fffd801c730, connection=0x555555af5520, out_failure_reason=) at src/devices/wwan/nm-modem-broadband.c:687 #9 (closed) 0x00007fffe8720203 in nm_modem_act_stage1_prepare (self=0x7fffd801c730, req=0x555555b08a30, out_failure_reason=0x7fffffffcbe0) at src/devices/wwan/nm-modem.c:1045 #10 (closed) 0x0000555555705f1b in activate_stage1_device_prepare (self=0x555555a956a0) at src/devices/nm-device.c:6562 #11 (closed) 0x00005555556dcbca in activation_source_handle_cb (self=0x555555a956a0, addr_family=2) at src/devices/nm-device.c:6177 #12 (closed) 0x00007ffff78d0dcb in g_idle_dispatch () at /lib64/libglib-2.0.so.0 #13 (closed) 0x00007ffff78d44a0 in g_main_context_dispatch () at /lib64/libglib-2.0.so.0 #14 (closed) 0x00007ffff78d4830 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0 #15 (closed) 0x00007ffff78d4b23 in g_main_loop_run () at /lib64/libglib-2.0.so.0 #16 (closed) 0x0000555555599ff4 in main (argc=, argv=) at src/main.c:451

Merge request reports