Index: cluster-glue-1.0.7/lrm/lrmd/lrmd.c =================================================================== --- cluster-glue-1.0.7.orig/lrm/lrmd/lrmd.c 2011-01-07 18:11:02.144936280 -0500 +++ cluster-glue-1.0.7/lrm/lrmd/lrmd.c 2011-01-07 18:11:07.504936281 -0500 @@ -1522,6 +1522,28 @@ lrmd_client_t* client = (lrmd_client_t*) user_data; CHECK_ALLOCATED(client, "client", ); + + /* If we've been called as a result of g_src and/or + * g_src_cbk being unreffed, don't try to unref it + * again, as that'll deadlock. OTOH, we might have + * introduced a leak here. */ +#if 0 + if (client->g_src != NULL) { + G_main_del_IPC_Channel(client->g_src); + } + + if (client->g_src_cbk != NULL) { + G_main_del_IPC_Channel(client->g_src_cbk); + } +#endif + lrmd_client_destroy(client); + +} + +static void +remove_client (lrmd_client_t *client) +{ + CHECK_ALLOCATED(client, "client", ); if (client->g_src != NULL) { G_main_del_IPC_Channel(client->g_src); } @@ -1606,7 +1628,7 @@ exist = lookup_client(client->pid); if (NULL != exist) { g_hash_table_remove(clients, (gpointer)&client->pid); - on_remove_client(exist); + remove_client(exist); lrmd_log(LOG_NOTICE, "on_msg_register: the client [pid:%d] already exists in " "internal client list, let remove it at first."