{"action":"created","issue":{"url":"https://api.github.com/repos/eclipse/californium/issues/691","repository_url":"https://api.github.com/repos/eclipse/californium","labels_url":"https://api.github.com/repos/eclipse/californium/issues/691/labels{/name}","comments_url":"https://api.github.com/repos/eclipse/californium/issues/691/comments","events_url":"https://api.github.com/repos/eclipse/californium/issues/691/events","html_url":"https://github.com/eclipse/californium/issues/691","id":339374064,"node_id":"MDU6SXNzdWUzMzkzNzQwNjQ=","number":691,"title":"randomly Null pointer exception while notify blockwise response under performance","user":{"login":"joechen2010","id":340663,"node_id":"MDQ6VXNlcjM0MDY2Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/340663?v=4","gravatar_id":"","url":"https://api.github.com/users/joechen2010","html_url":"https://github.com/joechen2010","followers_url":"https://api.github.com/users/joechen2010/followers","following_url":"https://api.github.com/users/joechen2010/following{/other_user}","gists_url":"https://api.github.com/users/joechen2010/gists{/gist_id}","starred_url":"https://api.github.com/users/joechen2010/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joechen2010/subscriptions","organizations_url":"https://api.github.com/users/joechen2010/orgs","repos_url":"https://api.github.com/users/joechen2010/repos","events_url":"https://api.github.com/users/joechen2010/events{/privacy}","received_events_url":"https://api.github.com/users/joechen2010/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-07-09T09:33:24Z","updated_at":"2018-07-09T14:57:07Z","closed_at":null,"author_association":"NONE","body":"* branch your faced the issue. Currently \r\n   * and 2.0-M9\r\n```\r\n2018-07-09 11:52:28.199+08:00 ERROR 6f10b807-5204-4dad-8caa-4147a928153d  \t [CoapServer:5683#6] org.eclipse.californium.core.network.CoapEndpoint    {\"TraceID\":\"6f10b807-5204-4dad-8caa-4147a928153d\"} exception in protocol stage thread: null\r\njava.lang.NullPointerException: null\r\n        at org.eclipse.californium.elements.UdpEndpointContextMatcher.isResponseRelatedToRequest(UdpEndpointContextMatcher.java:70)\r\n        at org.eclipse.californium.core.network.UdpMatcher.receiveResponse(UdpMatcher.java:249)\r\n        at org.eclipse.californium.core.network.CoapEndpoint$InboxImpl.receiveResponse(CoapEndpoint.java:887)\r\n        at org.eclipse.californium.core.network.CoapEndpoint$InboxImpl.receiveMessage(CoapEndpoint.java:806)\r\n        at org.eclipse.californium.core.network.CoapEndpoint$InboxImpl.access$1000(CoapEndpoint.java:765)\r\n        at org.eclipse.californium.core.network.CoapEndpoint$InboxImpl$1.run(CoapEndpoint.java:781)\r\n        at org.eclipse.californium.core.network.CoapEndpoint$5.run(CoapEndpoint.java:1013)\r\n        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\r\n        at java.util.concurrent.FutureTask.run(FutureTask.java:266)\r\n        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)\r\n        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)\r\n        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\n        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\n        at java.lang.Thread.run(Thread.java:745)\r\n2018-07-09 11:52:30.234+08:00 WARN 83e915dc-9bc3-4b0b-b238-1e847efe85ee \t \t [CoapServer:5683#5] org.eclipse.californium.core.network.UdpMatcher {\"TraceID\":\"83e915dc-9bc3-4b0b-b238-1e847efe85ee\"} possible MID reuse before lifetime end for token [[cb1ccab9599a88a3]], expected MID 48851 but received 48850\r\n2018-07-09 11:52:30.236+08:00 ERROR f55cbdd3-2cfe-4e4d-a594-f7c724114396 \t \t [CoapServer:5683#5] org.eclipse.californium.core.network.CoapEndpoint    {\"TraceID\":\"f55cbdd3-2cfe-4e4d-a594-f7c724114396\"} exception in protocol stage thread: null\r\njava.lang.NullPointerException: null\r\n2018-07-09 11:52:30.241+08:00 WARN 2f3de741-55f2-4bd2-9468-6834f6ae1096 \t \t [CoapServer:5683#3] org.eclipse.californium.core.network.UdpMatcher {\"TraceID\":\"2f3de741-55f2-4bd2-9468-6834f6ae1096\"} possible MID reuse before lifetime end for token [[3d98a24d28a25037]], expected MID 51137 but received 51136\r\n2018-07-09 11:52:30.244+08:00 ERROR dcd32366-94f7-4b49-a4cb-1d1bd06c2b21 \t \t [CoapServer:5683#4] org.eclipse.californium.core.network.CoapEndpoint    {\"TraceID\":\"dcd32366-94f7-4b49-a4cb-1d1bd06c2b21\"} exception in protocol stage thread: null\r\n2018-07-09 17:57:37.031+08:00 ERROR c762f8ec-bbe4-44c8-a01e-c500232d54ea  [CoapServer:5683#3] org.eclipse.californium.core.network.CoapEndpoint {\"TraceID\":\"c762f8ec-bbe4-44c8-a01e-c500232d54ea\"} exception in protocol stage thread: MID must be a 16 bit unsigned int: -1\r\njava.lang.IllegalArgumentException: MID must be a 16 bit unsigned int: -1\r\n        at org.eclipse.californium.core.network.Exchange$KeyMID.<init>(Exchange.java:669)\r\n        at org.eclipse.californium.core.network.Exchange$KeyMID.fromOutboundMessage(Exchange.java:741)\r\n        at org.eclipse.californium.core.network.UdpMatcher.receiveResponse(UdpMatcher.java:277)\r\n        at org.eclipse.californium.core.network.CoapEndpoint$InboxImpl.receiveResponse(CoapEndpoint.java:887)\r\n        at org.eclipse.californium.core.network.CoapEndpoint$InboxImpl.receiveMessage(CoapEndpoint.java:806)\r\n        at org.eclipse.californium.core.network.CoapEndpoint$InboxImpl.access$1000(CoapEndpoint.java:765)\r\n        at org.eclipse.californium.core.network.CoapEndpoint$InboxImpl$1.run(CoapEndpoint.java:781)\r\n        at org.eclipse.californium.core.network.CoapEndpoint$5.run(CoapEndpoint.java:1013)\r\n        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\r\n        at java.util.concurrent.FutureTask.run(FutureTask.java:266)\r\n        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)\r\n        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)\r\n        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\n        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\n        at java.lang.Thread.run(Thread.java:745)\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/eclipse/californium/issues/comments/403508283","html_url":"https://github.com/eclipse/californium/issues/691#issuecomment-403508283","issue_url":"https://api.github.com/repos/eclipse/californium/issues/691","id":403508283,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMzUwODI4Mw==","user":{"login":"boaks","id":10937819,"node_id":"MDQ6VXNlcjEwOTM3ODE5","avatar_url":"https://avatars2.githubusercontent.com/u/10937819?v=4","gravatar_id":"","url":"https://api.github.com/users/boaks","html_url":"https://github.com/boaks","followers_url":"https://api.github.com/users/boaks/followers","following_url":"https://api.github.com/users/boaks/following{/other_user}","gists_url":"https://api.github.com/users/boaks/gists{/gist_id}","starred_url":"https://api.github.com/users/boaks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boaks/subscriptions","organizations_url":"https://api.github.com/users/boaks/orgs","repos_url":"https://api.github.com/users/boaks/repos","events_url":"https://api.github.com/users/boaks/events{/privacy}","received_events_url":"https://api.github.com/users/boaks/received_events","type":"User","site_admin":false},"created_at":"2018-07-09T14:57:07Z","updated_at":"2018-07-09T14:57:07Z","author_association":"CONTRIBUTOR","body":"> java.lang.NullPointerException: null\r\n> at org.eclipse.californium.elements.UdpEndpointContextMatcher.isResponseRelatedToRequest(UdpEndpointContextMatcher.java:70)\r\n\r\nseems to be caused by a null `requestContext`. \r\nIn 2.0.0-M10 the calling function is changed to check the context before the isResponseRelatedToRequest is called:\r\n\r\n```\r\nEndpointContext context = exchange.getEndpointContext();\r\nRequest currentRequest = exchange.getCurrentRequest();\r\nint requestMid = currentRequest.getMID();\r\nif (context == null || requestMid == Message.NONE) {\r\n\tLOGGER.debug(\"ignoring response {}, request pending to sent!\", response);\r\n\treturn null;\r\n}\r\n```\r\n\r\nSo, please retest the behaviour with 2.0.0-M10.\r\n "}}
{"actor":{"display_login":"boaks"}}