summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2017-12-06 21:52:56 +0100
committerBeniamino Galvani <bgalvani@redhat.com>2017-12-06 22:12:01 +0100
commit5587bb6f5918dbf2e0a8474892e55830758f2f1f (patch)
tree64aa9d82efb58704adc70db69a09f52efa3f8414
parent144c66519f72e81185ea32fd0e68af5f18dc41a6 (diff)
downloadNetworkManager-bg/ifcfg-rh-dns-domains-rh1517794.tar.gz
ifcfg-rh: initialized inotify watches handlesbg/ifcfg-rh-dns-domains-rh1517794
Initializes inotify watches handles to -1 to avoid that we try to clear them when a connection gets created. NetworkManager:ERROR:src/settings/plugins/ifcfg-rh/nm-inotify-helper.c:97:nm_inotify_helper_remove_watch: assertion failed: ((((__extension__ ({ GTypeInstance *__inst = (GTypeInstance*) ((_obj)); GType __t = ((nm_inotify_helper_get_type ())); gboolean __r; if (!__inst) __r = (0); else if (__inst->g_class && __inst->g_class->g_type == __t) __r = (!(0)); else __r = g_type_check_instance_is_a (__inst, __t); __r; }))))) Thread 1 "NetworkManager" received signal SIGABRT, Aborted. 0x00007ffff41d569b in raise () from /lib64/libc.so.6 (gdb) backtrace #0 0x00007ffff41d569b in raise () at /lib64/libc.so.6 #1 0x00007ffff41d73b1 in abort () at /lib64/libc.so.6 #2 0x00007ffff5f1c69d in g_assertion_message () at /lib64/libglib-2.0.so.0 #3 0x00007ffff5f1c72a in g_assertion_message_expr () at /lib64/libglib-2.0.so.0 #4 0x00007fffe833eba3 in nm_inotify_helper_remove_watch (self=0x0, wd=0) at src/settings/plugins/ifcfg-rh/nm-inotify-helper.c:97 #5 0x00007fffe83372a1 in nm_inotify_helper_clear_watch (wd=0xa04138, helper=<optimized out>) at src/settings/plugins/ifcfg-rh/nm-inotify-helper.h:53 #6 0x00007fffe83372a1 in path_watch_stop (self=self@entry=0xa04100) at src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-connection.c:223 #7 0x00007fffe8337342 in filename_changed (object=<optimized out>, pspec=<optimized out>, user_data=<optimized out>) at src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-connection.c:242 #8 0x00007ffff63d273d in g_closure_invoke () at /lib64/libgobject-2.0.so.0 #9 0x00007ffff63e54de in signal_emit_unlocked_R () at /lib64/libgobject-2.0.so.0 #10 0x00007ffff63edd05 in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0 #11 0x00007ffff63ee66f in g_signal_emit () at /lib64/libgobject-2.0.so.0 #12 0x00007ffff63d6c04 in g_object_dispatch_properties_changed () at /lib64/libgobject-2.0.so.0 #13 0x00007ffff63d65ae in g_object_notify_queue_thaw () at /lib64/libgobject-2.0.so.0 #14 0x00007ffff63d8076 in g_object_new_internal () at /lib64/libgobject-2.0.so.0 #15 0x00007ffff63d9c30 in g_object_new_valist () at /lib64/libgobject-2.0.so.0 #16 0x00007ffff63d9fa9 in g_object_new () at /lib64/libgobject-2.0.so.0 #17 0x00007fffe8338088 in nm_ifcfg_connection_new (source=source@entry=0x0, full_path=full_path@entry=0x9d5a60 "/etc/sysconfig/network-scripts/ifcfg-t2+", error=error@entry=0x7fffffffdfa8, out_ignore_error=out_ignore_error@entry=0x7fffffffdfa4) at src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-connection.c:429 #18 0x00007fffe8338b76 in update_connection (self=self@entry=0x9a7b00, source=source@entry=0x0, full_path=0x9d5a60 "/etc/sysconfig/network-scripts/ifcfg-t2+", connection=connection@entry=0x0, protect_existing_connection=protect_existing_connection@entry=0, protected_connections=protected_connections@entry=Python Exception <class 'gdb.error'> There is no member named keys.: 0x9f68c0, error=0x0) at src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-plugin.c:218 #19 0x00007fffe8339d9d in read_connections (plugin=plugin@entry=0x9a7b00) at src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-plugin.c:545 #20 0x00007fffe833a7e8 in get_connections (config=<optimized out>) at src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-plugin.c:581 #21 0x0000000000656ca2 in nm_settings_plugin_get_connections (config=config@entry=0x9a7b00) at src/settings/nm-settings-plugin.c:106 #22 0x00000000005c8a6a in load_connections (self=self@entry=0x7fffd4004670) at src/settings/nm-settings.c:239 #23 0x00000000005ca360 in nm_settings_start (self=0x7fffd4004670, error=error@entry=0x7fffffffe1f8) at src/settings/nm-settings.c:1800 #24 0x0000000000455507 in nm_manager_start (self=0x99d090, error=error@entry=0x7fffffffe1f8) at src/nm-manager.c:5262 #25 0x0000000000420b5c in main (argc=<optimized out>, argv=<optimized out>) at src/main.c:417 Fixes: 31f2a466390024be6710b259d5ad228ebf5d1557
-rw-r--r--src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-connection.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-connection.c b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-connection.c
index 5d3428d6bf..b81a9eb919 100644
--- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-connection.c
+++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-connection.c
@@ -389,6 +389,13 @@ set_property (GObject *object, guint prop_id,
static void
nm_ifcfg_connection_init (NMIfcfgConnection *connection)
{
+ NMIfcfgConnectionPrivate *priv = NM_IFCFG_CONNECTION_GET_PRIVATE (connection);
+
+ priv->file_wd = -1;
+ priv->keyfile_wd = -1;
+ priv->routefile_wd = -1;
+ priv->route6file_wd = -1;
+
g_signal_connect (connection, "notify::" NM_SETTINGS_CONNECTION_FILENAME,
G_CALLBACK (filename_changed), NULL);
}