Hi Steve!

On Mon, Mar 11, 2019 at 04:37:52PM -0700, Steve Langasek wrote:
> Thanks for the fixes to the smcroute autopkgtests in 2.4.2-4.  I've synced
> this new version into Ubuntu, and the autopkgtests have now passed on all
> architectures *except* for i386:
> [snip]
> autopkgtest [11:06:00]: test daemon-init-scripts: [-----------------------
> ok 7 - starting smcroute
> not ok 8 - smcroute is really running
> #   Failed test 'smcroute is really running'
> #   at /tmp/autopkgtest.Fz4BvX/build.HSu/src/debian/tests/daemon-init-scripts 
> line 36.
> #          got: '1'
> #     expected: '0'
> Considering that the behavior of the tests here is to: check whether
> smcroute is running, then restart it, then check again if it's running; and
> only the first check fails; this looks to me like it might be a startup
> race.

Yes indeed, that seems to be the case.  The tests require a bit
of love and encouragement to get into shape.

> [snip]
> So, since you are starting the service and then immediately checking if the
> service is running (using pgrep), it's possible that this is running into a
> race because systemd is returning success immediately.  But even if that's
> not the cause of the autopkgtest failure, since smcrouted is a daemon that
> provides a socket IPC interface, this would still be a bug (race condition)
> in the startup of the service since systemd can definitely return before
> smcrouted is listening on the socket.

Yup.

I'll see what I can do about this.  I'm still very much a Debian n00b,
but I'll try to set up a unit test environment to sandbox my fixes. 
The last fixes were made with a blindfold on ...

Cheers
 /Joachim

Reply via email to