Sending data to the same pair socket in multi threads may cause aborting in msg_t::size()

Description

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?

Environment

ubuntu 12.10 64bit

Status

Assignee

Unassigned

Reporter

starcheng

Labels

Components

Affects versions

3.2.2

Priority

Major