{"action":"created","issue":{"url":"https://api.github.com/repos/zeromq/jeromq/issues/558","repository_url":"https://api.github.com/repos/zeromq/jeromq","labels_url":"https://api.github.com/repos/zeromq/jeromq/issues/558/labels{/name}","comments_url":"https://api.github.com/repos/zeromq/jeromq/issues/558/comments","events_url":"https://api.github.com/repos/zeromq/jeromq/issues/558/events","html_url":"https://github.com/zeromq/jeromq/issues/558","id":330352499,"node_id":"MDU6SXNzdWUzMzAzNTI0OTk=","number":558,"title":"java.lang.NullPointerException at zmq.pipe.Pipe.isDelimiter that turns JeroMQ into non-working state ","user":{"login":"vsiryi","id":1218295,"node_id":"MDQ6VXNlcjEyMTgyOTU=","avatar_url":"https://avatars1.githubusercontent.com/u/1218295?v=4","gravatar_id":"","url":"https://api.github.com/users/vsiryi","html_url":"https://github.com/vsiryi","followers_url":"https://api.github.com/users/vsiryi/followers","following_url":"https://api.github.com/users/vsiryi/following{/other_user}","gists_url":"https://api.github.com/users/vsiryi/gists{/gist_id}","starred_url":"https://api.github.com/users/vsiryi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vsiryi/subscriptions","organizations_url":"https://api.github.com/users/vsiryi/orgs","repos_url":"https://api.github.com/users/vsiryi/repos","events_url":"https://api.github.com/users/vsiryi/events{/privacy}","received_events_url":"https://api.github.com/users/vsiryi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-07T16:42:41Z","updated_at":"2018-06-12T20:14:22Z","closed_at":null,"author_association":"NONE","body":"Original issue happened several times on production where we use JeroMQ. The problem was manifested in the fact that all clients disconnected from the server simultaneously without possibility to re-connect again till server restart.\r\n\r\nException: \r\n`Exception in thread \"pool-2-thread-1\" java.lang.NullPointerException\r\n\tat zmq.pipe.Pipe.isDelimiter(Pipe.java:504)\r\n\tat zmq.pipe.Pipe.checkRead(Pipe.java:193)\r\n\tat zmq.socket.FQ.hasIn(FQ.java:146)\r\n\tat zmq.socket.pipeline.Pull.xhasIn(Pull.java:52)\r\n\tat zmq.SocketBase.hasIn(SocketBase.java:872)\r\n\tat zmq.SocketBase.getSocketOpt(SocketBase.java:260)\r\n\tat zmq.poll.PollItem.readyOps(PollItem.java:121)\r\n\tat zmq.ZMQ.poll(ZMQ.java:724)\r\n\tat org.zeromq.ZMQ$Poller.poll(ZMQ.java:3832)\r\n\tat net.overc.zmq.server.BiDirectionMessageServer.lambda$0(BiDirectionMessageServer.java:78)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\n\tat java.lang.Thread.run(Thread.java:745)`\r\n\r\nI have prepared 'as small as possible' project for reproduce issue: https://github.com/vsiryi/zmq-fatal-error\r\n\r\n- Server implemented as ROUTER socket and may possibility to track online users (heartbeat), map connection identity with user id and send some messages (events) to a specific user.\r\n- Client implemented as DEALER socket. In example it make 'pong' response message based on 'ping' message from server and read 'event' message.\r\n\r\nPlease execute net.overc.zmq.ReproduceFatalException.reproduce for reproduce an exception. This test run a server and than run 15 clients. Please note that issue reproduced time by time. Usually enough to do 3-4 executions for reproduce.\r\n\r\nAfter this exception all existing connections will be disconnected (receive ZMonitor.Event.DISCONNECTED events). New connections from clients will be accepted but also disconnected in few seconds.  \r\n\r\nCatch an exception in production code doesn't help because all next org.zeromq.ZMQ$Poller.poll invocations produce same exception.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/zeromq/jeromq/issues/comments/396718540","html_url":"https://github.com/zeromq/jeromq/issues/558#issuecomment-396718540","issue_url":"https://api.github.com/repos/zeromq/jeromq/issues/558","id":396718540,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NjcxODU0MA==","user":{"login":"fredoboulo","id":9487850,"node_id":"MDQ6VXNlcjk0ODc4NTA=","avatar_url":"https://avatars1.githubusercontent.com/u/9487850?v=4","gravatar_id":"","url":"https://api.github.com/users/fredoboulo","html_url":"https://github.com/fredoboulo","followers_url":"https://api.github.com/users/fredoboulo/followers","following_url":"https://api.github.com/users/fredoboulo/following{/other_user}","gists_url":"https://api.github.com/users/fredoboulo/gists{/gist_id}","starred_url":"https://api.github.com/users/fredoboulo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredoboulo/subscriptions","organizations_url":"https://api.github.com/users/fredoboulo/orgs","repos_url":"https://api.github.com/users/fredoboulo/repos","events_url":"https://api.github.com/users/fredoboulo/events{/privacy}","received_events_url":"https://api.github.com/users/fredoboulo/received_events","type":"User","site_admin":false},"created_at":"2018-06-12T20:14:22Z","updated_at":"2018-06-12T20:14:22Z","author_association":"CONTRIBUTOR","body":"Hello, that looks like a fait amount of code. I do not have much time now for investigation, but I can already say that it may happen if your sockets are shared between threads, which seems to be the case. It means that send(), receive() and close() methods calls have to be performed inside the same thread."}}
{"actor":{"display_login":"fredoboulo"}}