Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: segv on multi-broker #46

Closed
rpedde opened this issue May 1, 2014 · 3 comments · Fixed by #48
Closed

Problem: segv on multi-broker #46

rpedde opened this issue May 1, 2014 · 3 comments · Fixed by #48

Comments

@rpedde
Copy link
Contributor

rpedde commented May 1, 2014

Reliable segv:

  1. open write pipe on one broker
  2. open corresponding read pipe on another broker
  3. segv
14-05-01 18:02:48 I: joining cluster as DD561851F4DAA8B14004F9CF9F3C0CB5
14-05-01 18:02:48 N: starting zpipes_server service
14-05-01 18:02:48 N: binding zpipes service to 'ipc://@/zpipes/local'
14-05-01 18:02:48 I: ZPIPES server appeared at 616A81862091A61E1A61C70EC4C77DC9
14-05-01 18:02:53    825: start:
14-05-01 18:02:53    825:     INPUT
14-05-01 18:02:53    825:         $ lookup or create pipe
14-05-01 18:02:53    825:         $ open pipe reader

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff55b3700 (LWP 21517)]
0x00007ffff7bc5dcc in s_client_execute (self=0xffffffffffffffff, event=10)
    at zpipes_server_engine.h:521
521         self->next_event = event;
(gdb) bt
#0  0x00007ffff7bc5dcc in s_client_execute (self=0xffffffffffffffff, event=10)
    at zpipes_server_engine.h:521
#1  0x00007ffff7bc532c in engine_send_event (client=0xffffffffffffffff, 
    event=have_reader_event) at zpipes_server_engine.h:340
#2  0x00007ffff7bcb353 in pipe_attach_local_reader (self=0x7fffec001510, 
    reader=0x7fffec001890) at zpipes_server.c:220
#3  0x00007ffff7bcc44a in open_pipe_reader (self=0x7fffec001890) at zpipes_server.c:481
#4  0x00007ffff7bc60ff in s_client_execute (self=0x7fffec001890, event=2)
    at zpipes_server_engine.h:562
#5  0x00007ffff7bca95e in s_server_client_message (loop=0x60fcd0, item=0x61f3b0, 
    argument=0x60ecd0) at zpipes_server_engine.h:1447
#6  0x00007ffff776dc6c in zloop_start (self=0x60fcd0) at zloop.c:463
#7  0x00007ffff7bcaac7 in s_server_task (args=0x0, ctx=0x608ec0, pipe=0x6091f0)
    at zpipes_server_engine.h:1465
#8  0x00007ffff777915f in s_thread_shim (args=0x608e90) at zthread.c:81
#9  0x00007ffff6ce1b50 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#10 0x00007ffff72550ed in clone () from /lib/x86_64-linux-gnu/libc.so.6
#11 0x0000000000000000 in ?? ()
(gdb) 
hintjens added a commit to hintjens/zbroker that referenced this issue May 2, 2014
Caused by incorrect code sending event to non-existent local thread.
Trivially reproduced in zpipes_test_cluster by opening writer before
reader.

Fixes zeromq#46.
@rpedde
Copy link
Contributor Author

rpedde commented May 2, 2014

Likely the same thing, but this segv at the same place:

open read pipe
open corresponding write pipe
close read pipe
close write pipe
open read pipe (same pipe name as initial open)

segv

@hintjens
Copy link
Member

hintjens commented May 2, 2014

I'll make a new issue, this is related to pipe reuse. It's happening on multi-broker, right?

@hintjens
Copy link
Member

hintjens commented May 2, 2014

Closing, for issue #47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants