-
Notifications
You must be signed in to change notification settings - Fork 757
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
Abort signal thrown from zmq_send #100
Comments
What does the code look like? Do you have a minimal repro snippet? |
@bluca |
Are you sure the buffer is large enough? It might be overflowing |
It is large enough. Data size is only 46 bytes. But the container is created of size 256 bytes. It's an intermittent problem. Fails 50% of the time. |
@bluca (gdb) bt |
First of all, you should not use sprintf() in your program AT ALL. Instead
After you do it like this and the issue is still present then it could be discussed if there's something wrong with |
Closing this due to inactivity. If you still have problems, please reopen and provide some more information on how to reproduce it, an executable test case would be best. |
The following is the string I'm trying to send as a message using zmq_send:
" Node[0]TC[0]: Thread tid 16814, cpu 14 started"
Intermittently, my program crashes only while sending this message, not for other messages. This string is generated using snprintf, so it is definitely NULL terminated.
Following is the stack trace of the crash:
#0 0x00007fa29b56d187 in raise () from /lib64/libc.so.6
#1 0x00007fa29b56e538 in abort () from /lib64/libc.so.6
#2 0x00007fa29ca9ba3e in zmq::zmq_abort(char const*) ()
from libzmq.so.4.2.0
#3 0x00007fa29caa4389 in zmq::msg_t::size() ()
from libzmq.so.4.2.0
#4 0x00007fa29cad1032 in zmq::v2_encoder_t::message_ready() ()
fromlibzmq.so.4.2.0
#5 0x00007fa29cac4801 in zmq::stream_engine_t::out_event() ()
from libzmq.so.4.2.0
#6 0x00007fa29ca9c8a4 in zmq::io_thread_t::in_event() ()
from libzmq.so.4.2.0
#7 0x00007fa29ca9b71e in zmq::epoll_t::loop() ()
from libzmq.so.4.2.0
#8 0x00007fa29cace915 in thread_routine ()
from libzmq.so.4.2.0
#9 0x00007fa2a18ec0a4 in start_thread () from /lib64/libpthread.so.0
#10 0x00007fa29b61d04d in clone () from /lib64/libc.so.6
I have reproduced the same with two version of zmq - 4.2.0 and 4.1.6.
The text was updated successfully, but these errors were encountered: