-
Notifications
You must be signed in to change notification settings - Fork 35
Deadlock. #16
Comments
Another symptom of this bug is exhaust of file descriptors: This eventually leads to: The reason is that the components are trying to make a JSON-RPC call to each other, but end up in the deadlock described above. Each waiting JSON-RPC call consumes one file descriptor out of the maximum 1024 allowed. Under load, the descriptors are all consumed. |
Deadlock can be recreated through the 'tc' command provided by iproute2. On the backend server (rvi-test1.nginfotpdx.net - 38.129.64.31). Issue a tc command that will introduce a 20-500ms delay with a 25% probability:
Check out branch 0.3.1 on rvi-test1:
Start the mobile HVAC interface, and make sure it connects to Install RVI 0.3.1 RPM on an IVI box. Edit
Edit the node_service_prefix entry to look like this:
(Replace mfeuer with a suitable unique string) Reboot the RVI box. Launch mobile HVAC interface. Drag the left temperature sensor on the mobile HVAC interface quickly up and down for 10 seconds. The RVI node on rvi-test1.nginfotpdx.net will freeze with timeouts. |
A quick fix to this would be to pace our requests. For example the slider Art On 24 March 2015 at 16:18, Magnus Feuer [email protected] wrote:
Art McGee Jaguar Land Rover North America, LLC |
Under load, the RVI deadlocks in several instances when Component A calls Component B, while Component B calls Component A.
An example is service_edge_rpc's handle_remote_message(), called by protocol_rpc, which can be blocked if, at the same time the service_edge_rpc is currently processing a handle_local_message gen_server call which is indirectly calling protocol. The to call chains will, in this event, be blocked.
The solution is to replace synchronous calls (gen_server:call()), with asynchronous notifications (gen_server:cast()) that do not wait for a return value before continuing operations.
WIll be fixed in the gen_server_fix feature branch and 0.3.2
The text was updated successfully, but these errors were encountered: