Send Linux-ha-cvs mailing list submissions to linux-ha-cvs@lists.linux-ha.org
To subscribe or unsubscribe via the World Wide Web, visit http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs or, via email, send a message with subject or body 'help' to [EMAIL PROTECTED] You can reach the person managing the list at [EMAIL PROTECTED] When replying, please edit your Subject line so it is more specific than "Re: Contents of Linux-ha-cvs digest..." Today's Topics: 1. Linux-HA CVS: crm by andrew from (linux-ha-cvs@lists.linux-ha.org) 2. Linux-HA CVS: include by andrew from (linux-ha-cvs@lists.linux-ha.org) 3. Linux-HA CVS: crm by andrew from (linux-ha-cvs@lists.linux-ha.org) ---------------------------------------------------------------------- Message: 1 Date: Thu, 6 Jul 2006 03:30:35 -0600 (MDT) From: linux-ha-cvs@lists.linux-ha.org Subject: [Linux-ha-cvs] Linux-HA CVS: crm by andrew from To: [EMAIL PROTECTED] Message-ID: <[EMAIL PROTECTED]> linux-ha CVS committal Author : andrew Host : Project : linux-ha Module : crm Dir : linux-ha/crm/crmd Modified Files: join_dc.c messages.c Log Message: Dont delete messages in the send_(ipc|ha)_helpers to make memory leak checking easier Compensate for CIB configuration growth - enables tracking of almost all memory (de)allocations in the CIB =================================================================== RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/join_dc.c,v retrieving revision 1.91 retrieving revision 1.92 diff -u -3 -r1.91 -r1.92 --- join_dc.c 29 May 2006 13:29:31 -0000 1.91 +++ join_dc.c 6 Jul 2006 09:30:28 -0000 1.92 @@ -67,6 +67,7 @@ } else { crm_debug("sent attrd refresh"); } + crm_msg_del(update); } else { crm_info("Couldn't connect to attrd this time"); =================================================================== RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/messages.c,v retrieving revision 1.154 retrieving revision 1.155 diff -u -3 -r1.154 -r1.155 --- messages.c 8 Jun 2006 14:07:38 -0000 1.154 +++ messages.c 6 Jul 2006 09:30:28 -0000 1.155 @@ -1145,7 +1145,6 @@ if (client_channel != NULL) { crm_debug_3("Sending message via channel %s.", sys); send_ok = send_ipc_message(client_channel, msg); - msg = NULL; /* so the crm_msg_del() below doesnt fail */ } else if(sys != NULL && strcasecmp(sys, CRM_SYSTEM_CIB) == 0) { crm_err("Sub-system (%s) has been incorporated into the CRMd.", ------------------------------ Message: 2 Date: Thu, 6 Jul 2006 03:30:35 -0600 (MDT) From: linux-ha-cvs@lists.linux-ha.org Subject: [Linux-ha-cvs] Linux-HA CVS: include by andrew from To: [EMAIL PROTECTED] Message-ID: <[EMAIL PROTECTED]> linux-ha CVS committal Author : andrew Host : Project : linux-ha Module : include Dir : linux-ha/include/crm/common Modified Files: ipc.h util.h Log Message: Dont delete messages in the send_(ipc|ha)_helpers to make memory leak checking easier Compensate for CIB configuration growth - enables tracking of almost all memory (de)allocations in the CIB =================================================================== RCS file: /home/cvs/linux-ha/linux-ha/include/crm/common/util.h,v retrieving revision 1.36 retrieving revision 1.37 diff -u -3 -r1.36 -r1.37 --- util.h 4 Jul 2006 14:07:43 -0000 1.36 +++ util.h 6 Jul 2006 09:30:28 -0000 1.37 @@ -1,4 +1,4 @@ -/* $Id: util.h,v 1.36 2006/07/04 14:07:43 andrew Exp $ */ +/* $Id: util.h,v 1.37 2006/07/06 09:30:28 andrew Exp $ */ /* * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]> * @@ -98,6 +98,10 @@ extern gboolean crm_diff_mem_stats(int log_level, const char *location, cl_mem_stats_t *saved_stats); +extern void crm_xml_nbytes(crm_data_t *xml, long *bytes, long *allocs, long *frees); + +extern void crm_adjust_mem_stats(long bytes, long allocs, long frees); + extern char *generate_transition_magic_v202( const char *transition_key, int op_status); ------------------------------ Message: 3 Date: Thu, 6 Jul 2006 04:55:10 -0600 (MDT) From: linux-ha-cvs@lists.linux-ha.org Subject: [Linux-ha-cvs] Linux-HA CVS: crm by andrew from To: [EMAIL PROTECTED] Message-ID: <[EMAIL PROTECTED]> linux-ha CVS committal Author : andrew Host : Project : linux-ha Module : crm Dir : linux-ha/crm/cib Modified Files: callbacks.c io.c messages.c Log Message: More tweaks for trying to pin down the memory leak =================================================================== RCS file: /home/cvs/linux-ha/linux-ha/crm/cib/callbacks.c,v retrieving revision 1.129 retrieving revision 1.130 diff -u -3 -r1.129 -r1.130 --- callbacks.c 6 Jul 2006 09:30:28 -0000 1.129 +++ callbacks.c 6 Jul 2006 10:55:09 -0000 1.130 @@ -1,4 +1,4 @@ -/* $Id: callbacks.c,v 1.129 2006/07/06 09:30:28 andrew Exp $ */ +/* $Id: callbacks.c,v 1.130 2006/07/06 10:55:09 andrew Exp $ */ /* * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]> * @@ -679,8 +679,15 @@ longclock_t call_stop = 0; longclock_t call_start = 0; cl_mem_stats_t saved_stats; + cl_mem_stats_t *running_stats = NULL; + if(running_stats == NULL) { + START_stat_free_op(); + crm_malloc0(running_stats, sizeof(cl_mem_stats_t)); + END_stat_free_op(); + crm_save_mem_stats("running-stats", running_stats); + } crm_save_mem_stats(__PRETTY_FUNCTION__, &saved_stats); - + call_start = time_longclock(); cib_client->num_calls++; op = cl_get_string(op_request, F_CIB_OPERATION); @@ -705,6 +712,7 @@ cib_call_time += (call_stop - call_start); crm_diff_mem_stats(LOG_ERR, __PRETTY_FUNCTION__, &saved_stats); + crm_diff_mem_stats(LOG_ERR, "running-cib-usage", running_stats); } gboolean @@ -717,7 +725,6 @@ cl_mem_stats_t saved_stats; crm_save_mem_stats(__PRETTY_FUNCTION__, &saved_stats); - if(cib_client == NULL) { crm_err("Receieved call from unknown source. Discarding."); return FALSE; @@ -771,7 +778,7 @@ keep_channel = cib_process_disconnect(channel, cib_client); } - crm_diff_mem_stats(LOG_ERR, __PRETTY_FUNCTION__, &saved_stats); + crm_diff_mem_stats(LOG_DEBUG, __PRETTY_FUNCTION__, &saved_stats); return keep_channel; } @@ -1138,7 +1145,6 @@ local_notify = FALSE; } } - crm_debug_3("processing response cases"); if(local_notify) { @@ -1187,8 +1193,9 @@ crm_msg_del(op_reply); free_xml(result_diff); - crm_diff_mem_stats(LOG_ERR, __PRETTY_FUNCTION__, &saved_stats); - + if(crm_diff_mem_stats(LOG_ERR, __PRETTY_FUNCTION__, &saved_stats)) { + crm_log_message_adv(LOG_ERR,"IPC[leak]", request); + } return; } @@ -1355,8 +1362,7 @@ op, call_options, section, input, current_cib, &result_cib, &output); - CRM_DEV_ASSERT(result_cib == NULL); - free_xml(result_cib); + CRM_CHECK(result_cib == NULL, free_xml(result_cib)); } if((call_options & cib_discard_reply) == 0) { @@ -1585,7 +1591,7 @@ hb_cluster->llc_ops->rcvmsg(hb_cluster, 0); } - crm_diff_mem_stats(LOG_ERR, __PRETTY_FUNCTION__, &saved_stats); + crm_diff_mem_stats(LOG_DEBUG, __PRETTY_FUNCTION__, &saved_stats); return (channel->ch_status == IPC_CONNECT); } =================================================================== RCS file: /home/cvs/linux-ha/linux-ha/crm/cib/io.c,v retrieving revision 1.73 retrieving revision 1.74 diff -u -3 -r1.73 -r1.74 --- io.c 6 Jul 2006 09:30:28 -0000 1.73 +++ io.c 6 Jul 2006 10:55:09 -0000 1.74 @@ -1,4 +1,4 @@ -/* $Id: io.c,v 1.73 2006/07/06 09:30:28 andrew Exp $ */ +/* $Id: io.c,v 1.74 2006/07/06 10:55:09 andrew Exp $ */ /* * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]> * @@ -560,9 +560,9 @@ if(new_bytes != old_bytes) { crm_info("CIB size is %ld bytes (was %ld)", new_bytes, old_bytes); + crm_adjust_mem_stats(new_bytes - old_bytes, new_allocs - old_allocs, + new_frees - old_frees); } - crm_adjust_mem_stats( - new_bytes - old_bytes, new_allocs - old_allocs, new_frees - old_frees); } if(the_cib != saved_cib && the_cib != new_cib) { =================================================================== RCS file: /home/cvs/linux-ha/linux-ha/crm/cib/messages.c,v retrieving revision 1.84 retrieving revision 1.85 diff -u -3 -r1.84 -r1.85 --- messages.c 6 Jul 2006 09:30:28 -0000 1.84 +++ messages.c 6 Jul 2006 10:55:09 -0000 1.85 @@ -1,4 +1,4 @@ -/* $Id: messages.c,v 1.84 2006/07/06 09:30:28 andrew Exp $ */ +/* $Id: messages.c,v 1.85 2006/07/06 10:55:09 andrew Exp $ */ /* * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]> * @@ -200,6 +200,7 @@ crm_debug_2("Processing \"%s\" event for section=%s", op, crm_str(section)); + CRM_CHECK(*answer == NULL, free_xml(*answer)); *answer = NULL; if (safe_str_eq(XML_CIB_TAG_SECTION_ALL, section)) { ------------------------------ _______________________________________________ Linux-ha-cvs mailing list Linux-ha-cvs@lists.linux-ha.org http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs End of Linux-ha-cvs Digest, Vol 32, Issue 25 ********************************************