This happens when this part of "autostart" is executed:

service ofono-phonesim stop
assert_in 'running' "`service ofono status`"

When ofono-phonesim service stops, it is supposed to re-start ofono
service, and this should happen before the assert_in statement is
reached. However, when the test fails it is because ofono daemon re-
appears in the system a bit later than expected and the assert statement
is executed right before that.

This in turn happens because ofono-phonesim is calling "service ofono
start" from a SIGTERM handler triggered by "service ofono-phonesim
stop". This is not really working, and systemctl hangs in "service ofono
stop" until the ofono-phonesim is actually killed by a timeout. After
that, ofono service is finally started but now there is no guarantee of
that happening before the call to "service ofono-phonesim stop" returns
in the autostart script, as it actually returns with error. Hence the
race condition.

Note that the systemctl hang happens always, but some times that makes
the script fail and some time it does not.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1557958

Title:
  Flaky autostart autopkgtest

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ofono-phonesim/+bug/1557958/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to