<br><br><div class="gmail_quote">On Tue, Jan 12, 2010 at 1:37 PM, hj lee <span dir="ltr"><<a href="mailto:kerdosa@gmail.com">kerdosa@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="gmail_quote"><div><br><br>It happened again, I attched cib files and log messages of both nodes. The problem happened last night, but cib file was captured this morning. As you can see below log expert, the attrd receives 2 entries for cib_query, crm_attribute failed to update master score. The fact that the cib_process_xpath was printed twice and <xpath-query> tag clearly suggests that the root cause of this problem is xpath_search() returned two entries. So is it a bug in xml2 library?<br>
<br>Thanks<br>hj<br><br>2010-01-12 00:19:47.879800 copper1-cib: [4764]: debug: cib_process_xpath: Processing cib_query op for //cib/status//node_state[@id='<a href="http://copper1.dr.peach.com" target="_blank">copper1.dr.peach.com</a>']//nvpair[@name='master-vmrd-res:0'] (/cib/status/node_state[1]/transient_attributes/instance_attributes/nvpair[3])<br>
2010-01-12 00:19:47.897835 copper1-cib:last message repeated 2 times<br>2010-01-12 00:19:47.879870 copper1-attrd: [4766]: debug: log_data_element: find_nvpair_attr: Match <xpath-query ><br>2010-01-12 00:19:47.879892 copper1-attrd: [4766]: debug: log_data_element: find_nvpair_attr: Match <nvpair id="status-copper1.dr.peach.com-master-vmrd-res:0" name="master-vmrd-res:0" value="10000" /><br>
2010-01-12 00:19:47.898582 copper1-attrd:last message repeated 2 times<br>2010-01-12 00:19:47.879938 copper1-attrd: [4766]: debug: log_data_element: find_nvpair_attr: Match </xpath-query><br>2010-01-12 00:19:47.879958 copper1-attrd: [4766]: WARN: find_nvpair_attr: Multiple attributes match name=master-vmrd-res:0<br>
2010-01-12 00:19:47.879968 copper1-attrd: [4766]: info: find_nvpair_attr: Value: 10000 #011(id=status-copper1.dr.peach.com-master-vmrd-res:0)<br>2010-01-12 00:19:47.899603 copper1-attrd:last message repeated 2 times<br>
2010-01-12 00:19:47.880025 copper1-attrd: [4766]: info: attrd_perform_update: Sent update -40: master-vmrd-res:0=5<br>2010-01-12 00:19:47.880057 copper1-attrd: [4766]: ERROR: attrd_cib_callback: Update -40 for master-vmrd-res:0=5 failed: Required data for this CIB API call not found<br>
<br></div></div></blockquote><div><br>I suspect libxml2 is not thread-safe. And I found the following statement from libxml2 website(<a href="http://xmlsoft.org/threads.html">http://xmlsoft.org/threads.html</a>).<br><br>
"Note that the thread safety cannot be ensured for multiple threads sharing
the same document, the locking must be done at the application level".<br><br>Is cib code a thread-safe?<br><br>Thanks<br></div></div>