Issues
- Sending data to the same pair socket in multi threads may cause aborting in msg_t::size()LIBZMQ-595
- tcp_connector fails to set the socket FDLIBZMQ-594
- STREAM disconnect notificatio only half worksLIBZMQ-593
- build fails on solairs: no suitable polling system foundLIBZMQ-592
- Assertion and consequent crash on Bad FD when reconnecting to a TCP serverLIBZMQ-591
- TCP keepalive options not properly set on WindowsLIBZMQ-590Resolved issue: LIBZMQ-590
- UDP supportLIBZMQ-589
- libzmq soversion is wrong in 4.0.3LIBZMQ-588Resolved issue: LIBZMQ-588
- Using DEALER socket(zeromq2.2) connect to ROUTER socket (zeromq4.0.1)failedLIBZMQ-587
- test_zmq_default_max() failureLIBZMQ-586
- port scan with nmap -sT causes REP socket to abortLIBZMQ-585
- Reconnect to new publisher doesn't reestablish subscriptionsLIBZMQ-584
- zmq_poll stops expiring timeout in virtualized Windows 7LIBZMQ-583
- AIX shared libraryLIBZMQ-582Resolved issue: LIBZMQ-582
- getsockopt ZMQ_RCVMORE requires sizeof(int) at least, with 1 byte it should be more than enoughLIBZMQ-581Resolved issue: LIBZMQ-581
- Destructing singleton context (or global variable context) in a DLL produces WSASTARTUP errorLIBZMQ-580
- Don't find libsodium when built as static libLIBZMQ-579Resolved issue: LIBZMQ-579
- z85_decoder is extremely slowLIBZMQ-578Resolved issue: LIBZMQ-578
- Doc examples with zmq_msg_close usage - incorrect parameter is provided sometimeLIBZMQ-577Resolved issue: LIBZMQ-577
- crash closing a socket after zmq_msg_send returns EAGAINLIBZMQ-576Resolved issue: LIBZMQ-576
- Assertion failure on tcp_connecter.cpp:279LIBZMQ-575
- Assertion failure caused by too many socketsLIBZMQ-574Resolved issue: LIBZMQ-574
- msg->init was missing for ROUTER_RAW with empty messageLIBZMQ-573Resolved issue: LIBZMQ-573
- Improvement on Get The Software pageLIBZMQ-572Resolved issue: LIBZMQ-572
- test_stream failingLIBZMQ-571Resolved issue: LIBZMQ-571
- struct zmq_event_t not alignedLIBZMQ-570
- Socket server crashes with random client dataLIBZMQ-569Resolved issue: LIBZMQ-569
- Add ipc accept filterLIBZMQ-568
- Add abstract namespace support for ipc sockets on LInuxLIBZMQ-567Resolved issue: LIBZMQ-567
- Dealer-to-router connection can failLIBZMQ-566Resolved issue: LIBZMQ-566
- spell errorLIBZMQ-565Resolved issue: LIBZMQ-565
- PUB socket doesn't re-connect to bound SUB (fix)LIBZMQ-564
- Assertion failure "erased == 1 (mtrie.cpp:292)" with multiple subscribers and pushersLIBZMQ-562
- Can't build with system pgm libLIBZMQ-561Resolved issue: LIBZMQ-561
- Build doesn't install bundled openpgm on linuxLIBZMQ-560Resolved issue: LIBZMQ-560
- Message not received in SUB when binding the SUB and connecting the PUBLIBZMQ-559Resolved issue: LIBZMQ-559
- problem installing zmq, error in make check: lt-test_last_endpoint: test_last_endpoint.cppLIBZMQ-558
- PUB/SUB connection loss with TIME_WAIT state on PUBLIBZMQ-557
- ROUTER socket does not support reconnection from clients with multiple NICsLIBZMQ-556Resolved issue: LIBZMQ-556
- Race condition when using ZMQ_IDENTITYLIBZMQ-555
- ZMQ_LINGER does not workLIBZMQ-554
- Missing ; in ip.cpp fileLIBZMQ-553
- document support for NULL free function in zmq_msg_init_dataLIBZMQ-552
- Closing a socket directly after send discards the messageLIBZMQ-551Resolved issue: LIBZMQ-551
- PUB/SUB with bind on subscriber side not working on version 3.2LIBZMQ-550Resolved issue: LIBZMQ-550
- Disconnect self connectionLIBZMQ-549
- after window restart, one side can not receive messageLIBZMQ-548
- Assertion failed: ok (mailbox.cpp:84)LIBZMQ-547
- zmq_disconnect and zmq_unbind may make pipes linger indefinitelyLIBZMQ-546
- Fix a missing include in zmq.hppLIBZMQ-545Resolved issue: LIBZMQ-545
50 of 594
Sending data to the same pair socket in multi threads may cause aborting in msg_t::size()
Description
Environment
ubuntu 12.10 64bit
Attachments
1
Created June 19, 2014 at 1:31 PM
Updated June 19, 2014 at 1:34 PM
Activity
Show:
starcheng
updated the descriptionJune 19, 2014 at 1:34 PMI used router-dealer pattern in my application. In order to send and receive data from the router socket in the same thread, I used the pairs to transfer message. I did't realize that the pipe_t::write was not thread safe, because queue.back() and queue.push() in ypipe_t::write() are both dependent on the same member "back_pos". In multi-threads called, it would push an empty msg into queue that caused aborting at "zmq_assert(check())" in zmq::msg_t::size().
It was my mistake to send data to the same pair socket in multi-threads. But, I was wondering that the monitor_event in socket_base also used the same pair to send events in multi-threads at the same time.
I added log in socket_base.cpp and modified the test_monitor.cpp in tests folder and made check. The log(see attached file) shows that what I concerned is the truth.
Am I alarmist?
starcheng
created the IssueJune 19, 2014 at 1:31 PM
I used router-dealer pattern in my application. In order to send and receive data from the router socket in the same thread, I used the pairs to transfer message. I did't realize that the pipe_t::write was not thread safe, because queue.back() and queue.push() in ypipe_t::write() are both dependent on the same member "back_pos". In multi-threads called, it would push an empty msg into queue that caused aborting at "zmq_assert(check())" in zmq::msg_t::size().
It was my mistake to send data to the same pair socket in multi-threads. But, I was wondering that the monitor_event in socket_base also used the same pair to send events in multi-threads at the same time.
I added log in socket_base.cpp and modified the test_monitor.cpp in tests folder and made check. The log(see attached file) shows that what I concerned is the truth.
Am I alarmist?