{"action":"created","issue":{"url":"https://api.github.com/repos/zeromq/libzmq/issues/2158","repository_url":"https://api.github.com/repos/zeromq/libzmq","labels_url":"https://api.github.com/repos/zeromq/libzmq/issues/2158/labels{/name}","comments_url":"https://api.github.com/repos/zeromq/libzmq/issues/2158/comments","events_url":"https://api.github.com/repos/zeromq/libzmq/issues/2158/events","html_url":"https://github.com/zeromq/libzmq/issues/2158","id":182201867,"number":2158,"title":"Socket monitor on TCP sockets uses internal Pair socket from multiple threads","user":{"login":"jens-auer","id":9391718,"avatar_url":"https://avatars.githubusercontent.com/u/9391718?v=3","gravatar_id":"","url":"https://api.github.com/users/jens-auer","html_url":"https://github.com/jens-auer","followers_url":"https://api.github.com/users/jens-auer/followers","following_url":"https://api.github.com/users/jens-auer/following{/other_user}","gists_url":"https://api.github.com/users/jens-auer/gists{/gist_id}","starred_url":"https://api.github.com/users/jens-auer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jens-auer/subscriptions","organizations_url":"https://api.github.com/users/jens-auer/orgs","repos_url":"https://api.github.com/users/jens-auer/repos","events_url":"https://api.github.com/users/jens-auer/events{/privacy}","received_events_url":"https://api.github.com/users/jens-auer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-10-11T08:19:24Z","updated_at":"2016-10-11T12:51:57Z","closed_at":null,"body":"When running a zmq_socket_monitor on TCP connections events are sent from multiple IO threads concurrently on the ZMQ_PAIR socket. This violates the single-thread usage assumption of ZeroMQ sockets and can crash the application (or worse continue with corrupted monitor data or corrupted socket states).\r\n\r\nEach stream_engine instance calls socket_base_t::monitor_event to send monitor events on the ZMQ_PAIR socket. This happens in the thread context of the stream_engine and there is no protection around the Pair socket, so it can be accessed from multiple threads."},"comment":{"url":"https://api.github.com/repos/zeromq/libzmq/issues/comments/252907678","html_url":"https://github.com/zeromq/libzmq/issues/2158#issuecomment-252907678","issue_url":"https://api.github.com/repos/zeromq/libzmq/issues/2158","id":252907678,"user":{"login":"somdoron","id":2715638,"avatar_url":"https://avatars.githubusercontent.com/u/2715638?v=3","gravatar_id":"","url":"https://api.github.com/users/somdoron","html_url":"https://github.com/somdoron","followers_url":"https://api.github.com/users/somdoron/followers","following_url":"https://api.github.com/users/somdoron/following{/other_user}","gists_url":"https://api.github.com/users/somdoron/gists{/gist_id}","starred_url":"https://api.github.com/users/somdoron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/somdoron/subscriptions","organizations_url":"https://api.github.com/users/somdoron/orgs","repos_url":"https://api.github.com/users/somdoron/repos","events_url":"https://api.github.com/users/somdoron/events{/privacy}","received_events_url":"https://api.github.com/users/somdoron/received_events","type":"User","site_admin":false},"created_at":"2016-10-11T12:51:57Z","updated_at":"2016-10-11T12:51:57Z","body":"@bluca The performance penalty is only when using monitor.  It shouldnt be big one as monitored events do not happen alot. Anyway I prefer to use new socket type option, however we can only use it for 4.2"}}
{"actor":{"display_login":"somdoron"}}