{"action":"created","issue":{"url":"https://api.github.com/repos/zeromq/libzmq/issues/2895","repository_url":"https://api.github.com/repos/zeromq/libzmq","labels_url":"https://api.github.com/repos/zeromq/libzmq/issues/2895/labels{/name}","comments_url":"https://api.github.com/repos/zeromq/libzmq/issues/2895/comments","events_url":"https://api.github.com/repos/zeromq/libzmq/issues/2895/events","html_url":"https://github.com/zeromq/libzmq/issues/2895","id":291596252,"node_id":"MDU6SXNzdWUyOTE1OTYyNTI=","number":2895,"title":"Assertion failure: !(pollset [i].revents & POLLNVAL) (poll.cpp:157)","user":{"login":"sigiesec","id":16757805,"node_id":"MDQ6VXNlcjE2NzU3ODA1","avatar_url":"https://avatars0.githubusercontent.com/u/16757805?v=4","gravatar_id":"","url":"https://api.github.com/users/sigiesec","html_url":"https://github.com/sigiesec","followers_url":"https://api.github.com/users/sigiesec/followers","following_url":"https://api.github.com/users/sigiesec/following{/other_user}","gists_url":"https://api.github.com/users/sigiesec/gists{/gist_id}","starred_url":"https://api.github.com/users/sigiesec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sigiesec/subscriptions","organizations_url":"https://api.github.com/users/sigiesec/orgs","repos_url":"https://api.github.com/users/sigiesec/repos","events_url":"https://api.github.com/users/sigiesec/events{/privacy}","received_events_url":"https://api.github.com/users/sigiesec/received_events","type":"User","site_admin":false},"labels":[{"id":361093800,"node_id":"MDU6TGFiZWwzNjEwOTM4MDA=","url":"https://api.github.com/repos/zeromq/libzmq/labels/Area%20(Runtime%20/%20Usage)","name":"Area (Runtime / Usage)","color":"d4c5f9","default":false},{"id":58140780,"node_id":"MDU6TGFiZWw1ODE0MDc4MA==","url":"https://api.github.com/repos/zeromq/libzmq/labels/Critical","name":"Critical","color":"e11d21","default":false},{"id":359697670,"node_id":"MDU6TGFiZWwzNTk2OTc2NzA=","url":"https://api.github.com/repos/zeromq/libzmq/labels/Platform%20(windows/msvc)","name":"Platform (windows/msvc)","color":"bfd4f2","default":false},{"id":675552804,"node_id":"MDU6TGFiZWw2NzU1NTI4MDQ=","url":"https://api.github.com/repos/zeromq/libzmq/labels/Symptom%20(Assertion%20failure)","name":"Symptom (Assertion failure)","color":"bfd4f2","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-01-25T14:51:37Z","updated_at":"2018-06-09T08:20:05Z","closed_at":"2018-02-11T17:06:37Z","author_association":"MEMBER","body":"# Issue description\r\n\r\nAn assertion failure occurs in the following line:\r\nhttps://github.com/zeromq/libzmq/blob/3226b8ebddd9c6c738ba42986822c26418a49afb/src/poll.cpp#L157\r\n\r\nThe fd member of the offending entry in pollset in that case has the value -1 / retired_fd.\r\n\r\nApparently, this was already the case when poll was called, which caused poll to set the revents of the entry to POLLNVAL.\r\n\r\nI found that it is possible to call add_fd with a fd_ parameter of retired_fd/-1, which is not checked, so I assume this has happened somehow, but I do not know via which call chain this happened.\r\n\r\n# Environment\r\n\r\n* libzmq version (commit hash if unreleased): 4.2.3 built with ZMQ_USE_POLL\r\n* OS: Windows\r\n\r\n# Minimal test code / Steps to reproduce the issue\r\n\r\nUnfortunately, I have not been able to reproduce this issue. It occurs if some networking issues happen, such as firewall configurations between peers change, or the local network settings are reconfigured. I don't know yet what exactly triggers the issue, but it has occurred several times on different machines.\r\n\r\n# What's the actual result? (include assertion message & call stack if applicable)\r\n\r\nAssertion failure: !(pollset [i].revents & POLLNVAL) within a zmq::poll_t::worker_routine thread.\r\n\r\n# What's the expected result?\r\n\r\nNo assertion failure, operation continues.\r\n"},"comment":{"url":"https://api.github.com/repos/zeromq/libzmq/issues/comments/395950603","html_url":"https://github.com/zeromq/libzmq/issues/2895#issuecomment-395950603","issue_url":"https://api.github.com/repos/zeromq/libzmq/issues/2895","id":395950603,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NTk1MDYwMw==","user":{"login":"bluca","id":782193,"node_id":"MDQ6VXNlcjc4MjE5Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/782193?v=4","gravatar_id":"","url":"https://api.github.com/users/bluca","html_url":"https://github.com/bluca","followers_url":"https://api.github.com/users/bluca/followers","following_url":"https://api.github.com/users/bluca/following{/other_user}","gists_url":"https://api.github.com/users/bluca/gists{/gist_id}","starred_url":"https://api.github.com/users/bluca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bluca/subscriptions","organizations_url":"https://api.github.com/users/bluca/orgs","repos_url":"https://api.github.com/users/bluca/repos","events_url":"https://api.github.com/users/bluca/events{/privacy}","received_events_url":"https://api.github.com/users/bluca/received_events","type":"User","site_admin":false},"created_at":"2018-06-09T08:20:04Z","updated_at":"2018-06-09T08:20:04Z","author_association":"MEMBER","body":"It's fixed in 4.2.5"}}
{"actor":{"display_login":"bluca"}}