NetworkManager/src
Jiří Klimeš 151645a648 bluetooth: don't crash when switching off bluetooth
Testcase:
- add a bluetooth connection (with auto-activate)
  $ nmcli con add type blue con-name phone bt-type panu addr 00:17:EA:84:E7:41
- make NM go to sleep (close a lid of laptop to suspend)
- switch off hardware wireless button
- resume the computer (open the lid)

Trace (from RHEL 7):
 (NetworkManager:3619): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'NMDeviceBt'
 (NetworkManager:3619): GLib-GObject-CRITICAL **: g_type_instance_get_private: assertion 'instance != NULL && instance->g_class != NULL' failed
 NetworkManager[3619]: <warn> Error connecting with bluez: Timeout was reached
 (NetworkManager:3619): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'NMDevice'
 (NetworkManager:3619): GLib-GObject-CRITICAL **: g_type_instance_get_private: assertion 'instance != NULL && instance->g_class != NULL' failed
 Program received signal SIGSEGV, Segmentation fault.
 nm_device_state_changed (device=0x7f8ffe63c7f0, state=state@entry=NM_DEVICE_STATE_FAILED, reason=reason@entry=
     NM_DEVICE_STATE_REASON_BT_FAILED) at devices/nm-device.c:6685
 6685            g_warn_if_fail (priv->in_state_changed == FALSE);
 Missing separate debuginfos, use: debuginfo-install ModemManager-glib-1.1.0-6.git20130913.el7.x86_64 dbus-glib-0.100-7.el7.x86_64 dbus-libs-1.6.12-8.el7.x86_64 glib2-2.40.0-2.el7.x86_64 glibc-2.17-58.el7.x86_64 gvfs-1.16.4-7.el7.x86_64 libbluray-0.2.3-5.el7.x86_64 libffi-3.0.13-11.el7.x86_64 libgcc-4.8.3-5.el7.x86_64 libgudev1-208-11.el7_0.2.x86_64 libndp-1.2-4.el7.x86_64 libnl3-3.2.21-6.el7.x86_64 libselinux-2.2.2-6.el7.x86_64 libsoup-2.46.0-2.el7.x86_64 libuuid-2.23.2-16.el7.x86_64 libxml2-2.9.1-5.el7.x86_64 nspr-4.10.6-2.el7.x86_64 nss-3.16.2-4.el7.x86_64 nss-softokn-3.16.2-2.el7.x86_64 nss-softokn-freebl-3.16.2-2.el7.x86_64 nss-util-3.16.2-2.el7.x86_64 pcre-8.32-13.el7.x86_64 polkit-0.112-5.el7.x86_64 sqlite-3.7.17-4.el7.x86_64 systemd-libs-208-11.el7_0.2.x86_64 teamd-1.12-1.el7.x86_64 xz-libs-5.1.2-8alpha.el7.x86_64 zlib-1.2.7-13.el7.x86_64
 (gdb) DHCPREQUEST on enp0s25 to 255.255.255.255 port 67 (xid=0x566289d3)
 DHCPACK from 10.34.0.254 (xid=0x566289d3)
 bt
 #0  nm_device_state_changed (device=0x7f8ffe63c7f0, state=state@entry=NM_DEVICE_STATE_FAILED, reason=reason@entry=
     NM_DEVICE_STATE_REASON_BT_FAILED) at devices/nm-device.c:6685
 #1  0x00007f8fee0847bf in bluez_connect_cb (object=<optimized out>, res=<optimized out>, user_data=<optimized out>)
     at nm-device-bt.c:738
 #2  0x00007f8ff93eb557 in g_simple_async_result_complete (simple=0x7f8ffe67d8a0) at gsimpleasyncresult.c:763
 #3  0x00007f8fee07ec85 in bluez_connect_cb (dbus_connection=<optimized out>, res=0x7f8ffe67d730, user_data=<optimized out>)
     at nm-bluez-device.c:484
 #4  0x00007f8ff93eb557 in g_simple_async_result_complete (simple=0x7f8ffe67d730) at gsimpleasyncresult.c:763
 #5  0x00007f8ff944637f in g_dbus_connection_call_done (source=<optimized out>, result=<optimized out>, user_data=0x7f8ffe64a840)
     at gdbusconnection.c:5492
 #6  0x00007f8ff93eb557 in g_simple_async_result_complete (simple=0x7f8ffe66de30) at gsimpleasyncresult.c:763
 #7  0x00007f8ff93eb5b9 in complete_in_idle_cb (data=<optimized out>) at gsimpleasyncresult.c:775
 #8  0x00007f8ff8c3b9ea in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
 #9  0x00007f8ff8c3bd38 in g_main_context_iterate.isra.24 () from /lib64/libglib-2.0.so.0
 #10 0x00007f8ff8c3c00a in g_main_loop_run () from /lib64/libglib-2.0.so.0
 #11 0x00007f8ffcaba9ba in main (argc=1, argv=0x7ffff6b335b8) at main.c:642
 (gdb)
2014-09-02 14:53:47 +02:00
..
devices bluetooth: don't crash when switching off bluetooth 2014-09-02 14:53:47 +02:00
dhcp-manager all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
dns-manager all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
dnsmasq-manager all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
firewall-manager all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
platform platform: (trivial) don't shadow link(3) in NMLinuxPlatform 2014-08-21 11:16:43 +02:00
ppp-manager libnm-core: fix crash in NMSettingAdsl:verify() 2014-08-19 00:13:11 +02:00
rdisc rdisc: add RA wait timeout 2014-08-29 16:03:36 -05:00
settings ifcfg-rh: more conversions to g_assert() 2014-08-29 18:46:11 -05:00
supplicant-manager supplicant/ifnet: fix spelling of "private_key2_passwd" option 2014-08-27 09:20:02 -05:00
tests trivial: don't shadow rand(3) 2014-08-20 14:18:14 -05:00
vpn-manager libnm-core, libnm, core: make NMConnection an interface 2014-08-16 10:17:53 -04:00
main.c libnm: rename NetworkManager.h and NetworkManagerVPN.h 2014-08-01 14:34:40 -04:00
Makefile.am logging: extract logging macros for devices to nm-device-logging.h 2014-08-06 19:22:02 +02:00
NetworkManagerUtils.c core: refactor nm_utils_complete_generic() not to use a dynamic format string 2014-08-25 16:46:14 +02:00
NetworkManagerUtils.h core: refactor nm_utils_complete_generic() not to use a dynamic format string 2014-08-25 16:46:14 +02:00
nm-activation-request.c include: drop nm-settings-flags.h, move NMSecretAgentGetSecretsFlags 2014-08-01 14:34:39 -04:00
nm-activation-request.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-active-connection.c libnm: rename NetworkManager.h and NetworkManagerVPN.h 2014-08-01 14:34:40 -04:00
nm-active-connection.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-auth-subject.c settings: prefer secret agents in the same process as the request 2013-12-03 16:41:00 -05:00
nm-auth-subject.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-config.c core: update data types of some hwaddr properties 2014-08-07 15:41:04 -04:00
nm-config.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-connection-provider.c core: remove useless NMSettings::connections-loaded signal 2014-01-23 15:14:49 -05:00
nm-connection-provider.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-connectivity.c all: remove remaining GParamSpec name/blurb strings 2014-06-19 17:45:03 -04:00
nm-connectivity.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-dbus-manager.c libnm: rename NetworkManager.h and NetworkManagerVPN.h 2014-08-01 14:34:40 -04:00
nm-dbus-manager.h core: fill in nm-types.h, clean out other headers 2014-07-23 10:56:26 -04:00
nm-dcb.c dcb: wait for carrier down/up after disabling FCoE 2014-04-02 09:37:15 -05:00
nm-dcb.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-dhcp4-config.c libnm: rename NetworkManager.h and NetworkManagerVPN.h 2014-08-01 14:34:40 -04:00
nm-dhcp4-config.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-dhcp6-config.c libnm: rename NetworkManager.h and NetworkManagerVPN.h 2014-08-01 14:34:40 -04:00
nm-dhcp6-config.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-dispatcher.c libnm: consistently use "INTERFACE" rather than "IFACE" in macros 2014-08-01 14:34:06 -04:00
nm-dispatcher.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-ip4-config.c all: add nm-core-internal.h header 2014-08-22 15:22:16 +02:00
nm-ip4-config.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-ip6-config.c core: refactor nm_ip[46]_config_commit() not to make a copy of route 2014-07-29 23:42:50 +02:00
nm-ip6-config.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-logging.c core/logging: change order or domain/level arguments for nm_log() 2014-08-01 19:06:25 +02:00
nm-logging.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-manager-auth.c core: fill in nm-types.h, clean out other headers 2014-07-23 10:56:26 -04:00
nm-manager-auth.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-manager.c core: allow connection assumption on pre-configured software devices 2014-08-29 18:46:11 -05:00
nm-manager.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-policy.c libnm, core, cli, tui: fix the capitalization of various types 2014-08-01 14:34:06 -04:00
nm-policy.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-posix-signals.c core: merge src/config, src/logging, src/posix-signals into src/ 2014-07-30 15:56:29 -04:00
nm-posix-signals.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-properties-changed-signal.c logging: tweak logging-enabled functions 2013-12-20 09:57:13 -05:00
nm-properties-changed-signal.h core: make nm-properties-changed-signal always export the right properties 2013-05-20 16:38:33 -03:00
nm-rfkill-manager.c core: split NMRfkillManager out of NMUdevManager 2013-06-05 17:49:24 -03:00
nm-rfkill-manager.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-session-monitor-ck.c core: make NMSessionMonitor non-refcounted 2013-12-03 16:39:37 -05:00
nm-session-monitor-null.c core: make NMSessionMonitor non-refcounted 2013-12-03 16:39:37 -05:00
nm-session-monitor-systemd.c sessions: fix return value handling for sd_uid_get_sessions() (bgo #707983) 2014-01-23 16:48:19 -06:00
nm-session-monitor.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-session-utils.c Use glib-mkenums to generate enum types 2012-02-15 11:42:15 -05:00
nm-session-utils.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-sleep-monitor-systemd.c sleep-monitor: add missing include 2013-09-13 09:05:07 -04:00
nm-sleep-monitor-upower.c core: convert the DBus manager to a single-ref object 2013-05-20 16:38:33 -03:00
nm-sleep-monitor.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-types.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
org.freedesktop.NetworkManager.conf dbus: kill at_console usage in permissions (bgo #707983) (rh #979416) 2014-01-23 16:48:19 -06:00