OSDN Git Service

RIL occasionally stopps event loop on phone process crash
authorKazuhiro Ondo <kazuhiro.ondo@motorola.com>
Fri, 14 Oct 2011 22:50:58 +0000 (17:50 -0500)
committerJohn Huang <jsh@google.com>
Tue, 18 Oct 2011 23:59:27 +0000 (16:59 -0700)
RIL occasionally exits from its event loop due to race condition
upon phone process crash. And there is no recovery mechanism
provided and causing permanent cellular data loss until reset.

The solution is simply to kill rild process to start over when
event loop exits for some reason.

Bug:5428218
Change-Id: I88a9b8e966158f0f943fe3d189d91b1352481d9b

libril/ril.cpp

index dec5507..7998356 100644 (file)
@@ -2609,6 +2609,8 @@ eventLoop(void *param) {
     // Only returns on error
     ril_event_loop();
     LOGE ("error in event_loop_base errno:%d", errno);
+    // kill self to restart on error
+    kill(0, SIGKILL);
 
     return NULL;
 }