Installing ofono-phonesim-autostart makes the phone unusable

Bug #1401143 reported by Gustavo Pichorim Boiko
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ofono (Ubuntu)
Incomplete
Undecided
Unassigned
ofono-phonesim (Ubuntu)
Confirmed
High
Unassigned

Bug Description

Installing ofono-phonesim-autostart makes the ubuntu phone image continually reboot.

This is due to the fact that for some reason, the upstart ofono job isn't properly stopped by ofono-phonesim-autostart, and thus upstart continually tries to start it, eventually hitting the upstart respawn limit.

This then causes our new upstart monitor job to reboot the phone, which continues ad infinitum.

This can be seen by examining syslog, it seems ofonod is already running ( which is expected ) and another instance is trying to be initiated, which fails.

The ofono-phonesim-autostart package's post-install script stops the normal ofono upstart job and then launches ofono outside of upstart with command-line arguments that cause the 'phonesim' ofono driver to be loaded instead of rilmodem. Apparently some change in vivid has caused this script to break on krillin.

Dec 9 18:27:42 ubuntu-phablet ofonod[1792]: oFono version 1.12
Dec 9 18:27:42 ubuntu-phablet ofonod[1792]: Unable to hop onto D-Bus: Name already in use
Dec 9 18:27:42 ubuntu-phablet ofonod[1792]: Exit
Dec 9 18:27:42 ubuntu-phablet kernel: [ 12.665785]init: ofono main process ended, respawning
Dec 9 18:27:42 ubuntu-phablet ofonod[1798]: oFono version 1.12
Dec 9 18:27:42 ubuntu-phablet ofonod[1798]: Unable to hop onto D-Bus: Name already in use
Dec 9 18:27:42 ubuntu-phablet ofonod[1798]: Exit
Dec 9 18:27:42 ubuntu-phablet kernel: [ 12.703455]init: ofono main process ended, respawning
Dec 9 18:27:42 ubuntu-phablet ofonod[1805]: oFono version 1.12
Dec 9 18:27:42 ubuntu-phablet ofonod[1805]: Unable to hop onto D-Bus: Name already in use
Dec 9 18:27:42 ubuntu-phablet ofonod[1805]: Exit
Dec 9 18:27:42 ubuntu-phablet kernel: [ 12.736463]init: ofono main process ended, respawning
Dec 9 18:27:42 ubuntu-phablet ofonod[1809]: oFono version 1.12
Dec 9 18:27:42 ubuntu-phablet ofonod[1809]: Unable to hop onto D-Bus: Name already in use
Dec 9 18:27:42 ubuntu-phablet ofonod[1809]: Exit
Dec 9 18:27:42 ubuntu-phablet kernel: [ 12.804352]init: ofono main process ended, respawning
Dec 9 18:27:42 ubuntu-phablet ofonod[1816]: oFono version 1.12
Dec 9 18:27:42 ubuntu-phablet ofonod[1816]: Unable to hop onto D-Bus: Name already in use
Dec 9 18:27:42 ubuntu-phablet ofonod[1816]: Exit
Dec 9 18:27:42 ubuntu-phablet kernel: [ 12.862548]init: ofono main process ended, respawning
Dec 9 18:27:42 ubuntu-phablet ofonod[1818]: oFono version 1.12
Dec 9 18:27:42 ubuntu-phablet ofonod[1818]: Unable to hop onto D-Bus: Name already in use
Dec 9 18:27:42 ubuntu-phablet ofonod[1818]: Exit
Dec 9 18:27:42 ubuntu-phablet kernel: [ 12.898121]init: ofono main process ended, respawning
Dec 9 18:27:42 ubuntu-phablet ofonod[1823]: oFono version 1.12
Dec 9 18:27:42 ubuntu-phablet ofonod[1823]: Unable to hop onto D-Bus: Name already in use
Dec 9 18:27:42 ubuntu-phablet ofonod[1823]: Exit
Dec 9 18:27:42 ubuntu-phablet kernel: [ 12.936372]init: ofono main process ended, respawning
Dec 9 18:27:42 ubuntu-phablet ofonod[1827]: oFono version 1.12
Dec 9 18:27:42 ubuntu-phablet ofonod[1827]: Unable to hop onto D-Bus: Name already in use
Dec 9 18:27:42 ubuntu-phablet ofonod[1827]: Exit
Dec 9 18:27:42 ubuntu-phablet kernel: [ 12.966431]init: ofono main process ended, respawning
Dec 9 18:27:42 ubuntu-phablet kernel: [ 12.975834][WMT-LIB][E]wmt_lib_is_therm_ctrl_support(1175):thermal command can not be send: STP is not ready
Dec 9 18:27:42 ubuntu-phablet kernel: [ 12.975858][WMT-EXP][E]_mtk_wcn_wmt_therm_ctrl(232):thermal ctrl function not supported
Dec 9 18:27:42 ubuntu-phablet kernel: [ 12.975871][WMT-LIB][E]wmt_lib_is_therm_ctrl_support(1175):thermal command can not be send: STP is not ready
Dec 9 18:27:42 ubuntu-phablet kernel: [ 12.975885][WMT-EXP][E]_mtk_wcn_wmt_therm_ctrl(232):thermal ctrl function not supported
Dec 9 18:27:42 ubuntu-phablet kernel: [ 12.975898][WMT-LIB][E]wmt_lib_is_therm_ctrl_support(1175):thermal command can not be send: STP is not ready
Dec 9 18:27:42 ubuntu-phablet kernel: [ 12.975910][WMT-EXP][E]_mtk_wcn_wmt_therm_ctrl(232):thermal ctrl function not supported
Dec 9 18:27:42 ubuntu-phablet ofonod[1830]: oFono version 1.12
Dec 9 18:27:42 ubuntu-phablet ofonod[1830]: Unable to hop onto D-Bus: Name already in use
Dec 9 18:27:42 ubuntu-phablet ofonod[1830]: Exit
Dec 9 18:27:42 ubuntu-phablet kernel: [ 12.998166]init: ofono main process ended, respawning
Dec 9 18:27:42 ubuntu-phablet ofonod[1832]: oFono version 1.12
Dec 9 18:27:42 ubuntu-phablet ofonod[1832]: Unable to hop onto D-Bus: Name already in use
Dec 9 18:27:42 ubuntu-phablet ofonod[1832]: Exit
Dec 9 18:27:42 ubuntu-phablet kernel: [ 13.023913]init: ofono respawning too fast, stopped
Dec 9 18:27:42 ubuntu-phablet watchdog: 'ofono' (instance '') hit respawn limit - rebooting

Tony Espy (awe)
Changed in ofono (Ubuntu):
status: New → Incomplete
Changed in ofono-phonesim (Ubuntu):
status: New → Incomplete
Changed in ofono (Ubuntu):
assignee: nobody → Gustavo Pichorim Boiko (boiko)
Revision history for this message
Tony Espy (awe) wrote :

I just installed on mako running vidid-proposed #56.

As expected, ofono-phonesim-autostart stops the running ofonod instance, and restarts it such that phonesim is loaded ( vs. rilmodem ).

I'm able to run list-modems ( /usr/share/ofono/scripts/list-modems ) and confirm that phonesim has been loaded/initialized as the 'Manufacturer' property returned is 'MeeGo'.

I checked and didn't see any related crash files in /var/crash, nor did I see any unusual log messages from ofonod in the syslog. So from my point of view, ofono and ofono-phonesim-autostart are both working as expected.

Please re-test and make sure to provide device, channel, and image #.

I tried rebooting ( which is recommended before running autopilot tests ), and everything still looks fine to me.

Revision history for this message
Gustavo Pichorim Boiko (boiko) wrote :

I can still reproduce the issue.

Device: krillin
Image: #65
Channel: vivid-proposed

I just did the following:
- flashed the latest vivid-proposed
- installed ofono-phonesim-autostart
- rebooted

Revision history for this message
Tiago Salem Herrmann (tiagosh) wrote :

Same issue here with image #65, channel ubuntu-touch/devel-proposed on krillin.

Changed in ofono (Ubuntu):
assignee: Gustavo Pichorim Boiko (boiko) → nobody
Revision history for this message
Tony Espy (awe) wrote :

I finally reproduced it:

Device: krillin
Image: #70
Channel: vivid-proposed

It doesn't happen on mako/vivid-proposed, or krillin on RTM.

Changed in ofono-phonesim (Ubuntu):
status: Incomplete → Confirmed
importance: Undecided → High
Revision history for this message
Tony Espy (awe) wrote :

After this happens, the only way to recover is to force the device to power-off with the power button, and then boot into recovery.

Tony Espy (awe)
description: updated
Revision history for this message
Martin Pitt (pitti) wrote :

I tried this on a desktop and on mako, both work. I unfortunately can't try this in an emulator as that seems to have broken since last week (bug 1413271), and I don't have a krillin so I can't test this there myself.

Indeed phonesim-autostart does that (through the with-ofono-phonesim script):

service ofono stop || true
ofonod -P ril,rildev,stktest $DEBUG_OFONO -n >/etc/ofono/ofono.log 2>&1 &
OFONO_PID=$!

The || true is intended to guard against failure if ofono is already stopped. But that might be the place where things go wrong in krillin, if ofono somehow fails to stop there? If it runs on, then the ofonod invocation in the next line should fail, not the original instance from the upstart job, but maybe there's something funky going on there. Are there any upstart jobs which are krillin specific and mention ofono in any way?

It might be useful to install just ofono-phonesim *without* ofono-phonesim-autostart, and run with-ofono-phonesim through set -x. Check Which of these succeeds/fails, and use upstart-monitor to see what else happens during that time?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.