Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 589886 Details for
Bug 820821
Nodes do not agree on CPG membership, messages lost
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Add even more debug informations - try 2
2012-06-06-0001-Add-even-more-debug-infos-assert.patch (text/plain), 7.23 KB, created by
Jan Friesse
on 2012-06-06 13:25:13 UTC
(
hide
)
Description:
Add even more debug informations - try 2
Filename:
MIME Type:
Creator:
Jan Friesse
Created:
2012-06-06 13:25:13 UTC
Size:
7.23 KB
patch
obsolete
>From d617a50d4223e5d9d1ba764821d959e34c6202d9 Mon Sep 17 00:00:00 2001 >From: Jan Friesse <jfriesse@redhat.com> >Date: Wed, 6 Jun 2012 15:23:16 +0200 >Subject: [PATCH] Add even more debug infos + assert > >Signed-off-by: Jan Friesse <jfriesse@redhat.com> >--- > exec/cpg.c | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++++----- > exec/sync.c | 2 + > 2 files changed, 91 insertions(+), 9 deletions(-) > >diff --git a/exec/cpg.c b/exec/cpg.c >index da60d80..8b2659d 100644 >--- a/exec/cpg.c >+++ b/exec/cpg.c >@@ -458,6 +458,48 @@ struct downlist_msg { > > static struct req_exec_cpg_downlist g_req_exec_cpg_downlist; > >+/* >+ * Function print group name. It's not reentrant >+ */ >+static char *cpg_print_group_name(const mar_cpg_name_t *group) >+{ >+ static char res[CPG_MAX_NAME_LENGTH * 4 + 1]; >+ int dest_pos = 0; >+ char c; >+ int i; >+ >+ for (i = 0; i < group->length; i++) { >+ c = group->value[i]; >+ >+ if (c >= ' ' && c < 0x7f && c != '\\') { >+ res[dest_pos++] = c; >+ } else { >+ if (c == '\\') { >+ res[dest_pos++] = '\\'; >+ res[dest_pos++] = '\\'; >+ } else { >+ snprintf(res + dest_pos, sizeof(res) - dest_pos, "\\x%02X", c); >+ dest_pos += 4; >+ } >+ } >+ } >+ res[dest_pos] = 0; >+ >+ return (res); >+} >+ >+static void cpg_dump_process_info(void) { >+ struct list_head *iter; >+ int i = 0; >+ >+ for (iter = process_info_list_head.next; iter != &process_info_list_head; iter = iter->next) { >+ struct process_info *pi = list_entry (iter, struct process_info, list); >+ >+ log_printf (LOG_DEBUG, "process_info[%d]: nodeid = %x, pid = %u, group = %s", >+ i++, pi->nodeid, pi->pid, cpg_print_group_name(&pi->group)); >+ } >+}; >+ > static void cpg_sync_init ( > const unsigned int *trans_list, > size_t trans_list_entries, >@@ -469,6 +511,9 @@ static void cpg_sync_init ( > int i, j; > int found; > >+ ENTER(); >+ cpg_dump_process_info(); >+ > my_sync_state = CPGSYNC_DOWNLIST; > > memcpy (my_member_list, member_list, member_list_entries * >@@ -498,27 +543,38 @@ static void cpg_sync_init ( > } > } > g_req_exec_cpg_downlist.left_nodes = entries; >+ >+ LEAVE(); > } > > static int cpg_sync_process (void) > { > int res = -1; > >+ ENTER(); >+ > if (my_sync_state == CPGSYNC_DOWNLIST) { > res = cpg_exec_send_downlist(); > if (res == -1) { >+ log_printf (LOG_DEBUG, "cpg_exec_send_downlist returned -1"); > return (-1); > } > my_sync_state = CPGSYNC_JOINLIST; > } > if (my_sync_state == CPGSYNC_JOINLIST) { > res = cpg_exec_send_joinlist(); >+ if (res == -1) { >+ log_printf (LOG_DEBUG, "cpg_exec_send_joinlist returned -1"); >+ } > } >+ >+ LEAVE(); > return (res); > } > > static void cpg_sync_activate (void) > { >+ ENTER(); > memcpy (my_old_member_list, my_member_list, > my_member_list_entries * sizeof (unsigned int)); > my_old_member_list_entries = my_member_list_entries; >@@ -531,12 +587,16 @@ static void cpg_sync_activate (void) > downlist_state = CPG_DOWNLIST_NONE; > > notify_lib_totem_membership (NULL, my_member_list_entries, my_member_list); >+ cpg_dump_process_info(); >+ LEAVE(); > } > > static void cpg_sync_abort (void) > { >+ ENTER(); > downlist_state = CPG_DOWNLIST_NONE; > downlist_messages_delete (); >+ LEAVE(); > } > > static int notify_lib_totem_membership ( >@@ -799,6 +859,7 @@ static void downlist_master_choose_and_send (void) > } > > if (left_pi) { >+ > marshall_from_mar_cpg_name_t(&cpg_group, &left_pi->group); > cpg_group.value[cpg_group.length] = 0; > >@@ -808,6 +869,13 @@ static void downlist_master_choose_and_send (void) > memcpy(&pcd->cpg_group, &cpg_group, sizeof(struct cpg_name)); > qb_map_put(group_map, pcd->cpg_group.value, pcd); > } >+ >+ log_printf (LOG_DEBUG, "left_list[%d] group:%s, ip:%s, pid:%d", >+ size, >+ cpg_print_group_name(&left_pi->group), >+ (char*)api->totem_ifaces_print(left_pi->nodeid), >+ left_pi->pid); >+ > size = pcd->left_list_entries; > pcd->left_list[size].nodeid = left_pi->nodeid; > pcd->left_list[size].pid = left_pi->pid; >@@ -823,14 +891,6 @@ static void downlist_master_choose_and_send (void) > while (qb_map_iter_next(miter, (void **)&pcd)) { > marshall_to_mar_cpg_name_t(&group, &pcd->cpg_group); > >- log_printf (LOG_DEBUG, "left_list_entries:%d", pcd->left_list_entries); >- for (i=0; i<pcd->left_list_entries; i++) { >- log_printf (LOG_DEBUG, "left_list[%d] group:%d, ip:%s, pid:%d", >- i, pcd->cpg_group.value, >- (char*)api->totem_ifaces_print(pcd->left_list[i].nodeid), >- pcd->left_list[i].pid); >- } >- > /* send confchg event */ > notify_lib_joinlist(&group, NULL, > 0, NULL, >@@ -1178,7 +1238,9 @@ static void message_handler_req_exec_cpg_joinlist ( > const char *message = message_v; > const struct qb_ipc_response_header *res = (const struct qb_ipc_response_header *)message; > const struct join_list_entry *jle = (const struct join_list_entry *)(message + sizeof(struct qb_ipc_response_header)); >+ int i = 0; > >+ ENTER(); > log_printf(LOGSYS_LEVEL_DEBUG, "got joinlist message from node %x", > nodeid); > >@@ -1188,10 +1250,17 @@ static void message_handler_req_exec_cpg_joinlist ( > } > > while ((const char*)jle < message + res->size) { >+ log_printf (LOG_DEBUG, "join_list[%d] group:%s, ip:%s, pid:%d", >+ i++, >+ cpg_print_group_name(&jle->group_name), >+ (char*)api->totem_ifaces_print(nodeid), >+ jle->pid); >+ > do_proc_join (&jle->group_name, jle->pid, nodeid, > CONFCHG_CPG_REASON_NODEUP); > jle++; > } >+ LEAVE(); > } > > static void message_handler_req_exec_cpg_mcast ( >@@ -1243,7 +1312,8 @@ static void message_handler_req_exec_cpg_mcast ( > } > > if (!known_node) { >- log_printf(LOGSYS_LEVEL_WARNING, "Unknown node -> we will not deliver message"); >+ log_printf(LOGSYS_LEVEL_WARNING, "Unknown node %x -> we will not deliver message", nodeid); >+ assert(0); > return ; > } > >@@ -1276,7 +1346,9 @@ static int cpg_exec_send_joinlist(void) > char *buf; > struct join_list_entry *jle; > struct iovec req_exec_cpg_iovec; >+ int i = 0; > >+ ENTER(); > for (iter = process_info_list_head.next; iter != &process_info_list_head; iter = iter->next) { > struct process_info *pi = list_entry (iter, struct process_info, list); > >@@ -1298,16 +1370,24 @@ static int cpg_exec_send_joinlist(void) > jle = (struct join_list_entry *)(buf + sizeof(struct qb_ipc_response_header)); > res = (struct qb_ipc_response_header *)buf; > >+ log_printf (LOG_DEBUG, "join_list_entries:%d", count); > for (iter = process_info_list_head.next; iter != &process_info_list_head; iter = iter->next) { > struct process_info *pi = list_entry (iter, struct process_info, list); > > if (pi->nodeid == api->totem_nodeid_get ()) { > memcpy (&jle->group_name, &pi->group, sizeof (mar_cpg_name_t)); > jle->pid = pi->pid; >+ >+ log_printf (LOG_DEBUG, "join_list[%d] group:%s, pid:%d", >+ i, cpg_print_group_name(&jle->group_name), >+ jle->pid); >+ > jle++; > } > } > >+ >+ > res->id = SERVICE_ID_MAKE(CPG_SERVICE, MESSAGE_REQ_EXEC_CPG_JOINLIST); > res->size = sizeof(struct qb_ipc_response_header)+sizeof(struct join_list_entry) * count; > >diff --git a/exec/sync.c b/exec/sync.c >index 2998988..74f558f 100644 >--- a/exec/sync.c >+++ b/exec/sync.c >@@ -456,6 +456,8 @@ static void service_build_message_transmit (struct req_exec_service_build_messag > > static void sync_barrier_enter (void) > { >+ log_printf (LOGSYS_LEVEL_DEBUG, "Sending sync barrier message for %s", >+ my_service_list[my_processing_idx].name); > my_state = SYNC_BARRIER; > barrier_message_transmit (); > } >-- >1.7.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 820821
:
583724
|
584502
|
584503
|
584918
|
584944
|
589886
|
590918
|
591194
|
591509
|
591532
|
592063
|
593132
|
593133
|
640873
|
640874
|
640875