{"action":"created","issue":{"url":"https://api.github.com/repos/netty/netty/issues/5297","repository_url":"https://api.github.com/repos/netty/netty","labels_url":"https://api.github.com/repos/netty/netty/issues/5297/labels{/name}","comments_url":"https://api.github.com/repos/netty/netty/issues/5297/comments","events_url":"https://api.github.com/repos/netty/netty/issues/5297/events","html_url":"https://github.com/netty/netty/issues/5297","id":156207086,"number":5297,"title":"Livelock issue in MpscLinkedQueue.java","user":{"login":"shawn11ZX","id":12724185,"avatar_url":"https://avatars.githubusercontent.com/u/12724185?v=3","gravatar_id":"","url":"https://api.github.com/users/shawn11ZX","html_url":"https://github.com/shawn11ZX","followers_url":"https://api.github.com/users/shawn11ZX/followers","following_url":"https://api.github.com/users/shawn11ZX/following{/other_user}","gists_url":"https://api.github.com/users/shawn11ZX/gists{/gist_id}","starred_url":"https://api.github.com/users/shawn11ZX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shawn11ZX/subscriptions","organizations_url":"https://api.github.com/users/shawn11ZX/orgs","repos_url":"https://api.github.com/users/shawn11ZX/repos","events_url":"https://api.github.com/users/shawn11ZX/events{/privacy}","received_events_url":"https://api.github.com/users/shawn11ZX/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/netty/netty/labels/defect","name":"defect","color":"e11d21"}],"state":"open","locked":false,"assignee":{"login":"normanmaurer","id":439362,"avatar_url":"https://avatars.githubusercontent.com/u/439362?v=3","gravatar_id":"","url":"https://api.github.com/users/normanmaurer","html_url":"https://github.com/normanmaurer","followers_url":"https://api.github.com/users/normanmaurer/followers","following_url":"https://api.github.com/users/normanmaurer/following{/other_user}","gists_url":"https://api.github.com/users/normanmaurer/gists{/gist_id}","starred_url":"https://api.github.com/users/normanmaurer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normanmaurer/subscriptions","organizations_url":"https://api.github.com/users/normanmaurer/orgs","repos_url":"https://api.github.com/users/normanmaurer/repos","events_url":"https://api.github.com/users/normanmaurer/events{/privacy}","received_events_url":"https://api.github.com/users/normanmaurer/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/netty/netty/milestones/139","html_url":"https://github.com/netty/netty/milestones/4.1.1.Final","labels_url":"https://api.github.com/repos/netty/netty/milestones/139/labels","id":1676852,"number":139,"title":"4.1.1.Final","description":"","creator":{"login":"normanmaurer","id":439362,"avatar_url":"https://avatars.githubusercontent.com/u/439362?v=3","gravatar_id":"","url":"https://api.github.com/users/normanmaurer","html_url":"https://github.com/normanmaurer","followers_url":"https://api.github.com/users/normanmaurer/followers","following_url":"https://api.github.com/users/normanmaurer/following{/other_user}","gists_url":"https://api.github.com/users/normanmaurer/gists{/gist_id}","starred_url":"https://api.github.com/users/normanmaurer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normanmaurer/subscriptions","organizations_url":"https://api.github.com/users/normanmaurer/orgs","repos_url":"https://api.github.com/users/normanmaurer/repos","events_url":"https://api.github.com/users/normanmaurer/events{/privacy}","received_events_url":"https://api.github.com/users/normanmaurer/received_events","type":"User","site_admin":false},"open_issues":15,"closed_issues":1,"state":"open","created_at":"2016-03-31T19:37:02Z","updated_at":"2016-05-23T19:33:41Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2016-05-23T06:16:11Z","updated_at":"2016-05-24T02:00:08Z","closed_at":null,"body":"@normanmaurer We still experience the same issue as: Livelock issue in MpscLinkedQueue.java #3675\r\nOur version is netty-all-4.1.0.CR7.jar, which already contains the fix : cf66edb3a10fa2bb60802e91f14565b551c08f97 \r\n\r\nThe call stack is:\r\n\r\n`\r\n\"GameLoginScheduledThread\" prio=10 tid=0x00007f01d15f1800 nid=0xa2ed runnable [0x00007effdf4f3000]\r\n   java.lang.Thread.State: RUNNABLE\r\n        **at io.netty.util.internal.MpscLinkedQueue.peekNode(MpscLinkedQueue.java:106)\r\n        at io.netty.util.internal.MpscLinkedQueue.size(MpscLinkedQueue.java:163)\r\n        at io.netty.util.concurrent.SingleThreadEventExecutor.pendingTasks(SingleThreadEventExecutor.java:269)**\r\n        at common.net.NettyMonitor.saveAndReset(NettyMonitor.java:27)\r\n        at common.statistics.StatisticManager.reportAndReset(StatisticManager.java:67)\r\n        at gamelogin.Manager$2.run(Manager.java:211)\r\n        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)\r\n        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)\r\n        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)\r\n        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)\r\n        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)\r\n        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)\r\n        at java.lang.Thread.run(Thread.java:745)\r\n`"},"comment":{"url":"https://api.github.com/repos/netty/netty/issues/comments/221146747","html_url":"https://github.com/netty/netty/issues/5297#issuecomment-221146747","issue_url":"https://api.github.com/repos/netty/netty/issues/5297","id":221146747,"user":{"login":"shawn11ZX","id":12724185,"avatar_url":"https://avatars.githubusercontent.com/u/12724185?v=3","gravatar_id":"","url":"https://api.github.com/users/shawn11ZX","html_url":"https://github.com/shawn11ZX","followers_url":"https://api.github.com/users/shawn11ZX/followers","following_url":"https://api.github.com/users/shawn11ZX/following{/other_user}","gists_url":"https://api.github.com/users/shawn11ZX/gists{/gist_id}","starred_url":"https://api.github.com/users/shawn11ZX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shawn11ZX/subscriptions","organizations_url":"https://api.github.com/users/shawn11ZX/orgs","repos_url":"https://api.github.com/users/shawn11ZX/repos","events_url":"https://api.github.com/users/shawn11ZX/events{/privacy}","received_events_url":"https://api.github.com/users/shawn11ZX/received_events","type":"User","site_admin":false},"created_at":"2016-05-24T02:00:08Z","updated_at":"2016-05-24T02:00:08Z","body":"No, I call pendingTasks from a third thread which is used to monitor netty status. The code is as following: \r\n```\r\npublic class NettyEventLoopGroupMonitor implements StatisticItem {\r\n\tEventLoopGroup group;\r\n\tpublic NettyEventLoopGroupMonitor(EventLoopGroup group)\r\n\t{\r\n\t\tthis.group = group;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic void saveAndReset(String name, Map<String, Object> output) {\r\n\t\tSet<EventExecutor> executors = group.children();\r\n\t\tint tasks = 0;\r\n\t\tfor (EventExecutor executor: executors)\r\n\t\t{\r\n\t\t\tif (executor instanceof SingleThreadEventExecutor) {\r\n\t\t\t\tSingleThreadEventExecutor e = (SingleThreadEventExecutor) executor;\r\n\t\t\t\ttasks += e.pendingTasks();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\toutput.put(\"netty_\" + name, tasks);\r\n\t}\r\n}\r\n```"}}
{"actor":{"display_login":"shawn11ZX"}}