<br><br><div class="gmail_quote">2013/4/2 Angus Salkeld <span dir="ltr">&lt;<a href="mailto:asalkeld@redhat.com" target="_blank">asalkeld@redhat.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 02/04/13 10:57 +0400, eXeC001er wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2013/4/2 Angus Salkeld &lt;<a href="mailto:asalkeld@redhat.com" target="_blank">asalkeld@redhat.com</a>&gt;<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 29/03/13 01:13 +0400, eXeC001er wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello.<br>
<br>
This Q is crosspost from openais-maillist.<br>
<br>
I use corosync-2.3.0, libqb-0.14.4 on OpenIndiana:<br>
<br>
I tried to create an application that uses corosync via its libraries, but<br>
it seems something wrong.<br>
On the machine where i debug corosync-tests work fine, but my application<br>
does not work. The application cannot intialize CMAP connection (same with<br>
VOTEQUORUM).<br>
&quot;*_initialize&quot; function returned CS_ERR_NOT_EXIST error. on server side i<br>
see &quot;Error in connection setup (7104-7367-0): Broken pipe (32)&quot;.<br>
<br>
My appliacation is multi-thread and &quot;*_initialize&quot; is called not in main<br>
thread.<br>
<br>
</blockquote>
<br>
Well, I suggest you keep it simple initially.<br>
Do the standard corosync apps work ok?<br>
like:<br>
./tests/testcpg<br>
<br>
</blockquote>
<br>
yes. all tests from test directory of corosync sources work fine.<br>
</blockquote>
<br></div>
Well then there is no reason why other apps should not work.<br>
Just have a look at how they are written.<br></blockquote><div><br></div><div>Do not forget that tests are single-thread app. </div><div>My app is multi-thread and initialization not in main-thread. if i do initialization in main-thread then everything fine.</div>
<div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
<br>
It would be good to try narrow down what is failing.<br>
<br>
<br>
<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
the stack-trace:<br>
<br>
/3@3:   -&gt; libvotequorum:votequorum_**<u></u>initialize(0x8834b2c, 0x0, 0x0,<div class="im"><br>
0xfea63855)<br>
/2: nanosleep(0xFE99BF48, 0x00000000)       = 0<br>
/3@3:     -&gt; libqb:qb_hdb_handle_create()<br>
/3@3:     &lt;- libqb:qb_hdb_handle_create() = 0<br></div>
/3@3:     -&gt; libcorosync_common:hdb_error_*<u></u>*to_cs()<br>
/3@3:     &lt;- libcorosync_common:hdb_error_*<u></u>*to_cs() = 1<div class="im"><br>
/3@3:     -&gt; libqb:qb_hdb_handle_get()<br>
/3@3:     &lt;- libqb:qb_hdb_handle_get() = 0<br></div>
/3@3:     -&gt; libcorosync_common:hdb_error_*<u></u>*to_cs()<br>
/3@3:     &lt;- libcorosync_common:hdb_error_*<u></u>*to_cs() = 1<div class="im"><br>
/3@3:     -&gt; libqb:qb_ipcc_connect()<br>
/3: so_socket(PF_UNIX, SOCK_STREAM, 0, 0x00000000, SOV_DEFAULT) = 8<br>
/3: fcntl(8, F_GETFD, 0x00000000)           = 0<br>
/3: fcntl(8, F_SETFD, 0x00000001)           = 0<br>
/3: fcntl(8, F_SETFL, FNONBLOCK)            = 0<br>
/3: connect(8, 0xFE67C13A, 21, SOV_DEFAULT)     = 0<br>
/3: sigaction(SIGPIPE, 0xFE67C0E0, 0xFE67C140)  = 0<br>
/3: send(8, &quot;FFFFFFFF\0\0\0\018\0\0\0&quot;.., 24, 0)    = 24<br>
/3: sigaction(SIGPIPE, 0xFE67C0E0, 0x00000000)  = 0<br>
/3: sigaction(SIGPIPE, 0xFE67C0D0, 0xFE67C130)  = 0<br>
/3: recv(8, 0xFE67C210, 3112, 64)           Err#11 EAGAIN<br>
<br>
</div></blockquote><div class="im">
<br>
this ^ is the client returngin EAGAIN on the socket...<br>
the problem is probably on the server.<br>
</div></blockquote><div class="im">
<br>
<br>
on server side i also see strange case:<br>
<br>
if i try to run a corosync-* tool, then the tool returned required info,<br>
but on server side i see &quot;File not found&quot; error. I see that the corosync<br>
daemon tries to do something with /proc/&lt;client_pid&gt; file:<br>
<br>
an example:<br>
<br>
......... [QB    ] recv from client connection failed (10656-12155-22): No<br>
such file or directory (2)<br>
<br>
</div></blockquote>
<br>
I don&#39;t think this is a problem, oindiana/solaris sockets behave a bit<br>
differently to linux ones and the path to finding a disconnection are<br>
just a bit different. I think this is just using the wrong errno.<br>
<br>
The &quot;/proc/&lt;pid&gt;/&quot; access is also fine, it tries on each connection<br>
to resolve the process name, and if it can&#39;t just uses the pid.<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
<br>
<br>
 /3: sigaction(SIGPIPE, 0xFE67C0D0, 0x00000000)  = 0<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
/3: shutdown(8, SHUT_RDWR, SOV_DEFAULT)     = 0<br>
/3: close(8)                    = 0<br>
/3@3:     &lt;- libqb:qb_ipcc_connect() = 0<br></div>
/3@3:     -&gt; libcorosync_common:qb_to_cs_**<u></u>error()<br>
/3@3:     &lt;- libcorosync_common:qb_to_cs_**<u></u>error() = 12<br>
/3@3:     -&gt; libqb:qb_hdb_handle_put(**<u></u>0xfe9f3070, 0x0, 0xb86775,<div class="im"><br>
0xfe67ce7c)<br>
/3@3:     &lt;- libqb:qb_hdb_handle_put() = 0<br></div>
/3@3:     -&gt; libqb:qb_hdb_handle_destroy(**<u></u>0xfe9f3070, 0x0, 0xb86775,<div class="im"><br>
0x0)<br>
/3@3:       -&gt; libqb:qb_ipcc_disconnect(0x0, 0x8835b88, 0x0, 0x1)<br>
/3@3:       &lt;- libqb:qb_ipcc_disconnect() = 0<br>
/3@3:     &lt;- libqb:qb_hdb_handle_destroy() = 0<br></div>
/3@3:   &lt;- libvotequorum:votequorum_**<u></u>initialize() = 12<div><div class="h5"><br>
<br>
As you can see it returns CS_ERR_NOT_EXIST.<br>
<br>
same behaviour with CMAP and another services.<br>
<br>
Any ideas?<br>
<br>
</div></div></blockquote><div><div class="h5">
<br>
Can you turn on debug in corosync.conf and to_stderr<br>
logging {<br>
to_stderr: yes<br>
debug: on<br>
}<br>
and run corosync like this:<br>
&quot;sudo corosync -f&quot;<br>
<br>
then in another window run:<br>
./tests/testcpg<br>
<br>
then type a couple of words (any junk) - testcpg should send what ever<br>
is typed to corosync. Then Ctrl-C to end.<br>
<br>
Can you send the contents of both shells so I can see what both the<br>
client and server are doing?<br>
<br>
</div></div></blockquote><div><div class="h5">
<br>
CLIENT:<br>
<br>
$ sudo ./testcpg<br>
Type EXIT to finish<br>
Local node id is ac12fe0a<br>
membership list<br>
nza4-devel:20446 2013-04-02 10:43:38.902<br>
ConfchgCallback: group &#39;GROUP&#39;<br>
Local node id is <a href="http://10.254.18.172/ac12fe0a" target="_blank">10.254.18.172/ac12fe0a</a> result 1<br>
joined node/pid -1408041462/20446 reason: 1<br>
nodes in group now 1<br>
node/pid -1408041462/20446<br>
<br>
nza4-devel:20446 2013-04-02 10:43:38.904<br>
TotemConfchgCallback: ringid (2886925834.156)<br>
active processors 1: -1408041462<br>
param param param param<br>
nza4-devel:20446 2013-04-02 10:44:07.682<br>
DeliverCallback: message (len=25)from node/pid -1408041462/20446: &#39;param<br>
param param param<br>
&#39;<br>
<br>
<br>
SERVER:<br>
<br>
see attached file or <a href="http://pastie.org/7276133" target="_blank">http://pastie.org/7276133</a><br>
<br>
</div></div></blockquote>
<br>
I do have access to a oindiana machine if you have a test app that<br>
fails can you send it?</blockquote><div><br></div><div>will try later. </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
-Angus<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
-Angus<br>
<br>
 Thanks.<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
</blockquote>
<br>
 ______________________________<u></u>**_________________<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
quarterback-devel mailing list<br>
quarterback-devel@lists.**<a href="http://fedorahosted.org" target="_blank">fedo<u></u>rahosted.org</a>&lt;<a href="mailto:quarterback-devel@lists.fedorahosted.org" target="_blank">quarterback-<u></u>devel@lists.fedorahosted.org</a>&gt;<br>

<a href="https://lists.fedorahosted." target="_blank">https://lists.fedorahosted.</a>**<u></u>org/mailman/listinfo/**<u></u>quarterback-devel&lt;<a href="https://lists.fedorahosted.org/mailman/listinfo/quarterback-devel" target="_blank">https://<u></u>lists.fedorahosted.org/<u></u>mailman/listinfo/quarterback-<u></u>devel</a>&gt;<br>

<br>
</blockquote>
<br>
______________________________<u></u>**_________________<br>
quarterback-devel mailing list<br>
quarterback-devel@lists.**<a href="http://fedorahosted.org" target="_blank">fedo<u></u>rahosted.org</a>&lt;<a href="mailto:quarterback-devel@lists.fedorahosted.org" target="_blank">quarterback-<u></u>devel@lists.fedorahosted.org</a>&gt;<br>

<a href="https://lists.fedorahosted." target="_blank">https://lists.fedorahosted.</a>**<u></u>org/mailman/listinfo/**<u></u>quarterback-devel&lt;<a href="https://lists.fedorahosted.org/mailman/listinfo/quarterback-devel" target="_blank">https://<u></u>lists.fedorahosted.org/<u></u>mailman/listinfo/quarterback-<u></u>devel</a>&gt;<br>

<br>
</blockquote></blockquote><div class="HOEnZb"><div class="h5">
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
______________________________<u></u>_________________<br>
quarterback-devel mailing list<br>
<a href="mailto:quarterback-devel@lists.fedorahosted.org" target="_blank">quarterback-devel@lists.<u></u>fedorahosted.org</a><br>
<a href="https://lists.fedorahosted.org/mailman/listinfo/quarterback-devel" target="_blank">https://lists.fedorahosted.<u></u>org/mailman/listinfo/<u></u>quarterback-devel</a><br>
</blockquote>
<br>
______________________________<u></u>_________________<br>
quarterback-devel mailing list<br>
<a href="mailto:quarterback-devel@lists.fedorahosted.org" target="_blank">quarterback-devel@lists.<u></u>fedorahosted.org</a><br>
<a href="https://lists.fedorahosted.org/mailman/listinfo/quarterback-devel" target="_blank">https://lists.fedorahosted.<u></u>org/mailman/listinfo/<u></u>quarterback-devel</a><br>
</div></div></blockquote></div><br>