--=-nZjQSSSznW/danz3ADUx Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi all, Here I am again with some other issues I found during my testings with the latest linux ha from CVS. Let me know if you prefer that I fill some bug reports instead of using the mailing list. I was trying to modify the debug level of crmd when I noticed 2 issues. 1) crmadmin -d or crmadmin -i doesn't return, looks like the channel is never closed. My knowledge of the code is not enought to understand where to check for the problem. 2) If I launch some consecutive crmadmin -d , crmd starts using all the CPU, as it's going in a loop. From some debugging looks like debug level goes below the 0 and it overflows as it's defined as an unsigned int. I made this simple patch to avoid the problem, probably the same checks are needed also for the debug maximum level (I didn't made them as I cannot find what is the maximum log level). The changes to lib/crm/common/utils.c are needed to handle SIGUSR1/SIGUSR2 signal calls, while the changes to crm/crmd/messages.c are needed to handle the calls by crmadmin. Maybe there are better ways to fix this issue. Thanks! Bye! -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Hai dei virus sul tuo PC ma non sai come eliminarli? Allora impara subito come rimuovere ogni tipo di virus Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=5057&d=28-5 --=-nZjQSSSznW/danz3ADUx Content-Disposition: attachment; filename=heartbeat-debug-overflow01.patch Content-Type: text/x-patch; name=heartbeat-debug-overflow01.patch; charset=UTF-8 Content-Transfer-Encoding: 7bit diff -urp heartbeat-2.0.6.orig/crm/crmd/messages.c heartbeat-2.0.6/crm/crmd/messages.c --- heartbeat-2.0.6.orig/crm/crmd/messages.c 2006-05-11 11:36:17.000000000 +0200 +++ heartbeat-2.0.6/crm/crmd/messages.c 2006-05-28 19:48:04.000000000 +0200 @@ -855,9 +855,13 @@ handle_request(ha_msg_input_t *stored_ms } else if(strcasecmp(op, CRM_OP_DEBUG_DOWN) == 0) { int level = get_crm_log_level(); - set_crm_log_level(level-1); - crm_info("Debug set to %d (was %d)", - get_crm_log_level(), level); + if (level > 0) { + set_crm_log_level(level-1); + crm_info("Debug set to %d (was %d)", + get_crm_log_level(), level); + } else { + crm_info("Debug already at it's minimal value (0)"); + } } else if(strcasecmp(op, CRM_OP_JOIN_OFFER) == 0) { next_input = I_JOIN_OFFER; diff -urp heartbeat-2.0.6.orig/lib/crm/common/utils.c heartbeat-2.0.6/lib/crm/common/utils.c --- heartbeat-2.0.6.orig/lib/crm/common/utils.c 2006-05-27 13:04:08.000000000 +0200 +++ heartbeat-2.0.6/lib/crm/common/utils.c 2006-05-28 18:04:49.000000000 +0200 @@ -445,7 +445,8 @@ alter_debug(int nsig) break; case DEBUG_DEC: - crm_log_level--; + if (crm_log_level > 0) + crm_log_level--; break; default: --=-nZjQSSSznW/danz3ADUx Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Linux-HA mailing list Linux-HA@lists.linux-ha.org http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems --=-nZjQSSSznW/danz3ADUx--