Flaky autostart autopkgtest

Bug #1557958 reported by Alfonso Sanchez-Beato on 2016-03-16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ofono-phonesim (Ubuntu)
Alfonso Sanchez-Beato

Bug Description

autostart test has been seen to fail occassionally for i386 architecture on xenial. See attached log.

This happened while executing autopkg tests when landing a new ofono version.

description: updated

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.

Changed in ofono-phonesim (Ubuntu):
assignee: nobody → Alfonso Sanchez-Beato (alfonsosanchezbeato)
status: New → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ofono-phonesim - 1.20-1ubuntu6

ofono-phonesim (1.20-1ubuntu6) xenial; urgency=medium

  [ Alfonso Sanchez-Beato ]

  * debian: Fix LP: #1557958. Now we do not directly control ofono
    service from ofono-phonesim service.
  * debian/control: update standards version to 3.9.6

 -- Simon Fels <email address hidden> Fri, 18 Mar 2016 11:03:40 +0100

Changed in ofono-phonesim (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers