Actions
Bug #1732
closedWebSocketFace::sendData crash upon browser refresh
Start date:
07/03/2014
Due date:
% Done:
100%
Estimated time:
1.50 h
Description
Steps to reproduce:
- start
ndnpingserver
on the router - create a web application with NDN-JS that sends ping Interests continuously at 200ms interval
- run the web application on an Android phone, connect to the router over a high-latency (200ms or more) link
- hit REFRESH button on the phone browser
Expected: NFD destroys the face
Actual: with high probability, NFD crashes with terminate called after throwing an instance of 'boost::system::error_code'
More information:
gdb
stack trace reveals the crash happens innfd::WebSocketFace::sendData
.- The log message immediately before the crash is
1404449150.332705 INFO: [FaceTable] Removed face id=23 remote=wsclient://180.158.23.39:44199 local=ws://[::]:9696
, which indicates the face is already closed. However, PIT Downstream Record contains a reference to the face, so sendData is still called.
Updated by Junxiao Shi over 10 years ago
There are two ways to fix this bug, and I suggest doing both:
- WebSocketFace should have better error handling. A socket error in sending path should not cause a crash.
- Outgoing Interest pipeline and Outgoing Data pipeline should check face is still open (having a FaceId above zero) before sending via the face.
Updated by Junxiao Shi over 10 years ago
- Status changed from New to In Progress
I'll take care of modifications in forwarding pipelines, and leave WebSocketFace error handling to @Wentao Shang.
Updated by Junxiao Shi over 10 years ago
- % Done changed from 0 to 50
Modifications in forwarding pipelines are complete.
Updated by Wentao Shang over 10 years ago
- % Done changed from 50 to 70
Bug fix is pushed to gerrit. Please verify whether it works or not. Currently I don't have the environment to reproduce the error.
Updated by Alex Afanasyev over 10 years ago
- Status changed from In Progress to Closed
- % Done changed from 70 to 100
Actions