ifcfg-rh: initialize watch descriptors to -1

System Internals / NetworkManager - Francesco Giudici [redhat.com] - 7 December 2017 01:48 EST

This is now required as we instance inotify-helper only on need: we have to init them to the unset value, otherwise...

Thread 1 "NetworkManager" received signal SIGSEGV, Segmentation fault. nm_inotify_helper_remove_watch (self=0x0, wd=0) at src/settings/plugins/ifcfg-rh/nm-inotify-helper.c:100 100 if (priv->ifd < 0) (gdb) backtrace #0 0x00007fffe35da6c0 in nm_inotify_helper_remove_watch (self=0x0, wd=0) at src/settings/plugins/ifcfg-rh/nm-inotify-helper.c:100 #1 0x00007fffe35d45b1 in nm_inotify_helper_clear_watch (wd=0x7fffdc008628, helper=) at src/settings/plugins/ifcfg-rh/nm-inotify-helper.h:53 #2 0x00007fffe35d45b1 in path_watch_stop (self=0x7fffdc0085f0) at src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-connection.c:223 #3 0x00007fffe35d467c in filename_changed (object=0x7fffdc0085f0, pspec=, user_data=) at src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-connection.c:242 #4 0x00007ffff61b230d in g_closure_invoke () at /lib64/libgobject-2.0.so.0 #5 0x00007ffff61c498e in signal_emit_unlocked_R () at /lib64/libgobject-2.0.so.0 #6 0x00007ffff61cd1a5 in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0 #7 0x00007ffff61cdb0f in g_signal_emit () at /lib64/libgobject-2.0.so.0 #8 0x00007ffff61b6594 in g_object_dispatch_properties_changed () at /lib64/libgobject-2.0.so.0 #9 0x00007ffff61b5f3e in g_object_notify_queue_thaw () at /lib64/libgobject-2.0.so.0 #10 0x00007ffff61b7776 in g_object_new_internal () at /lib64/libgobject-2.0.so.0 #11 0x00007ffff61b924d in g_object_new_valist () at /lib64/libgobject-2.0.so.0 #12 0x00007ffff61b9691 in g_object_new () at /lib64/libgobject-2.0.so.0 #13 0x00007fffe35d5018 in nm_ifcfg_connection_new (source=source@entry=0x0, full_path=full_path@entry=0x555555a9a590 "/etc/sysconfig/network-scripts/ifcfg-team3", error=error@entry=0x7fffffffdc30, out_ignore_error=out_ignore_error@entry=0x7fffffffdc2c) at src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-connection.c:429 #14 0x00007fffe35d5e96 in update_connection (self=self@entry=0x555555a59ea0, source=source@entry=0x0, full_path=0x555555a9a590 "/etc/sysconfig/network-scripts/ifcfg-team3", connection=connection@entry=0x0, protect_existing_connection=protect_existing_connection@entry=0, protected_connections=protected_connections@entry=Python Exception There is no member named keys.: 0x555555a9fc00, error=0x0) at src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-plugin.c:218 #15 0x00007fffe35d7073 in read_connections (plugin=plugin@entry=0x555555a59ea0) at src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-plugin.c:545 #16 0x00007fffe35d72f1 in get_connections (config=0x555555a59ea0) at src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-plugin.c:581 #17 0x00005555556bb513 in load_connections (self=0x555555a1a920) at src/settings/nm-settings.c:239 #18 0x00005555556bb513 in nm_settings_start (self=0x555555a1a920, error=) at src/settings/nm-settings.c:1800 #19 0x00005555555ada1f in nm_manager_start (self=0x555555a490c0, error=) at src/nm-manager.c:5262 #20 0x00005555555851ae in main (argc=, argv=) at src/main.c:417

Fixes: 31f2a466390024be6710b259d5ad228ebf5d1557

993a726c4 ifcfg-rh: initialize watch descriptors to -1
src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-connection.c | 7 +++++++
1 file changed, 7 insertions(+)

Upstream: cgit.freedesktop.org


  • Share