[zeromq-dev] zcertstore_insert: Assertion 'rc == 0' failed.
Pieter Hintjens
ph at imatix.com
Tue Mar 10 17:11:02 CET 2015
Yes, that's right.
On Tue, Mar 10, 2015 at 2:28 PM, Bachmair Florian - flexSolution GmbH
<Florian.Bachmair at flexsolution.eu> wrote:
> ok thank you!
>
> makecert generates 2 certificates.
> So I just need the private one for the publisher and the public one for the subscriber?
>
>
> -----Ursprüngliche Nachricht-----
> Von: zeromq-dev-bounces at lists.zeromq.org [mailto:zeromq-dev-bounces at lists.zeromq.org] Im Auftrag von Pieter Hintjens
> Gesendet: Dienstag, 10. März 2015 12:38
> An: ZeroMQ development list
> Betreff: Re: [zeromq-dev] zcertstore_insert: Assertion 'rc == 0' failed.
>
> You have duplicate certificates. The assertion isn't great, the code
> should handle this better (though it's not clear what it can do).
>
> On Tue, Mar 10, 2015 at 11:49 AM, Bachmair Florian - flexSolution GmbH
> <Florian.Bachmair at flexsolution.eu> wrote:
>> I hope this helps!
>>
>> (gdb) backtrace
>> #0 0x00007ffff753ccc9 in __GI_raise (sig=sig at entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
>> #1 0x00007ffff75400d8 in __GI_abort () at abort.c:89
>> #2 0x00007ffff7535b86 in __assert_fail_base (
>> fmt=0x7ffff7686830 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
>> assertion=assertion at entry=0x7ffff79199a9 "rc == 0",
>> file=file at entry=0x7ffff791f67e "src/zcertstore.c", line=line at entry=178,
>> function=function at entry=0x7ffff7920240 <__PRETTY_FUNCTION__.11183> "zcertstore_insert")
>> at assert.c:92
>> #3 0x00007ffff7535c32 in __GI___assert_fail (assertion=assertion at entry=0x7ffff79199a9 "rc == 0",
>> file=file at entry=0x7ffff791f67e "src/zcertstore.c", line=line at entry=178,
>> function=function at entry=0x7ffff7920240 <__PRETTY_FUNCTION__.11183> "zcertstore_insert")
>> at assert.c:101
>> #4 0x00007ffff78e5dd5 in zcertstore_insert (self=self at entry=0x7ffff0002b80,
>> cert_p=cert_p at entry=0x7ffff5669dd8) at src/zcertstore.c:178
>> #5 0x00007ffff78e5eb9 in s_load_certs_from_disk (self=0x7ffff0002b80) at src/zcertstore.c:113
>> #6 0x00007ffff78e5fc9 in zcertstore_new (location=0x7ffff0002b60 ".curve") at src/zcertstore.c:81
>> #7 0x00007ffff790bc88 in s_agent_handle_pipe (self=0x7ffff00008c0) at src/zauth_v2.c:413
>> #8 s_agent_task (args=<optimized out>, ctx=<optimized out>, pipe=<optimized out>) at src/zauth_v2.c:595
>> #9 0x00007ffff791801f in s_thread_shim (args=0x607030) at src/zthread.c:82
>> #10 0x00007ffff6e95182 in start_thread (arg=0x7ffff566a700) at pthread_create.c:312
>> #11 0x00007ffff760047d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
>>
>>
>> -----Ursprüngliche Nachricht-----
>> Von: zeromq-dev-bounces at lists.zeromq.org [mailto:zeromq-dev-bounces at lists.zeromq.org] Im Auftrag von Bachmair Florian - flexSolution GmbH
>> Gesendet: Dienstag, 10. März 2015 09:46
>> An: ZeroMQ development list
>> Betreff: Re: [zeromq-dev] zcertstore_insert: Assertion 'rc == 0' failed.
>>
>> How can I do that?
>> -g doesn't change anything at the output.
>> I tried to use addr2line as well put just get "??:0" as output
>>
>> -----Ursprüngliche Nachricht-----
>> Von: zeromq-dev-bounces at lists.zeromq.org [mailto:zeromq-dev-bounces at lists.zeromq.org] Im Auftrag von Pieter Hintjens
>> Gesendet: Dienstag, 10. März 2015 08:57
>> An: ZeroMQ development list
>> Betreff: Re: [zeromq-dev] zcertstore_insert: Assertion 'rc == 0' failed.
>>
>> Yes, that is a backtrace. Could you now recompile/link with debugging
>> (-g switch) so we get file line numbers?
>>
>> Thanks
>> Pieter
>>
>> On Tue, Mar 10, 2015 at 7:36 AM, Bachmair Florian - flexSolution GmbH
>> <Florian.Bachmair at flexsolution.eu> wrote:
>>> I hope this is what you mean:
>>>
>>> Publisher: src/zcertstore.c:178: zcertstore_insert: Assertion `rc == 0' failed.
>>> Error: signal 6:
>>> /home/[user]/pro/workspace/Publisher/Debug/Publisher[0x400d59]
>>> /lib/x86_64-linux-gnu/libc.so.6(+0x36d40)[0x7f7151ab8d40]
>>> /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x39)[0x7f7151ab8cc9]
>>> /lib/x86_64-linux-gnu/libc.so.6(abort+0x148)[0x7f7151abc0d8]
>>> /lib/x86_64-linux-gnu/libc.so.6(+0x2fb86)[0x7f7151ab1b86]
>>> /lib/x86_64-linux-gnu/libc.so.6(+0x2fc32)[0x7f7151ab1c32]
>>> /usr/local/lib/libczmq.so.3(+0x1add5)[0x7f7151e61dd5]
>>> /usr/local/lib/libczmq.so.3(+0x1aeb9)[0x7f7151e61eb9]
>>> /usr/local/lib/libczmq.so.3(zcertstore_new+0x79)[0x7f7151e61fc9]
>>> /usr/local/lib/libczmq.so.3(+0x40c88)[0x7f7151e87c88]
>>>
>>> -----Ursprüngliche Nachricht-----
>>> Von: zeromq-dev-bounces at lists.zeromq.org [mailto:zeromq-dev-bounces at lists.zeromq.org] Im Auftrag von Pieter Hintjens
>>> Gesendet: Montag, 9. März 2015 21:01
>>> An: ZeroMQ development list
>>> Betreff: Re: [zeromq-dev] zcertstore_insert: Assertion 'rc == 0' failed.
>>>
>>> Can you get the stack backtrace?
>>>
>>> On Mon, Mar 9, 2015 at 2:58 PM, Bachmair Florian - flexSolution GmbH
>>> <Florian.Bachmair at flexsolution.eu> wrote:
>>>> I combiled it exactly like here: http://hintjens.com/blog:49#toc0
>>>>
>>>> If I try the "HelloCurve" program, everything is ok.
>>>> -----Ursprüngliche Nachricht-----
>>>> Von: zeromq-dev-bounces at lists.zeromq.org [mailto:zeromq-dev-bounces at lists.zeromq.org] Im Auftrag von Arnaud Kapp
>>>> Gesendet: Montag, 9. März 2015 14:37
>>>> An: ZeroMQ development list
>>>> Betreff: Re: [zeromq-dev] zcertstore_insert: Assertion 'rc == 0' failed.
>>>>
>>>> This is just a guess, but since you're saying that it works on an
>>>> other machine, it may be correct.
>>>>
>>>> Did you compile libzmq with libsodium support?
>>>>
>>>> On Mon, Mar 9, 2015 at 2:20 PM, Bachmair Florian - flexSolution GmbH
>>>> <Florian.Bachmair at flexsolution.eu> wrote:
>>>>> I get this error "zcertstore_insert: Assertion 'rc == 0' failed."
>>>>>
>>>>>
>>>>>
>>>>> When I execute this code:
>>>>>
>>>>>
>>>>>
>>>>> #include "czmq.h"
>>>>>
>>>>> static int s_send(void *socket, char *string);
>>>>>
>>>>> static int s_sendmore(void *socket, char *string);
>>>>>
>>>>> int main(void) {
>>>>>
>>>>> puts("Publisher");
>>>>>
>>>>> zctx_t *context = zctx_new();
>>>>>
>>>>> zauth_t *auth = zauth_new(context);
>>>>>
>>>>> zauth_allow(auth, "127.0.0.1");
>>>>>
>>>>> assert(auth);
>>>>>
>>>>> puts("1");
>>>>>
>>>>> zauth_set_verbose(auth, true);
>>>>>
>>>>> zauth_configure_curve(auth, "*", ".curve");
>>>>>
>>>>> puts("2");
>>>>>
>>>>>
>>>>>
>>>>> zcert_t *server_cert = zcert_load(".curve/mycert.pvt");
>>>>>
>>>>> assert(server_cert);
>>>>>
>>>>> void *publisher = zsocket_new(context, ZMQ_PUB);
>>>>>
>>>>> zcert_apply(server_cert, publisher);
>>>>>
>>>>> zsocket_set_curve_server(publisher, 1);
>>>>>
>>>>>
>>>>>
>>>>> while (1) {
>>>>>
>>>>> s_sendmore(publisher, "A");
>>>>>
>>>>> s_send(publisher, "We don't want to see
>>>>> this");
>>>>>
>>>>> s_sendmore(publisher, "B");
>>>>>
>>>>> s_send(publisher, "We would like to see
>>>>> this");
>>>>>
>>>>> sleep(1);
>>>>>
>>>>> }
>>>>>
>>>>> zmq_close(publisher);
>>>>>
>>>>> zmq_ctx_destroy(context);
>>>>>
>>>>> puts("exit");
>>>>>
>>>>> return 0;
>>>>>
>>>>> }
>>>>>
>>>>> // Convert C string to 0MQ string and send to socket
>>>>>
>>>>> static int s_send(void *socket, char *string) {
>>>>>
>>>>> int size = zmq_send(socket, string, strlen(string), 0);
>>>>>
>>>>> return size;
>>>>>
>>>>> }
>>>>>
>>>>> // Sends string as 0MQ string, as multipart non-terminal
>>>>>
>>>>> static int s_sendmore(void *socket, char *string) {
>>>>>
>>>>> int size = zmq_send(socket, string, strlen(string),
>>>>> ZMQ_SNDMORE);
>>>>>
>>>>> return size;
>>>>>
>>>>> }
>>>>>
>>>>>
>>>>>
>>>>> I have compiled everything exactly like it is described in
>>>>> http://hintjens.com/blog:49#toc0
>>>>>
>>>>>
>>>>>
>>>>> The odd thing is that I had this code running on a other machine sucesfully.
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> zeromq-dev mailing list
>>>>> zeromq-dev at lists.zeromq.org
>>>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Kapp Arnaud - Xaqq
>>>> _______________________________________________
>>>> zeromq-dev mailing list
>>>> zeromq-dev at lists.zeromq.org
>>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>>>
>>>>
>>>> _______________________________________________
>>>> zeromq-dev mailing list
>>>> zeromq-dev at lists.zeromq.org
>>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>> _______________________________________________
>>> zeromq-dev mailing list
>>> zeromq-dev at lists.zeromq.org
>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>> _______________________________________________
>>> zeromq-dev mailing list
>>> zeromq-dev at lists.zeromq.org
>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>> _______________________________________________
>> zeromq-dev mailing list
>> zeromq-dev at lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>> _______________________________________________
>> zeromq-dev mailing list
>> zeromq-dev at lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>> _______________________________________________
>> zeromq-dev mailing list
>> zeromq-dev at lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
More information about the zeromq-dev
mailing list